#load support functions
import observations.obs_processing as obs
import features.feature_ts as ts
import features.feature_socios as socios

#initiate offline plotting for plotly
import plotly.offline as offline
import cufflinks as cf
offline.init_notebook_mode()
#cf.set_config_file(offline=True, world_readable=False, theme='ggplot')
#cf.go_offline()

"""
Explanation: Domestic Load Research Programme Load Profile Uncertainty Analysis
This notebook requires access to a directory with hourly load profile data. The data files must be saved in /data/profiles/hourly.
End of explanation
"""


a94 = obs.loadProfiles(1994,'A','H')

a94.head()

df = a94.pivot_table(columns='ProfileID',index='Datefield',values='Unitsread')
df.iloc[:10,:10]

fig = df.iplot(kind='scatter', asFigure=True) 
offline.iplot(fig)

"""
Explanation: Exploring Profiles
End of explanation
"""


obs.nanAnalysis(2001, 'A', 'H')

obs.nanAnalysis(2001, 'V', 'H', threshold = 0.9)

"""
Explanation: Exploring missing values in customer load data
End of explanation
"""


socios.recorderLocations(2000)

ts.aggTs(2012, 'A', 'M', locstring='VLK')[:20]

"""
Explanation: Aggregating load profile data
End of explanation
"""


