Load OpenGrid sample data

This notebook shows how to load the sample data and make a simple plot.


In [ ]:
import opengrid as og

In [ ]:
# list available datasets
og.datasets.list_available()

In [ ]:
# load the hourly gas consumption for 2016
df = og.datasets.get('gas_2016_hour')
df.info()

Make a few plots


In [ ]:
%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = 12, 6

In [ ]:
# use the pandas wrapper for matplotlib plot
df.plot()
df.plot(subplots=True)

In [ ]:
# Create monthly data and plot
df_month = df.resample(rule='MS').sum()/1000 # from Wh to kWh
df_month.plot(kind='bar')

In [ ]: