Skip to content

This school project process a dataset from NYC Open Data which includes information about more than 680,000 trees on the streets of New York City. It will allow a user to query this data set to obtain information about selected aspects of the data, such as how many trees of a given species are growing, borough by borough, or which trees are with…

License

ksuzu46/nyc-trees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NYCTrees


Description

This school project process a dataset from NYC Open Data which includes information about more than 680,000 trees on the streets of New York City. It will allow a user to query this data set to obtain information about selected aspects of the data, such as how many trees of a given species are growing, borough by borough, or which trees are within a given distance of a given GPS location. The user will be able to specify a fragment of a species common name, such as "oak" and the program will display the frequency of occurrence of all types of oak trees throughout the city, such as pin oaks, sawtooth oaks, scarlet oaks, and white oaks.

Command Description

tree_info tree _to_find

where tree_to_find is a string that might contain white space.This command lists certain information about the trees whose common name tree_to_find. For details about which information is output by the command, and definition of "match", please refer to the link at the bottom of this page.

listall_names

Prints all tree common names found in the TreeCollection, one name per line. Prints the entire stored set of tree objects in sorted order, one per line. The tree objects are printed as a comma-separated-values file, with the ten stored fields of each tree printed one after the other on each line, in the order specified in the link at the bottom.

listall_inzip zipcode

where zipcode is an int type. Lists the common names of all trees found in the given zipcode, together with how many of each occur in that zipcode, in the form common_name: countone per line. For example, if three red oaks, fourhemlocks, and two spruce are in the given zipcode its output looks like red oak: 3 hemlock: 4 spruce: 2

list_near latitude longitude dist

where latitude ,longitude , and dist are fixed point decimal numbers, lists the common names and frequencies of all trees within dist kilometers of the given GPS point (latitude,longitude ).

Usage

  1. Download and extract or clone this repository, and cd into the directory.
  2. There are two ways to build the project.
    • Using cmake:
      mkdir build && cd build
      cmake.. && make
    • Using make:
      make
  3. Set PATH to bin:
         cd .. && export PATH=$PATH:$PWD/bin
  4. Execute the program:
    • If the project is build by cmake:
      • To run all the commands in command-file by typing:
        runAll
      • or run a custom command defined above:
        ./bin/NYCTreeInfoExe [InputFilePath] [CommandFilePath]
    • If the project is build by make:
      • To run all the commands in command-file by typing:
        make run
      • or run a custom command:
        ./bin/exe [InputFilePath] [CommandFilePath]

Please visit here for more detailed specification

About

This school project process a dataset from NYC Open Data which includes information about more than 680,000 trees on the streets of New York City. It will allow a user to query this data set to obtain information about selected aspects of the data, such as how many trees of a given species are growing, borough by borough, or which trees are with…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages