Skip to content

Instantly share code, notes, and snippets.

@jkeefe
Created Aug 31, 2021
Embed
What would you like to do?
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