Skip to content

Instantly share code, notes, and snippets.

View aaronbinns's full-sized avatar

Aaron Binns aaronbinns

  • San Francisco, CA
View GitHub Profile
@aaronbinns
aaronbinns / build.sh
Last active September 3, 2019 21:39
Build GeoJSON shapes for all US cities.
#!/bin/bash
# Extract the US zip-code shapes and convert to a single US-wide
# GeoJSON file
echo -n "Extracting US-wide GeoJSON file (takes ~10 mins)..."
mkdir tl_2014_us_zcta510
unzip -qq tl_2014_us_zcta510.zip -d tl_2014_us_zcta510
ogr2ogr -f GeoJSON -t_srs crs:84 tl_2014_us_zcta510.geojson tl_2014_us_zcta510/tl_2014_us_zcta510.shp
rm -r tl_2014_us_zcta510
echo "done."