This project focuses on data obtained from the 2016 BP Statistical Review of World Energy, which looks at energy usage worldwide with data up to 2015.
Outline
Note: This notebook requires internet access to run.
This notebook was created by Stefany Gutu in May 2017 for the NYU Stern course Data Bootcamp.
In the face of climate change and the current political atmosphere, it is more important than ever to know where our energy comes from. Moreover, we should have an idea of the capacity for transitioning to cleaner sources to secure future energy stability. In this document we take a look at trends in the following six regions: North America, South America, Africa, Middle East, Asia Pacific, and Europe/Eurasia. The conclusions drawn from the following data are based only on the graphics and a basic knowledge of energy patterns today.
In [106]:
import sys # system module
import pandas as pd # data package
import math # complex math functions
import matplotlib.pyplot as plt # graphics module
import datetime as dt # date and time module
import numpy as np # foundation for Pandas
from pandas_datareader import wb, data as web # worldbank data
# plotly imports
from plotly.offline import iplot, iplot_mpl # plotting functions
import plotly.graph_objs as go # ditto
import plotly # just to print version and init notebook
import cufflinks as cf # gives us df.iplot that feels like df.plot
cf.set_config_file(offline=True, offline_show_link=False)
# these lines make our graphics show up in the notebook
%matplotlib inline
plotly.offline.init_notebook_mode(connected=True)
# check versions
print('Python version:', sys.version)
print('Pandas version:', pd.__version__)
print('Plotly version:', plotly.__version__)
print('Today:', dt.date.today(), '\n')
print('Stefany Gutu')
In [107]:
url1 = 'http://www.bp.com/content/dam/bp/excel/energy-economics/statistical-review-2016'
url2 = '/bp-statistical-review-of-world-energy-2016-workbook.xlsx'
url = url1 + url2
bp = pd.read_excel(url)
In [130]:
# carbon dioxide emissions by region since 1965
# clean up and shape
# only interested in 2015 so as to compare to renewable energy capacity at the end
# units = million tonnes carbon dioxide
emissions = pd.read_excel(url,
sheetname='Carbon Dioxide Emissions',
index_col=0,
skiprows=2)
emissions = emissions.drop(
emissions.columns[0:50], axis=1).drop(
emissions.columns[51:53], axis=1) # only 2015
emissions = emissions.ix[['Total North America', 'Total S. & Cent. America', 'Total Africa',
'Total Middle East', 'Total Asia Pacific', 'Total Europe & Eurasia']]
emissions.index = ['North America', 'South America', 'Africa',
'Middle East', 'Asia Pacific', 'Europe/Eurasia']
emissions = emissions.astype(int).round()
emissions
Out[130]:
In [131]:
# plot total emissions by region in 2015
fig = {'data': [{
'values': [6492, 1376, 1201, 2167, 16066, 6202],
'labels': ['North America', 'South America', 'Africa',
'Middle East', 'Asia Pacific', 'Europe/Eurasia'],
'marker': {'colors': ['rgb(205,92,92)', 'rgb(255,127,80)', 'rgb(255,215,0)',
'rgb(147,112,219)', 'rgb(143,188,143)', 'rgb(100,149,237)']},
'domain': {'x': [.2, .8]},
'hoverinfo': 'label+percent',
'hole': .3,
'type': 'pie'}],
'layout': {
'legend':{
'x':'-.01',
'y':'-.07',
'orientation':'h'},
'annotations': [{
'font': {
'size': 17},
'showarrow': False,
'text': '2015 CO2</br>Emissions</br>by Region',
'x': '0.5',
'y': '0.5'}]}}
iplot(fig)
The burning of coal, oil, and natural gas contributes to more than half of total carbon dioxide emissions worldwide (a fact not pictured above). This graphic takes a look at percentages rather than integer estimates as the purpose of this document already presupposes that emissions are too high and we must change our patterns. Instead we are interested which regions pollute most. It is scary to see in this graphic that Asia emitted almost half of the world's 2015 emissions (though this may not necessarily be only from fossil fuels). North America and Europe/Eurasia combined do not equal the impact of Asia Pacific, nor do the Middle East, South America, and Africa equal North America or Europe.
In [110]:
# oil consumption by region since 1965
# clean up and shape
# units = million tonnes
oil_cons = pd.read_excel(url, sheetname='Oil Consumption – Tonnes',
index_col=0,
skiprows=2)
oil_cons = oil_cons.drop(['2014.1','of total'], axis=1)
oil_cons = oil_cons.ix[['Total North America', 'Total S. & Cent. America', 'Total Africa',
'Total Middle East', 'Total Asia Pacific', 'Total Europe & Eurasia']]
oil_cons.index = ['North America', 'South America', 'Africa',
'Middle East', 'Asia Pacific', 'Europe/Eurasia']
oil_cons = oil_cons.astype(int).round() # convert to integer and round up
oil_cons = oil_cons.T
oil_cons.head()
Out[110]:
In [111]:
# natural gas consumption by region since 1965
# clean up and shape
# units = million tonnes oil equivalent
gas_cons = pd.read_excel(url,
sheetname='Gas Consumption – tonnes',
index_col=0,
skiprows=2)
gas_cons = gas_cons.drop(['2014.1','of total'], axis=1)
gas_cons = gas_cons.ix[['Total North America', 'Total S. & Cent. America', 'Total Africa',
'Total Middle East', 'Total Asia Pacific', 'Total Europe & Eurasia']]
gas_cons.index = ['North America', 'South America', 'Africa',
'Middle East', 'Asia Pacific', 'Europe/Eurasia']
gas_cons = gas_cons.astype(int).round() # convert to integer and round up
gas_cons = gas_cons.T
gas_cons.head()
Out[111]:
In [112]:
# coal consumption by region since 1965
# clean up and shape
# units = million tonnes oil equivalent
coal_cons = pd.read_excel(url,
sheetname='Coal Consumption - Mtoe',
index_col=0,
skiprows=2)
coal_cons = coal_cons.drop(['2014.1','of total'], axis=1)
coal_cons = coal_cons.ix[['Total North America', 'Total S. & Cent. America', 'Total Africa',
'Total Middle East', 'Total Asia Pacific', 'Total Europe & Eurasia']]
coal_cons.index = ['North America', 'South America', 'Africa',
'Middle East', 'Asia Pacific', 'Europe/Eurasia']
coal_cons = coal_cons.astype(int).round() # convert to integer and round up
coal_cons = coal_cons.T
coal_cons.head()
Out[112]:
In [113]:
# find maximum y value for plot
oil_cons.max()
Out[113]:
In [114]:
# find maximum y value for plot
gas_cons.max()
Out[114]:
In [115]:
coal_cons.max()
Out[115]:
In [116]:
# plot oil, natural gas, and coal consumption by region since 1965
# max = 2798 - coal, Asia Pacific
trace1 = dict(type='scatter',
x=oil_cons.index,
y=oil_cons['North America'],
mode='lines',
marker={'color':'rgb(205,92,92)'},
name='North America')
trace2 = dict(type='scatter',
x=oil_cons.index,
y=oil_cons['South America'],
mode='lines',
marker={'color':'rgb(255,127,80)'},
name='South America')
trace3 = dict(type='scatter',
x=oil_cons.index,
y=oil_cons['Africa'],
mode='lines',
marker={'color':'rgb(255,215,0)'},
name='Africa')
trace4 = dict(type='scatter',
x=oil_cons.index,
y=oil_cons['Middle East'],
mode='lines',
marker={'color':'rgb(147,112,219)'},
name='Middle East')
trace5 = dict(type='scatter',
x=oil_cons.index,
y=oil_cons['Asia Pacific'],
mode='lines',
marker={'color':'rgb(143,188,143)'},
name='Asia Pacific')
trace6 = dict(type='scatter',
x=oil_cons.index,
y=oil_cons['Europe/Eurasia'],
mode='lines',
marker={'color':'rgb(100,149,237)'},
name='Europe/Eurasia')
trace7 = dict(type='scatter',
x=gas_cons.index,
y=gas_cons['North America'],
mode='lines',
marker={'color':'rgb(205,92,92)'},
name='North America',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace8 = dict(type='scatter',
x=gas_cons.index,
y=gas_cons['South America'],
mode='lines',
marker={'color':'rgb(255,127,80)'},
name='South America',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace9 = dict(type='scatter',
x=gas_cons.index,
y=gas_cons['Africa'],
mode='lines',
marker={'color':'rgb(255,215,0)'},
name='Africa',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace10 = dict(type='scatter',
x=gas_cons.index,
y=gas_cons['Middle East'],
mode='lines',
marker={'color':'rgb(147,112,219)'},
name='Middle East',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace11 = dict(type='scatter',
x=gas_cons.index,
y=gas_cons['Asia Pacific'],
mode='lines',
marker={'color':'rgb(143,188,143)'},
name='Asia Pacific',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace12 = dict(type='scatter',
x=gas_cons.index,
y=gas_cons['Europe/Eurasia'],
mode='lines',
marker={'color':'rgb(100,149,237)'},
name='Europe/Eurasia',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace13 = dict(type='scatter',
x=coal_cons.index,
y=coal_cons['North America'],
mode='lines',
marker={'color':'rgb(205,92,92)'},
name='North America',
showlegend=False,
xaxis='x3',
yaxis='y3')
trace14 = dict(type='scatter',
x=coal_cons.index,
y=coal_cons['South America'],
mode='lines',
marker={'color':'rgb(255,127,80)'},
name='South America',
showlegend=False,
xaxis='x3',
yaxis='y3')
trace15 = dict(type='scatter',
x=coal_cons.index,
y=coal_cons['Africa'],
mode='lines',
marker={'color':'rgb(255,215,0)'},
name='Africa',
showlegend=False,
xaxis='x3',
yaxis='y3')
trace16 = dict(type='scatter',
x=coal_cons.index,
y=coal_cons['Middle East'],
mode='lines',
marker={'color':'rgb(147,112,219)'},
name='Middle East',
showlegend=False,
xaxis='x3',
yaxis='y3')
trace17 = dict(type='scatter',
x=coal_cons.index,
y=coal_cons['Asia Pacific'],
mode='lines',
marker={'color':'rgb(143,188,143)'},
name='Asia Pacific',
showlegend=False,
xaxis='x3',
yaxis='y3')
trace18 = dict(type='scatter',
x=coal_cons.index,
y=coal_cons['Europe/Eurasia'],
mode='lines',
marker={'color':'rgb(100,149,237)'},
name='Europe/Eurasia',
showlegend=False,
xaxis='x3',
yaxis='y3')
data = [trace1, trace2, trace3, trace4, trace5, trace6,
trace7, trace8, trace9, trace10, trace11, trace12,
trace13, trace14, trace15, trace16, trace17, trace18]
layout = go.Layout(
title='Fossil Fuel Consumption by Region</br>(in million tonnes oil equivalent)',
width=1050,
height=400,
legend=dict(x=.85, y=1),
xaxis=dict(
title='Oil',
domain=[0, 0.25]),
yaxis=dict(
range=[0, 2900]),
xaxis2=dict(
title='Natural Gas',
domain=[0.3, 0.55]),
yaxis2=dict(
anchor='x2',
range=[0, 2900]),
xaxis3=dict(
title='Coal',
domain=[0.6, 0.85]),
yaxis3=dict(
anchor='x3',
range=[0, 2900]))
iplot(go.Figure(data=data, layout=layout))
Asia Pacific has led in oil consumption for almost the past decade and in coal consumption for almost three decades now - consistent with the carbon dioxide data above which indicates that this region also produces the most emissions. Impressively Europe/Eurasia has decreased its oil and coal consumption for a couple decades now, while North America indifferently just barely fluctuates. It is interesting considering these trends that North America and Europe emit about the same level of carbon dioxide emissions when it is well-known in the political community that the European Union puts great effort into these results while the United States does not.
In [117]:
# oil reserves by region since 1980
# clean up and shape
# units = thousand million barrels a.k.a. billion barrels
# convert: 1 barrel = .1364 metric tonnes
oil_res = pd.read_excel(url,
sheetname='Oil - Proved reserves history',
index_col=0,
skiprows=2)
oil_res = oil_res.drop(['2014.1','of total'], axis=1)
oil_res = oil_res.ix[['Total North America', 'Total S. & Cent. America', 'Total Africa',
'Total Middle East', 'Total Asia Pacific', 'Total Europe & Eurasia']]
oil_res.index = ['North America', 'South America', 'Africa',
'Middle East', 'Asia Pacific', 'Europe/Eurasia']
oil_res = oil_res*(.1364)*1000 # convert to million metric tonnes
oil_res = oil_res.astype(int).round() # convert to integer and round up
oil_res = oil_res.T
oil_res.head()
Out[117]:
In [118]:
# natural gas reserves by region since 1980
# clean up and shape
# units = trillion cubic metres
# convert: 1 billion cubic metres = .90 million tonnes oil equivalent
gas_res = pd.read_excel(url,
sheetname='Gas - Proved reserves history ',
index_col=0,
skiprows=2)
gas_res = gas_res.drop(['2014.1','of total'], axis=1)
gas_res = gas_res.ix[['Total North America', 'Total S. & Cent. America', 'Total Africa',
'Total Middle East', 'Total Asia Pacific', 'Total Europe & Eurasia']]
gas_res.index = ['North America', 'South America', 'Africa',
'Middle East', 'Asia Pacific', 'Europe/Eurasia']
gas_res = gas_res*.9*1000 # convert to million tonnes oil equivalent
gas_res = gas_res.astype(int).round()
gas_res = gas_res.T
gas_res.head()
Out[118]:
In [119]:
# find maximum y value for plot
oil_res.max()
Out[119]:
In [120]:
# find maximum y value for plot
gas_res.max()
Out[120]:
In [121]:
# plot oil and natural gas reserves by region since 1980
# max = 109593 - oil, Middle East
trace1 = dict(type='scatter',
x=oil_res.index,
y=oil_res['North America'],
mode='lines+markers',
marker={'color':'rgb(205,92,92)'},
name='North America')
trace2 = dict(type='scatter',
x=oil_res.index,
y=oil_res['South America'],
mode='lines+markers',
marker={'color':'rgb(255,127,80)'},
name='South America')
trace3 = dict(type='scatter',
x=oil_res.index,
y=oil_res['Africa'],
mode='lines+markers',
marker={'color':'rgb(255,215,0)'},
name='Africa')
trace4 = dict(type='scatter',
x=oil_res.index,
y=oil_res['Middle East'],
mode='lines+markers',
marker={'color':'rgb(147,112,219)'},
name='Middle East')
trace5 = dict(type='scatter',
x=oil_res.index,
y=oil_res['Asia Pacific'],
mode='lines+markers',
marker={'color':'rgb(143,188,143)'},
name='Asia Pacific')
trace6 = dict(type='scatter',
x=oil_res.index,
y=oil_res['Europe/Eurasia'],
mode='lines+markers',
marker={'color':'rgb(100,149,237)'},
name='Europe/Eurasia')
trace7 = dict(type='scatter',
x=gas_res.index,
y=gas_res['North America'],
mode='lines+markers',
marker={'color':'rgb(205,92,92)'},
name='North America',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace8 = dict(type='scatter',
x=gas_res.index,
y=gas_res['South America'],
mode='lines+markers',
marker={'color':'rgb(255,127,80)'},
name='South America',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace9 = dict(type='scatter',
x=gas_res.index,
y=gas_res['Africa'],
mode='lines+markers',
marker={'color':'rgb(255,215,0)'},
name='Africa',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace10 = dict(type='scatter',
x=gas_res.index,
y=gas_res['Middle East'],
mode='lines+markers',
marker={'color':'rgb(147,112,219)'},
name='Middle East',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace11 = dict(type='scatter',
x=gas_res.index,
y=gas_res['Asia Pacific'],
mode='lines+markers',
marker={'color':'rgb(143,188,143)'},
name='Asia Pacific',
showlegend=False,
xaxis='x2',
yaxis='y2')
trace12 = dict(type='scatter',
x=gas_res.index,
y=gas_res['Europe/Eurasia'],
mode='lines+markers',
marker={'color':'rgb(100,149,237)'},
name='Europe/Eurasia',
showlegend=False,
xaxis='x2',
yaxis='y2')
data = [trace1, trace2, trace3, trace4, trace5, trace6,
trace7, trace8, trace9, trace10, trace11, trace12]
layout = go.Layout(
title='Fossil Fuel Reserves by Region',
width=1000,
height=500,
xaxis=dict(
domain=[0, 0.4],
title='Oil'),
yaxis=dict(
title='Reserves (in million metric tonnes)',
range=[0, 111000]),
xaxis2=dict(
domain=[0.6, 1],
title='Natural Gas'),
yaxis2=dict(
title='Reserves (in million tonnes oil equivalent)',
anchor='x2',
range=[0, 111000]))
iplot(go.Figure(data=data, layout=layout))
Reserves estimate the available fuel based on current technology levels to access them. As such, I wanted to observe reserves over time to demonstrate the rush for oil and natural gas. (Unfortunately data on coal was unavailable.) As we see above, approximated reserves in the Middle East far outnumber those in other regions of the world. This is of particular interest considering that the Middle East exhibits a consistently low level of consumption of both oil and natural gas compared to the rest of the world. Europe's transition to increased sustainability may make more sense given their high reserves of natural gas, which burns more cleanly than oil or coal. Perhaps their transition was facilitated by these stores which North America does not parallel.
In [122]:
# clean up and shape 2015 data
# units = million tonnes oil equivalent
consumption = pd.read_excel(url,
sheetname='Primary Energy - Cons by fuel',
index_col=0,
skiprows=2)
consumption = consumption.drop(consumption.columns[0:7], axis=1)
consumption.columns = ['Oil', 'Natural Gas', 'Coal', 'Nuclear', 'Hydro', 'Renewables', 'Total']
consumption = consumption.ix[['Total North America', 'Total S. & Cent. America', 'Total Africa',
'Total Middle East', 'Total Asia Pacific', 'Total Europe & Eurasia']]
consumption.index = ['North America', 'South America', 'Africa',
'Middle East', 'Asia Pacific', 'Europe/Eurasia']
consumption = consumption.astype(int).round()
consumption
Out[122]:
In [149]:
# plot energy consumption in the six regions in 2015
trace1 = go.Bar(
y=['North<br>America', 'South<br>America', 'Africa',
'Middle<br>East', 'Asia<br>Pacific', 'Europe/<br>Eurasia'],
x=consumption['Oil'],
name='Oil',
orientation='h',
marker={'color':'rgb(205,92,92)'})
trace2 = go.Bar(
y=['North<br>America', 'South<br>America', 'Africa',
'Middle<br>East', 'Asia<br>Pacific', 'Europe/<br>Eurasia'],
x=consumption['Natural Gas'],
name='Natural Gas',
orientation='h',
marker={'color':'rgb(255,127,80)'})
trace3 = go.Bar(
y=['North<br>America', 'South<br>America', 'Africa',
'Middle<br>East', 'Asia<br>Pacific', 'Europe/<br>Eurasia'],
x=consumption['Coal'],
name='Coal',
orientation='h',
marker={'color':'rgb(255,215,0)'})
trace4 = go.Bar(
y=['North<br>America', 'South<br>America', 'Africa',
'Middle<br>East', 'Asia<br>Pacific', 'Europe/<br>Eurasia'],
x=consumption['Nuclear'],
name='Nuclear',
orientation='h',
marker={'color':'rgb(147,112,219)'})
trace5 = go.Bar(
y=['North<br>America', 'South<br>America', 'Africa',
'Middle<br>East', 'Asia<br>Pacific', 'Europe/<br>Eurasia'],
x=consumption['Hydro'],
name='Hydro',
orientation='h',
marker={'color':'rgb(143,188,143)'})
trace6 = go.Bar(
y=['North<br>America', 'South<br>America', 'Africa',
'Middle<br>East', 'Asia<br>Pacific', 'Europe/<br>Eurasia'],
x=consumption['Renewables'],
name='Renewables',
orientation='h',
marker={'color':'rgb(100,149,237)'})
data = [trace1, trace2, trace3, trace4, trace5, trace6]
layout = dict(width=900,
height=500,
title='World Energy Consumption by Region in 2015',
xaxis={'title': 'Consumption (in million tonnes oil equivalent)'},
barmode='stack')
iplot(go.Figure(data=data, layout=layout))
Having looked specfically at fossil fuel consumption, we now examine regional energy usage by renewables, hydroelectricity, nuclear, coal, natural gas, and oil. As we can see in the graph above, Asia Pacific leads in energy usage in the world - likely due to China. While Europe comes in second, trailed closely by North America, the two combined about equal Asia Pacific's consumption in million tonnes oil equivalent. Oil, natural gas, and coal consistently make up the top three energy sources in descending order throughout the world, excpept for in Asia Pacific where coal surpasses oil. Renewable energy trails last in all regions, with zero data at all for the Middle East. It is not promising that all types of renewable energy are grouped into one category and still sum up to such a minimal value.
In [244]:
# solar energy capacity in 2015 to compare to consumption
# clean up and shape
# units = megawatt-hours
# convert: 12 megawatt-hours = one tonne oil equivalent
solar = pd.read_excel(url,
sheetname='Solar capacity',
index_col=0,
skiprows=3)
solar = solar.drop(solar.columns[0:19], axis=1).drop(solar.columns[20:23], axis=1) # only 2015 capacity
solar = solar.ix[['Total North America']]
solar.index = ['North America']
solar = solar.astype(int)
solar = solar/12*.000001 # convert to million tonnes oil equivalent
solar = solar.T
solar
Out[244]:
In [211]:
# solar energy capacity in 2015 to compare to consumption
# clean up and shape
# units = megawatt-hours
# convert: 12 megawatt-hours = one tonne oil equivalent
wind = pd.read_excel(url,
sheetname='Wind capacity',
index_col=0,
skiprows=3)
wind = wind.drop(wind.columns[0:20], axis=1).drop(wind.columns[21:24], axis=1) # only 2015 capacity
wind = wind.ix[['Total North America', 'Total S. & Cent. America', 'Total Africa',
'Total Middle East', 'Total Asia Pacific', 'Total Europe & Eurasia']]
wind.index = ['North America', 'South America', 'Africa',
'Middle East', 'Asia Pacific', 'Europe/Eurasia']
wind = wind.astype(int)
wind = wind/12*.000001 # convert to million tonnes oil equivalent
wind = wind.T
wind
Out[211]:
In [354]:
# plot fossil fuel consumption against wind capacity
trace1 = go.Bar(
y=consumption['Natural Gas'],
x=['North<br>America', 'South<br>America', 'Africa',
'Middle<br>East', 'Asia<br>Pacific', 'Europe/<br>Eurasia'],
name='Natural Gas Consumption',
marker={'color':'rgb(255,127,80)'})
trace2 = go.Bar(
y=[0.007429, 0.001087, 0.000293, 0.000023, 0.015054, 0.01234],
x=['North<br>America', 'South<br>America', 'Africa',
'Middle<br>East', 'Asia<br>Pacific', 'Europe/<br>Eurasia'],
name='Wind Capacity',
marker={'color':'rgb(100,149,237)'})
trace3 = go.Bar(
y=consumption['Natural Gas'],
x=['Natural Gas</br>Consumption'],
name='Natural Gas Consumption',
marker={'color':'rgb(255,127,80)'},
showlegend=False,
xaxis='x2',
yaxis='y2')
trace4 = go.Bar(
y=wind['North America'],
x=['Wind</br>Capacity'],
name='Wind Capacity',
marker={'color':'rgb(100,149,237)'},
showlegend=False,
xaxis='x2',
yaxis='y2')
trace5 = go.Bar(
y=solar['North America'],
x=['Solar</br>Capacity'],
name='Solar Capacity',
marker={'color':'rgb(255,215,0)'},
xaxis='x2',
yaxis='y2')
data = [trace1, trace2, trace3, trace4, trace5]
layout = dict(width=1000,
height=400,
legend=dict(x=.85, y=1),
title='World Energy Consumption vs. Renewable Capacity',
xaxis=dict(domain=[0, 0.4],
title='Worldwide'),
yaxis=dict(title='Million tonnes oil equivalent',
range=[0, .15]),
xaxis2=dict(domain=[0.5, .9],
title='North America'),
yaxis2=dict(anchor='x2',
range=[0, .15]),
barmode='group',
bargap=2,
bargroupgap=0.4,
annotations=[
dict(x='North America',
y=.075,
xref='x',
yref='y',
text='The red bars have values between 121 and 903</br>and have been SCALED DOWN up to <b>6,000</b> times</br>to demonstrate wind capacity worldwide in blue.',
showarrow=False),
dict(x=.3,
y=.15,
xref='x2',
yref='y2',
text='Ditto!!!!!!',
showarrow=True,
arrowhead=2,
ax=30,
ay=-30)])
iplot(go.Figure(data=data, layout=layout))
While we must keep in mind that the above reflects only available data, it is disappointing to find that so little capacity is estimated for wind or solar-sourced energy. This graph compares only natural gas consumption to wind capacity because natural gas is the least emitted fossil fuel. Data on solar capacity was unavailable except for North America so the figure on the right compares consumption and renewable energy sources. Knowing this, it is all the more striking to see (or to barely see) the current capacity for renewable energy in the world compared to what we are actually consuming. While this is an otherwise useless graph, it is quite dramatic in demonstrating our reliance on harmful energy sources.
This data project aimed to impart a brief snapshot of the energy system in the world today: including how much CO2 we're putting into the environment by using energy and what kinds of energy we're using and rely on most. Sadly, the numbers for renewable energy are dismal compared to our current consumption rates - indicating a dire need to diversify our energy sources to secure a sustainable future.
BP. "BP Statistical Review Of World Energy 2016". London: BP Statistical Review of World Energy, 2016. Web. 5 May 2017.