Date Tags dc / d3

Wrote this interactive US energy dashboard a while ago for practicing data visualization skills. The original design is stored that in my repo. All data illustrated are extracted from US Energy Information Administration.

The data shows several interesting trends:

  1. Coal, natural gas and nuclear show strong seasonal components.
  2. Coal usage is heading downwards over time.
  3. Natural gas usage is increased over time.
  4. Total energy is held fairly the same towards recently years. This which shows natural gas increasing replacing coal in energy consumption.

Summary to build up this dashboard

To build up this dashboard, several stages have to perform. (from data extraction to dashboard build up and visualization as listed below:)

  1. Extract US energy data from US EIA
  2. Convert the data to csv form. (I was using python with pandas module)
import pandas as pd
df = pd.read_csv("data/Net_generation_for_all_sectors_monthly.csv")
df["Month"]=pd.to_datetime(df["Month"],format="%b %Y")
df.to_csv("US_electricity.csv",index=False)
  1. Use d3.js to load the resultant csv.
  2. Use dc.js to illustrate the data.

NOTE: All plots are interactive and linked together. So selection of 1 dataset will dynamically update other subplots in this dashboard.

Energy breakdown


Total energy [brush time period to zoom in]

Energy consumption pie chart [click to select/unselect each sector]

Electricity Consumption Table


Comments

comments powered by Disqus