Learning To Make Graphs and Other Figures and Animations using D3 and Other JS Libraries
July 15, 2015. My first foray into choropleth maps with D3! Click on the image at right and hover your cursor on any state to see a tooltip with state name and 2010 population. In the process of creating this page, I came across several new and interesting resources that I think I will use much in the future. In terms of data to create topojson files, Census.gov has Shape files that can be converted to Json format at Shape Escape. Another interesting tool is MapStarter, where you can upload a variety of file formats (or use their default offerings) and it will generate an HTML file to display your map with color-filled shapes. Finally, here is a link to a world Json file and a US states/counties Json file. Ultimately, I used that us.json file and Michael Simeone’s clear instructions to build my first map. I also used Color Brewer 2 to choose the divergent color theme to to give visual meaning to the data.
Next up: I am trying to meld in some of Rich Donohue’s code from an animated choropeth graph to show the US population change with each census period from 1900-2010. Fun times!
July 19, 2015. A multi-year choropleth map of US population 1900-2010! Inspired by Niall MacKenzie’s Block. Still working on adding back the tooltips that functioned in the 2010 map (above.) Click on image to try it out.
July 28, 2015. A slightly more nuanced color scheme to show smaller population shifts. It is still not quite right though. I used this gradient tool, another interesting find.
The legend is way too crowded as well. I will work on these issues. But, the main breakthrough here was to incorporate a slider to transition from year to year, rather than the previous drop down menu. Some progress 🙂 As always, click on the image to try out the slider.