Thomas Rutherford
Aug 24, 2017 · 1 min read

Very nice set of tools. I’m a complete newbie on Node/D3/JS and cartography, and I typically work on Windows machines. I decided to see if I could translate the bash script into a DOS batch file as an exercise:

http://www.mpsge.org/batchcartography.html

I ran into three problems: (i) Data retrieval from Census using curl.exe required a -L switch to permit redirects, (ii) I had to the following change:

ndjson-map -r d3 -r d3=d3-scale-chromatic “z = d3.scaleThreshold().domain([1, 10, 50, 200, 500, 1000, 2000, 4000]).range(d3.schemeOrRd[9]), d.features.forEach(f => f.properties.fill = z(f.properties.density)), d”

as

ndjson-map -r d3 -r d3=d3-scale-chromatic “(d.properties.fill = d3.scaleThreshold(d3.interpolateViridas).domain([1, 10, 50, 200, 500, 1000, 2000, 4000]).range(d3.schemeOrRd[9])(d.properties.density), d)”

(iii) I could not figure out how to scale the x axis of the legend, and I ended up using legend.svg from the geo2SVG web page.

Hope to be able to move up the learning curve over the next few months.

)