#Import statements
import benchmark.bm0 as bm0

"""
Explanation: Domestic Load Research Programme Expert Model Extracted from DPET
This notebook requires access to a data directory with data extracted from the Demand Planning & Electrification Tool (DPET). The data files must be in the directory on the path /data/dpet/ .
This expert model has been extracted from DPET according to Table 6 set out in the Geo-based Load Forecast Standard (p.47) using software released with 2013 data and the following user input settings:
* 2011 income values
* all default settings
The following geographic locations were selected to obtain the hourly profile and summary datasets for each class:

rural: Westrand District Municipality (R1000 mean income)
village: Westrand District Municipality (R1000 mean income)
informal settlement: City of Johannesburg Metro (R2000 mean income)
township: City of Johannesburg Metro (R5500 mean income)
urban residential (lsm7): City of Johannesburg Metro (R10 000 mean income)
urban residential (lsm8-9): City of Johannesburg Metro (R18 000 mean income)
urban townhouse (lsm7-8): City of Johannesburg Metro (R15 500 mean income) 

DPET does not provide data for urban townhouse (lsm9-10) and urban estate (lsm10+) consumers (above R20k monthly income).
End of explanation
"""


[print(c) for c in bm0.expertDemandSummary()['class'].unique()]

bm0.expertDemandSummary().head()

bm0.plotBmDemandSummary('township')
bm0.plot15YearBmDemandSummary()

"""
Explanation: Interrogate Summary Class Data
End of explanation
"""


bm0.bmHourlyProfiles()[100:110]

bm0.plotBmHourlyProfiles(customer_class = 'informal_settlement', year_list = [1, 7, 15], daytype = 'Weekday')

bm0.plotBmHourlyProfiles(customer_class = 'urban_res_7', year_list = [1, 7, 15], daytype = 'Weekday')

bm0.plotBmHourlyProfiles(customer_class = 'urban_res_8-9', year_list = [1, 3, 7], daytype = 'Weekday')

"""
Explanation: Interrogate Hourly Profile Data
End of explanation
"""


