Have you ever seen this plot?
from IPython.display import Image Image(url='http://planetforlife.com/images/growinggap.jpg')
What this plot shows are historical discoveries of regular conventional oil (aka "oil fields") and production (aka "taking oil out of the oil field"). People who try to understand the world often think about this problem when they consider how much our current way of life is based on oil.
Ever since I first saw a version of this plot in a talk (this one), I've been wondering about this fascinating data. Since there is an oil field list page on Wikipedia, let's try to see if we can roughly replicate this curve.
The data for oil fields can be found here: https://en.wikipedia.org/wiki/List_of_oil_fields. Let's download the data and parse it into a table. We can do this with a little bit of manual fiddling using
import requests from bs4 import BeautifulSoup import pandas as pd
r = requests.get('https://en.wikipedia.org/wiki/List_of_oil_fields') tree = BeautifulSoup(r.text, 'html.parser') table = tree.find('table', class_='wikitable') df = pd.read_html(str(table), header=0)
|Field||Location||Discovered||Started production||Peaked||Recoverable oil, past and future (billion barrels)||Production (million barrels/day)||Rate of decline|
|0||Ghawar Field||Saudi Arabia||1948||1951||2005, disputed||88-104||5||8% per year|
|1||Burgan Field||Kuwait||1937||1948||2005||66-72||1.7||14% per year|
|2||Ahvaz Field||Iran||1958||NaN||1970s||65 (25 recoverable)||.750||NaN|
|3||Upper Zakum oil field||Abu Dhabi, UAE||1963||1982 (1967)||Production still increasing||50 (21 recoverable)||0.750||Extension planned to 1 MMb/d|
Now that we have this list of oil fields, we can do some elementary plot by country and year discovered.
import holoviews as hv hv.extension('bokeh')