Skip to content

Instantly share code, notes, and snippets.

Created August 31, 2021 20:36
What would you like to do?
Making state water files. Your paths will vary.
# usage: make water STATE=06
# note that I've previously downloaded all county water files from
# 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