Zack Whitacre
As we learn more about the current state of the climate thanks to publications like those released by the IPCC, we know that drastic action is needed to change the way we utilize nature’s resources and fuel the global economy. This exploratory data analysis uses the World Resources Institute’s Global Power Plant Database. I’ll analyze these data by country and by primary fuel type (e.g., solar, hydro, coal) in a couple different ways, then provide some implications and opportunities for future research.
I used Python 3 and Pandas for the majority of this analysis, and I used Tableau to create the graphs.
The data in this data set was collected from 34,935 power plants around the world, each occupying one row in the table, noting several dimensions and metrics. Below is the list of columns I used:
country - a three-letter abbreviation for the country in which the plant is basedprimary_fuel - the main energy source at the plantcapacity_mw - electrical generating capacity in megawattsgeneration_gwh_xxxx - electricity generation in gigawatt-hours reported for the year xxxx. This data set includes annual data for the years 2013 through 2017, all of which I used.estimated_generation_gwh_xxxx - estimated electricity generation in gigawatt-hours for the year xxxx. This data set includes annual data for the years 2013 through 2017, all of which I used.For clarity, a “mw” is a Megawatt, equivalent to 1,000 kilowatts. On its own, a Megawatt doesn’t mean much to you and me, but when we add a time dimension, it starts to paint a fuller picture. One Megawatt-hour is enough to power the average American home for just over a month. A gwh, or gigawatt-hour is 1,000 times bigger than that, roughly enough to power 100 homes for a full year.
The WRI data is hosted here: https://datasets.wri.org/dataset/540dcf46-f287-47ac-985d-269b04bea4c6
I had to do a bit of transformation on the data set in order to make it analysis-ready.
Some of the power generation values were null. To get around this, I first applied the WRI’s method of using average production for plants in the same country and year, with the same fuel type. This snippet was used to attempt to fill in values for 2013:
#Fill null estimated generation rows with the average estimated generation for power plants of the same country and primary_fuel type that do have data
df['estimated_generation_gwh_2013'] = df.groupby(['country', 'primary_fuel'], sort=False)['estimated_generation_gwh_2013'].apply(lambda x: x.fillna(x.mean()))
For remaining null values, I took the estimated_generation_gwh_2017, which was almost universally populated, and applied that to prior years:
#Fill remaining null values with the 2017 power generation estimate
df['estimated_generation_gwh_2013'].fillna(df['estimated_generation_gwh_2017'], inplace=True)
I then added a few columns: