US counties from census.gov
Last active
October 12, 2015 18:27
-
-
Save pbogden/1ba3d5e5ba44cceb37e5 to your computer and use it in GitHub Desktop.
counties0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Census data: http://www.census.gov/geo/maps-data/data/tiger-line.html | |
SOURCE = tl_2015_us_county.zip | |
SITE = ftp://ftp2.census.gov/geo/tiger/TIGER2015/COUNTY/ | |
all: counties.json | |
.PHONY: clean all | |
# Download county shapefiles | |
data/$(SOURCE): | |
curl -LO $(SITE)$(SOURCE) | |
@-mkdir data | |
mv $(SOURCE) data | |
# Convert county shapefiles to topojson | |
counties.json: data/$(SOURCE) | |
@echo "making" $@ | |
@-mkdir tmp | |
unzip $< -d tmp | |
topojson -p -o $@ `find tmp/*.shp` | |
rm -r tmp | |
clean: | |
-rm -r tmp |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment