Skip to content

Instantly share code, notes, and snippets.

View wayneburkett's full-sized avatar

Wayne wayneburkett

  • Providence, RI
View GitHub Profile

How to create this file

  1. First you'll need to download the latest parcel data (shapefiles and extended parcel records) and generate a SQLite database:
# download the shapefiles and parcel data, merge it all together, and dump it into a database
curl -L "https://www.stlouis-mo.gov/data/upload/data-files/prcl_shape.zip" -o prcl.zip && \
unzip prcl.zip && \
curl -LO "https://www.stlouis-mo.gov/data/upload/data-files/par.zip" && \
unzip par.zip && \
@wayneburkett
wayneburkett / README.md
Last active June 27, 2020 05:44
Get pixel color from canvas on mouseover
@wayneburkett
wayneburkett / everylotpvd
Last active November 8, 2019 13:16
Create an everylotbot for Providence, RI
# download the shapefile and dump it into a database
mkdir tmp && \
curl -L "https://data.providenceri.gov/api/geospatial/78bu-i8at?method=export&format=Shapefile" -o tmp/prcl.zip && \
cd tmp && \
unzip prcl.zip && \
ogr2ogr -f SQLite prcl_raw.db geo_export_*.shp -t_srs EPSG:4326
# create a table with everything you'd need to run an everylot bot
# http://fakeisthenewreal.org/everylot/
# change the table name to whatever the downloads give you (it's randomized)
# 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"
@wayneburkett
wayneburkett / git.alias.about.sh
Created April 22, 2019 17:21
Git description alias
alias.about !describe() { msg="$1"; git config branch."$(git rev-parse --abbrev-ref HEAD)".description ${msg:+"$msg"}; }; describe
@wayneburkett
wayneburkett / generate.bash
Last active March 27, 2019 18:35
St. Louis properties owned by Paul McKee's Northside Regeneration LLC
# see this gist for instructions to generate the database of parcels this was created from
# https://gist.github.com/wayneburkett/9fc130e1e2f1f6105a6fa2c0e74c2e3c
ogr2ogr -f GeoJSON northside.geojson prcl.shp -t_srs EPSG:4326 -select handle -where "ownername LIKE 'NORTHSIDE REGEN%'"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.