Skip to content

Instantly share code, notes, and snippets.

@wayneburkett
Last active April 21, 2020 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wayneburkett/23f746e71a9bc60794b848a3551be446 to your computer and use it in GitHub Desktop.
Save wayneburkett/23f746e71a9bc60794b848a3551be446 to your computer and use it in GitHub Desktop.
# get a pared-down database of the trees in NYC
# the downloaded CSV is ~210M
# the generated DB is ~22M
mkdir trees && \
curl -L "https://data.cityofnewyork.us/api/views/uvpi-gqnh/rows.csv?accessType=DOWNLOAD" -o trees/trees.csv && \
ogr2ogr -f SQLite trees.db trees/trees.csv -nln trees -dialect sqlite \
-sql "SELECT tree_id AS id, \
ROUND(latitude, 6) lat, \
ROUND(longitude, 6) lon \
FROM trees"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment