D3 ScatterPlot on Renewable Energy

This ScatterPlot is intended to show the percentage of Renewable Energy production of 41 countries from 2002 to 2012. Certain regions, such as Scandanavia, clearly stand out as the leader in the global adoption of renewable energy technologies.

The data set was provided by OECD: https://data.oecd.org/energy

Scatter Plot on Regional Growth

Functional D3 Components

Some of the d3.methods used in the importing and formatting data used to render the scatterplot included:

d3.csv d3.map d3.set d3.keys
d3.mean d3.nest d3.extent d3.transition

Additional functionality included:

  • Radio Buttons that transition regions/countries
  • Resuable Legend Module

This component was created following best practices outlined by Chris Viau in his book: Developing a D3.js Edge" and is called using d3.models.legend().

var rlegend = d3.models.legend()
    .fontSize(15)
    .width(width-160)
    .height(height)
    .inputScale(colorScale);

svg.call(rlegend);