Skip to content

Instantly share code, notes, and snippets.

@jkeefe
Created August 31, 2021 20:36
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 jkeefe/bcdd65059eb0345328bf19d8d0395cba to your computer and use it in GitHub Desktop.
Save jkeefe/bcdd65059eb0345328bf19d8d0395cba to your computer and use it in GitHub Desktop.
Making state water files. Your paths will vary.
# usage: make water STATE=06
water:
# note that I've previously downloaded all county water files from ftp2.census.gov/geo/tiger/TIGER2020/AREAWATER
# to /Volumes/jkeefe-data/2020_Census/AREAWATER on my computer
mkdir -p ./tmp/water
rm ./tmp/water/*.*
cd /Volumes/jkeefe-data/2020_Census/AREAWATER; unzip -o "tl_2020_$(STATE)*.zip" -d /Users/keefe/cnnvis-census2020-dot-maps/tmp/water
npx mapshaper -i './tmp/water/*.shp' combine-files \
-simplify 40% \
-merge-layers \
-proj EPSG:4326 \
-o datawork/water/water_$(STATE).geojson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment