Skip to content

Instantly share code, notes, and snippets.

@pbogden
Last active October 12, 2015 18:27
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 pbogden/1ba3d5e5ba44cceb37e5 to your computer and use it in GitHub Desktop.
Save pbogden/1ba3d5e5ba44cceb37e5 to your computer and use it in GitHub Desktop.
counties0

US counties from census.gov

# 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
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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