In [ ]:
    
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from opengrid import config
from opengrid.library import houseprint
c = config.Config()
%matplotlib inline
plt.rcParams['figure.figsize']=14,8
    
In [ ]:
    
hp = houseprint.Houseprint()
hp.init_tmpo()
    
In [ ]:
    
df = hp.get_data(sensortype='gas', unit='kW') 
df = df[df>0]
    
In [ ]:
    
# plot timeseries and load duration for each retained sensor
for sensor in df.columns:
    plt.figure()
    ax1=plt.subplot(121)
    plt.plot_date(df.index, df[sensor], '-', label=sensor)
    plt.ylabel('kW')
    plt.legend()
    
    ax2=plt.subplot(122)
    plt.plot(np.sort(df[sensor])[::-1], label=sensor)
    plt.ylabel('kW')
    plt.legend()
    
In [ ]: