forked from tfolkman/learningwithdata
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathus_state_map_makefile
More file actions
25 lines (22 loc) · 795 Bytes
/
Copy pathus_state_map_makefile
File metadata and controls
25 lines (22 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
build/gz_2010_us_040_00_20m.zip:
mkdir -p $(dir $@)
curl -o $@ http://www2.census.gov/geo/tiger/GENZ2010/$(notdir $@)
build/gz_2010_us_040_00_20m.shp: build/gz_2010_us_040_00_20m.zip
unzip -od $(dir $@) $<
touch $@
build/states.json: build/gz_2010_us_040_00_20m.shp state_data.csv
node_modules/.bin/topojson \
-o $@ \
--id-property='STATE,id' \
--external-properties=state_data.csv \
--properties='name=state' \
--properties='rate=+d.properties["value"]' \
--properties='rank=+d.properties["rank"]' \
--properties='cost=+d.properties["cost"]' \
--properties='number=+d.properties["n_schools"]' \
--projection='width = 960, height = 600, d3.geo.albersUsa() \
.scale(1280) \
.translate([width / 2, height / 2])' \
--simplify=.5 \
--filter=none \
-- states=$<