I made a graph!

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
    • reformatting it in javascript to be what I need

But, I finally made a graph!

Advertisements
Next Post
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: