forked from daveschoutens/boss-ng2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (17 loc) · 764 Bytes
/
Makefile
File metadata and controls
22 lines (17 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
build/gz_2010_us_050_00_20m.zip:
mkdir -p $(dir $@)
curl -o $@ http://www2.census.gov/geo/tiger/GENZ2010/$(notdir $@)
build/gz_2010_us_050_00_20m.shp: build/gz_2010_us_050_00_20m.zip
unzip -od $(dir $@) $<
touch $@
src/assets/counties.json: build/gz_2010_us_050_00_20m.shp
node_modules/.bin/topojson -o $@ --projection='width = 960, height = 600, d3.geo.albersUsa().scale(1280).translate([width / 2, height / 2])' --simplify=.5 -- counties=$<
src/assets/states.json: src/assets/counties.json
node_modules/.bin/topojson-merge \
-o $@ \
--in-object=counties \
--out-object=states \
--key='d.id.substring(0, 2)' \
-- $<
src/assets/us-states.json:
curl -o $@ https://raw.githubusercontent.com/alignedleft/d3-book/master/chapter_12/us-states.json