I’m trying to learn d3js in tandem with learning python. Working on two languages at once is a bit painful, but I want to make those gorgeous interactive graphics that the New York Times makes!
I grabbed retail fuel pricing data for the US from the Energy Information Administratioj website, processed it with a little python script into a nice csv file, then used d3js to create a graph. I couldn’t figure out how to:
- make the graph dynamic, so that a click would alternate between real and nominal prices
- make the graph size fit the viewers browser window size
- use the EIA API to grab the data in real-time, which poses two hurdles
- grabbing data using the API
But, I finally made a graph!