This is an attempt to make a population map of Cape Cod
Last active
August 29, 2015 14:26
-
-
Save cmaes/8a34bf9a9c6138e50083 to your computer and use it in GitHub Desktop.
capecod
This file contains hidden or 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
GENERATED_FILES = \ | |
capecod.json | |
all: $(GENERATED_FILES) | |
.PHONY: clean all | |
clean: | |
rm -rf -- $(GENERATED_FILES) build | |
build/tracts.zip: | |
mkdir build | |
curl -o $@ 'http://wsgw.mass.gov/data/gispub/shape/census2010/CENSUS2010_BLK_BG_TRCT_SHP.zip' | |
build/tracts-unfiltered.shp: build/tracts.zip | |
rm -rf -- $(basename $@) | |
mkdir -p $(basename $@) | |
unzip -d $(basename $@) $< | |
#for file in $(basename $@)/*; do chmod 644 $$file; mv $$file $(basename $@).$${file##*.}; done | |
#rmdir $(basename $@) | |
touch $@ | |
build/tracts.shp: build/CENSUS2010BLOCKGROUPS_POLY.shp | |
ogr2ogr -f "ESRI Shapefile" -where "COUNTYFP10 = '001'" -t_srs EPSG:4269 $@ $< | |
capecod.json: build/tracts.shp | |
ogr2ogr -f GeoJSON $@ $< | |
# node_modules/.bin/topojson \ | |
# -o $@ \ | |
# -p population=+POP100_RE \ | |
# --id-property=TRACTCE10 \ | |
# --force-clockwise \ | |
# --simplify=1e-9 \ | |
# -- $(filter %.shp, $^) | |
# ny.json: build/tracts.shp | |
# node_modules/.bin/topojson \ | |
# -o $@ \ | |
# -e ACS_12_5YR_B01003_with_ann.csv \ | |
# --id-property=GEO.id2,GEOID \ | |
# -p population=+HD01_VD01,area=+ALAND \ | |
# --projection 'width = 960, height = 700, d3.geo.mercator() \ | |
# .center([-75.819, 42.795]) \ | |
# .scale(6.5 * width) \ | |
# .translate([width / 2, height / 2])' \ | |
# --simplify=.5 \ | |
# -- $(filter %.shp,$^) |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
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