[This article was first published on Economics and R - R posts, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I like to start my courses in energy economics and environmental economics by asking some question like

Which energy source, e.g. gas, coal, nuclear, oil, renewables had the largest absolute increase in world wide energy consumption between the years 2000 und 2016?

And then show some data. Below you can see an updated version of a googleVis visualization of primary energy consumption of different sources for selected world regions (You need to install and activate the flash player plugin to see the figures.)

Units are MTOE (Million Tonnes of Oil Equivalent).

• Interesting enough, it is coal that had the highest increase in absolute consumption between 2000 and 2016

• You can change the world region by clicking on the y-axis and see that this was driven by a rapid extension of chinese coal consumption between 2000 and 2013.

• However, chinese coal consumption has peaked in 2013 and ever so sligthly dropped from this year onwards. Is this a temporary break or a sustainable change in trend? The later would be really good news for world climate. For some background information, you can take a look at this article.

• In absolute terms renewable energy (excluding hydro energy) supply is still very low. However, if you set the y-axis to a log scale, you see that renewable energies had high growth rates in recent years in many countries (including NON-OECD countries like China and India). Will this exponential growth continue for a long while? Also that would be great news. However, if you take a look at Germany, which already has a relatively high share of renewable energy production, you see even a slight decrease from 2015 to 2016 (which was not a very windy year).

The data was collected from the BP Statistical Review of World Energy 2017. I converted the data from several sheets of the large excel file into a format more amenable for data analysis. You can download the transformed data and take a look at the conversion script in R here: https://github.com/skranz/bpdata

You can find some more visualizations of energy and enviornmental data here: http://econ.mathematik.uni-ulm.de/datablog/

Alternatively, if you want to learn about diverse economic data in quiz form, you can take a look at my data quiz: http://skranz.github.io//r/2017/10/23/Dataquiz.html

But let me show you one more visualization that allows you to compare CO2 emissions and total energy usage for different world regions: