International Energy Statistics: A Brief Overview Analysis Of The G7 Countries
Data Cleaning, Wrangling, Visualization, Feature Engineering
Provided by the United Nations, this dataset looks at all the countries in the World by the statistics revolving around their energy policies over the last 25 years from 1990 to 2014.
Fortunately, there was no need to spend much time cleaning the data, a few changes were needed.
One of the column variables is dropped since we already have the quantity.
To make it simple, renamed the variables to keep it shorter as well as keeping the values with the object data types lowercase to avoid case sensitivity.
G7 Countries
Since we will be focused on the G7 Countries, created an array for the countries and overwrite the dataframe to include that while filtering out the rest.
The functions will be necessary to call each country along with matching to each year and type of energy such as conventional crude oil, solar electricity, and wind electricity.
As we can see, the category being conventional crude oil is matched with each country and the function allows us to go through all the years.
Here is an example.
With the variable, we access the column variables for year and quantity specifically to plot.
Comparing The Countries
In order to compare the countries together, the dataframe was overwritten with the commodity being filtered to only include Conventional Crude Oil. The same principle applies for the other visualizations.
The United States, Canada, and the United Kingdom are leading in the Conventional crude oil production although the United Kingdom has been seeing a decline since the late 90s.
Since the United States has so many refineries and a large domestic consumption, this would attribute to an increase in the import curve while the production has decreased and imports decreasing while production is increasing. Interesting enough, most of the European countries are reliant on the imports. When examining Canada, they are at the lowest and have been consistent due to them producing enough for their domestic market. They are also done by the provinces which are far away from the crude defining provinces due to the country’s large size.
Germany is leading in solar electricity production with the United States, Japan, and Italy following in pursuit.
In the reverse opposite, the United States is leading in wind electricity production with Germany in 2nd.
It will be interesting to see how the next 25 years will go and if this trend will continue. One thing is for sure is that the decline in coal appears to be an international trend rather than just in the United States.