← All projects

Visualizing Renewable Energy

Renewable energy, in five charts.

An interactive dashboard on renewable energy around the world, built with Vega-Lite for FIT3179, Monash University's data visualisation unit. A map, a bar chart, a donut, a stacked area and a stacked bar chart each take one angle on the data, starting from the World Bank's figures for how much of each country's energy is renewable.

The dashboard's first chart: a world map of renewable energy's share of consumption in 2020, countries shaded from pale to dark green and those without data in grey, with an intensity legend
Renewable share of each country's energy use, 2020.

Production

Five kinds of energy, side by side.

A horizontal bar chart totals 2020 production, in gigawatt-hours, for biomass, geothermal, hydro, solar and wind. Pick a country from the menu, the USA, Australia, Canada, China or Japan, and the bars re-total for that country alone.

Bar chart of renewable energy production in 2020 by energy type, from biomass to wind, with a Select Country menu set to All
Production by energy type, 2020.

Mix

The 2022 mix in one ring.

A donut chart shows each energy type's share of production in 2022. It keeps the bar chart's colours for each type, so the two charts read as one.

Donut chart of energy production by type in 2022, split between biomass, geothermal, hydro, solar and wind
Energy production by type, 2022.

Trends

Thirty years of renewable share.

A stacked area chart follows the World Bank's renewable share of energy use from 1990 to 2020 for Australia, Brazil, China, Malaysia and Singapore. Choose one country from the menu to see it on its own.

Stacked area chart of renewable energy consumption as a percentage for Australia, Brazil, China, Malaysia and Singapore from 1990 to 2020
Energy consumption trends, 1990 to 2020.

Countries

Five countries, year by year.

A stacked bar chart breaks renewable production down by country for Australia, Canada, China, Japan and the USA, every year from 2000 to 2023. Hover a segment for its exact figure, or pick one country to compare its years alone.

Stacked bar chart of renewable energy production in gigawatt-hours for Australia, Canada, China, Japan and the USA, each year from 2000 to 2023
Renewable production by country, 2000 to 2023.

And the details.

How it's built

Vega-Lite, Vega-Embed, TopoJSON.

One static HTML page, published with GitHub Pages and with no build step. Each chart is a Vega-Lite spec in its own JSON file, embedded with Vega-Embed and laid out with Pure.css. The World Bank data was cleaned and reshaped with pandas first.

  1. Joining data to the map

    The map loads Natural Earth country shapes as TopoJSON and looks up each country's World Bank figure by name. A grey layer underneath catches every country without a match, so the map has no holes.

  2. Steps, not a gradient

    The map's colour scale is a threshold scale: five greens with breaks at 1, 40, 80 and 100%. Each country falls in one band, which can be read straight off the legend.

  3. Menus as parameters

    Each country menu is a Vega-Lite parameter bound to a select input, which the chart's filter transform reads. Choosing a country filters and re-totals the data in the browser, with no JavaScript of my own.

Visualizing Renewable Energy. Renewable energy, in five charts.

NextF1 Pinnacle Of Motor SportsFormula 1, on one dashboard.