diff --git a/energy_demand/basic/date_prop.py b/energy_demand/basic/date_prop.py index 1f23ff2b..de181268 100644 --- a/energy_demand/basic/date_prop.py +++ b/energy_demand/basic/date_prop.py @@ -32,6 +32,26 @@ def convert_h_to_day_year_and_h(hour): return day, day_h +def get_8760_hrs_from_yeardays(yeardays): + """Get from yeadays all yearhours + + Arguments + --------- + yeardays : list + Listh with year days (0 - 364) + + Returns + --------- + year_hrs : list + All year hours (0 - 8759) + """ + year_hrs = [] + for day in yeardays: + hrs = list(range((day * 24), ((day + 1) * 24))) + year_hrs += hrs + + return year_hrs + def get_seasonal_weeks(): """ """ diff --git a/energy_demand/enduse_func.py b/energy_demand/enduse_func.py index cf3329db..a2ec3315 100644 --- a/energy_demand/enduse_func.py +++ b/energy_demand/enduse_func.py @@ -1096,13 +1096,13 @@ def apply_scenario_drivers( by_driver_data = gva_per_head[base_yr][region] cy_driver_data = gva_per_head[curr_yr][region] - logging.info("gva {} {}".format(by_driver_data, cy_driver_data)) + #logging.info("gva {} {}".format(by_driver_data, cy_driver_data)) elif scenario_driver == 'population': by_driver_data = population[base_yr][region] cy_driver_data = population[curr_yr][region] - logging.info("pop {} {}".format(population[base_yr][region], population[curr_yr][region])) + #logging.info("pop {} {}".format(population[base_yr][region], population[curr_yr][region])) # Multiply drivers by_driver *= by_driver_data @@ -1118,15 +1118,9 @@ def apply_scenario_drivers( except ZeroDivisionError: factor_driver = 1 - logging.info(" eda {} {} {} {}".format( - scenario_drivers, - factor_driver, - by_driver_data, - cy_driver_data + #logging.info(" eda {} {} {} {}".format( + # scenario_drivers, factor_driver, by_driver_data, cy_driver_data)) - )) - - fuel_y = fuel_y * factor_driver else: """Scenario driver calculation based on dwelling stock diff --git a/energy_demand/plotting/fig_p2_spatial_val.py b/energy_demand/plotting/fig_p2_spatial_val.py index 5669ee70..c0f7d271 100644 --- a/energy_demand/plotting/fig_p2_spatial_val.py +++ b/energy_demand/plotting/fig_p2_spatial_val.py @@ -1,5 +1,6 @@ """ """ +import os import operator import logging import numpy as np @@ -71,11 +72,11 @@ def run( subnational_elec, regions, 'electricity', - fig_path=fig_path, + fig_path=os.path.join(fig_path, "spatial_validation_electricity.pdf"), label_points=False, plotshow=plot_crit) - # Gas TODO + # Gas plot_spatial_validation( simulation_yr_to_plot, fuel_gas_regs_yh, @@ -83,7 +84,7 @@ def run( subnational_gas, regions, 'gas', - fig_path=fig_path, + fig_path=os.path.join(fig_path, "spatial_validation_gas.pdf"), label_points=False, plotshow=plot_crit) @@ -244,7 +245,6 @@ def plot_spatial_validation( for region_vals in y_modelled_demands_non_regional: station_vals.append(region_vals[station_nr]) - plt.plot( x_values, station_vals, @@ -377,7 +377,7 @@ def plot_spatial_validation( # Tight layout plt.margins(x=0) plt.tight_layout() - #plt.savefig(fig_name) + plt.savefig(fig_path) if plotshow: plt.show() diff --git a/energy_demand/plotting/fig_p2_temporal_validation.py b/energy_demand/plotting/fig_p2_temporal_validation.py index ef2daae5..a9d8a8c2 100644 --- a/energy_demand/plotting/fig_p2_temporal_validation.py +++ b/energy_demand/plotting/fig_p2_temporal_validation.py @@ -2,14 +2,13 @@ """ import numpy as np import matplotlib.pyplot as plt -#from scipy.stats import mstats import pandas as pd from scipy import stats from energy_demand.technologies import tech_related from energy_demand.plotting import basic_plot_functions -def run( +def run_fig_p2_temporal_validation( data_input, weather_yr, fueltype_str, @@ -18,18 +17,20 @@ def run( validation_elec_2015, non_regional_elec_2015, fig_name, + titel="titel", + y_lim_val=100, + plot_validation=False, plot_show=False ): """ """ - # Select period and fueltype fueltype_int = tech_related.get_fueltype_int(fueltype_str) # ----------------------------------------------------------- # Iterate overall weather_yrs and store data in dataframe # (columns = timestep, rows: value of year) # ----------------------------------------------------------- - columns = period_h # hours in 8760 hours + selection_hours = period_h # List of selected data for every weather year (which is then converted to array) weather_yrs_data = [] @@ -40,7 +41,7 @@ def run( # Weather year specific data data_input_fueltype = data_weather_yr[simulation_yr_to_plot][fueltype_int] # Select fueltype data_input_reshape = data_input_fueltype.reshape(8760) # reshape - data_input_selection_hrs = data_input_reshape[period_h] # select period + data_input_selection_hrs = data_input_reshape[selection_hours] # select period weather_yrs_data.append(data_input_selection_hrs) weather_yrs_full_year.append(data_input_reshape) @@ -48,7 +49,7 @@ def run( weather_yrs_data = np.array(weather_yrs_data) # Create dataframe - df = pd.DataFrame(weather_yrs_data, columns=columns) + df = pd.DataFrame(weather_yrs_data, columns=period_h) df_full_year = pd.DataFrame(weather_yrs_full_year, columns=range(8760)) @@ -64,13 +65,10 @@ def run( df_q_95 = df_q_95.T df_q_05 = df_q_05.T - fig = plt.figure() #(figsize = cm2inch(10,10)) + fig = plt.figure() ax = fig.add_subplot(111) - # 2015 weather year - #data_2015 = data_weather_yr[2015][fueltype_int].reshape(8760)[period_h] - # --------------- # Smoothing lines # --------------- @@ -82,7 +80,6 @@ def run( period_h_smoothed = period_h df_q_95_smoothed = df_q_95 df_q_05_smoothed = df_q_05 - #data_2015_smoothed = data_2015 #plt.plot(period_h_smoothed, data_2015_smoothed, color='tomato', linestyle='-', linewidth=2, label="2015 weather_yr") plt.plot(period_h_smoothed, df_q_05_smoothed, color='black', linestyle='--', linewidth=0.5, label="0.05") @@ -95,30 +92,54 @@ def run( period_h_smoothed, #x df_q_95_smoothed, #y1 df_q_05_smoothed, #y2 - alpha=.25, - facecolor="grey", + alpha=1, + facecolor="lightgrey", label="uncertainty band") # ----------------- - # Validation data + # All weather stations are used for this data # ----------------- - validation_2015 = validation_elec_2015.reshape(8760)[period_h] - - try: - period_h_smoothed, validation_2015_smoothed = basic_plot_functions.smooth_data(period_h, validation_2015, num=40000) - except: - period_h_smoothed = period_h - validation_2015_smoothed = validation_2015 - - plt.plot( - period_h_smoothed, - validation_2015_smoothed, - color='green', linestyle='--', linewidth=3, label="validation 2015") + all_weather_stations_2015 = non_regional_elec_2015.reshape(8760)[period_h] # ----------------- - # All weather stations are used for this data + # Validation data # ----------------- - all_weather_stations_2015 = non_regional_elec_2015.reshape(8760)[period_h] + if plot_validation: + validation_2015 = validation_elec_2015.reshape(8760)[selection_hours] + + try: + period_h_smoothed, validation_2015_smoothed = basic_plot_functions.smooth_data(period_h, validation_2015, num=40000) + except: + period_h_smoothed = period_h + validation_2015_smoothed = validation_2015 + + plt.plot( + period_h_smoothed, + validation_2015_smoothed, + color='green', + linestyle='--', + linewidth=1.5, label="validation 2015") + + # ----------- + # statistics + # ----------- + # Calculate mean of all all single station runs + mean_all_single_runs = df_full_year.mean(axis=0).tolist() + mean_all_single_runs = np.array(mean_all_single_runs)[period_h] + + slope, intercept, r_value, p_value, std_err = stats.linregress( + validation_2015, + all_weather_stations_2015) + slope, intercept, r_value2, p_value, std_err = stats.linregress( + validation_2015, + mean_all_single_runs) + + print("R_Value_all_stations: " + str(r_value)) + print("R_Value_single_stations: " + str(r_value2)) + plt.title( + "R_value: all stations: {} mean_single_weather_stations: {}".format( + round(r_value, 2), + round(r_value2, 2))) try: period_h_smoothed, all_weather_stations_2015_smoothed = basic_plot_functions.smooth_data( @@ -127,36 +148,25 @@ def run( period_h_smoothed = period_h all_weather_stations_2015_smoothed = all_weather_stations_2015 - # ----------- - # statistics - # ----------- - # Calculate mean of all all single station runs - mean_all_single_runs = df_full_year.mean(axis=0).tolist() - mean_all_single_runs = np.array(mean_all_single_runs) - - slope, intercept, r_value, p_value, std_err = stats.linregress( - validation_2015, - all_weather_stations_2015) - slope, intercept, r_value2, p_value, std_err = stats.linregress( - validation_2015, - mean_all_single_runs) - - print("R_Value_all_stations: " + str(r_value)) - print("R_Value_single_stations: " + str(r_value2)) - - plt.title( - "R_value: all stations: {} mean_single_weather_stations: {}".format( - round(r_value, 2), - round(r_value2, 2))) - plt.plot( period_h_smoothed, all_weather_stations_2015_smoothed, color='blue', linestyle='--', - linewidth=1, - label="all weather stations 2015") - + linewidth=1.2, + label="all stations") + + # Ticks for single day + #major_ticks_days, major_ticks_labels = get_date_strings( + # days_to_plot, + # daystep=1) + #plt.xticks(major_ticks_days, major_ticks_labels) + zero_entry = period_h[0] + plt.xticks([0 + zero_entry, 5 + zero_entry, 11 + zero_entry, 17 + zero_entry, 23 + zero_entry], ['1', '6', '12', '18', '24']) + + plt.ylim(0, y_lim_val) + plt.xlim(period_h[0], period_h[-1]) + plt.title("Peak day: " + str(titel)) plt.legend( prop={ 'family':'arial', diff --git a/energy_demand/plotting/fig_spatial_distribution_of_peak.py b/energy_demand/plotting/fig_spatial_distribution_of_peak.py index 6c9b0bba..3456daba 100644 --- a/energy_demand/plotting/fig_spatial_distribution_of_peak.py +++ b/energy_demand/plotting/fig_spatial_distribution_of_peak.py @@ -15,7 +15,7 @@ from energy_demand.plotting import result_mapping from energy_demand.plotting import fig_p2_weather_val -def run( +def run_fig_spatial_distribution_of_peak( scenarios, path_to_folder_with_scenarios, path_shapefile, @@ -48,12 +48,9 @@ def run( # ----------- # Used across different plots # ----------- - - #Fueltype to consider fueltype_str = 'electricity' fueltype_int = tech_related.get_fueltype_int(fueltype_str) - #results_container['ed_fueltype_regs_yh'] container = {} container['abs_demand_in_peak_h'] = {} container['p_demand_in_peak_h'] = {} @@ -69,8 +66,6 @@ def run( data['assumptions']['seasons'] = date_prop.get_season(year_to_model=2015) data['assumptions']['model_yeardays_daytype'], data['assumptions']['yeardays_month'], data['assumptions']['yeardays_month_days'] = date_prop.get_yeardays_daytype(year_to_model=2015) - path_out_plots = os.path.abspath(os.path.join(path_data_ed, '..', '_results_PDF_figs')) - # Population population_data = read_data.read_scenaric_population_data(os.path.join(path_data_ed, 'model_run_pop')) diff --git a/energy_demand/plotting/figs_p2.py b/energy_demand/plotting/figs_p2.py index f85c7c2a..51a50c6d 100644 --- a/energy_demand/plotting/figs_p2.py +++ b/energy_demand/plotting/figs_p2.py @@ -14,6 +14,7 @@ from energy_demand.technologies import tech_related from energy_demand.plotting import fig_p2_annual_hours_sorted from energy_demand.plotting import fig_p2_spatial_val +from energy_demand import enduse_func def main( path_data_ed, @@ -84,32 +85,7 @@ def main( weather_yr_container['tot_fueltype_yh'][weather_yr] = results_container['tot_fueltype_yh'] #tot_fueltype_yh weather_yr_container['results_enduse_every_year'][weather_yr] = results_container['ed_fueltype_regs_yh'] - # #################################################################### - # Plot demand over time and peak over time (for modassar paper) - # #################################################################### - if plot_crit_dict['plot_weather_day_year']: - - # -------------------------------------------- - # Plot peak demand and total demand per fueltype - # -------------------------------------------- - for fueltype_str in data['lookups']['fueltypes'].keys(): - - fig_total_demand_peak.run( - data_input=weather_yr_container['tot_fueltype_yh'], - fueltype_str=fueltype_str, - fig_name=os.path.join( - path_out_plots, "tot_{}_h.pdf".format(fueltype_str))) - - # plot over period of time across all weather scenario - fig_weather_variability_priod.run( - data_input=weather_yr_container['tot_fueltype_yh'], - fueltype_str='electricity', - simulation_yr_to_plot=2015, # Simulation year to plot - period_h=list(range(200,500)), #period to plot - fig_name=os.path.join( - path_out_plots, "weather_var_period.pdf")) - - # #################################################################### + '''# #################################################################### # Spatial maps of weather variability # #################################################################### if plot_crit_dict['plot_spatial_weather_var_peak']: @@ -121,7 +97,7 @@ def main( population=population_data[2015], fueltype_str='electricity', path_shapefile=path_shapefile_input, - fig_name=os.path.join(path_out_plots, "fig_paper_IIb_weather_var_map.pdf")) + fig_name=os.path.join(path_out_plots, "fig_paper_IIb_weather_var_map.pdf"))''' # #################################################################### # Create plot with regional and non-regional plots for second paper @@ -235,19 +211,46 @@ def plot_fig_spatio_temporal_validation( # Compare regional and non regional and actual demand over time # ***************************************************************** simulation_yr_to_plot = 2015 - period_to_plot = list(range(0, 8760)) #TODO PLANE - winter_week, _, _, _ = date_prop.get_seasonal_weeks() - period_to_plot = winter_week - fig_p2_temporal_validation.run( + winter_week, spring_week, summer_week, autumn_week = date_prop.get_seasonal_weeks() + + # Peak day + peak_day, _ = enduse_func.get_peak_day_single_fueltype(elec_factored_yh) + + # Convert days to hours + period_to_plot = list(range(0, 400)) + period_to_plot = date_prop.get_8760_hrs_from_yeardays(winter_week) + period_to_plot = date_prop.get_8760_hrs_from_yeardays([peak_day]) + period_to_plot_winter = date_prop.get_8760_hrs_from_yeardays(winter_week) + period_to_plot_spring = date_prop.get_8760_hrs_from_yeardays(spring_week) + + fig_p2_temporal_validation.run_fig_p2_temporal_validation( data_input=data_container['tot_fueltype_yh'], weather_yr=2015, fueltype_str='electricity', simulation_yr_to_plot=simulation_yr_to_plot, # Simulation year to plot - period_h=period_to_plot, #period to plot + period_h=period_to_plot, validation_elec_2015=elec_factored_yh, non_regional_elec_2015=non_regional_elec_2015, - fig_name=os.path.join(path_out_plots, "temporal_validation.pdf"), + fig_name=os.path.join(path_out_plots, "temporal_validation_elec.pdf"), + titel="yearday: {}".format(peak_day), + y_lim_val=55, + plot_validation=False, + plot_show=plot_show) + + fueltype_gas = tech_related.get_fueltype_int('gas') + fig_p2_temporal_validation.run_fig_p2_temporal_validation( + data_input=data_container['tot_fueltype_yh'], + weather_yr=2015, + fueltype_str='gas', + simulation_yr_to_plot=simulation_yr_to_plot, # Simulation year to plot + period_h=period_to_plot, + validation_elec_2015=None, + non_regional_elec_2015=tot_fueltype_yh[year_non_regional][fueltype_gas], + fig_name=os.path.join(path_out_plots, "temporal_validation_gas.pdf"), + titel="yearday: {}".format(peak_day), + y_lim_val=250, + plot_validation=False, plot_show=plot_show) # ------------------- @@ -261,7 +264,7 @@ def plot_fig_spatio_temporal_validation( demand_year_non_regional=demand_year_non_regional['residential_results'][weather_yr], demand_year_regional=data_container['residential_results'][weather_yr], fueltypes=data['lookups']['fueltypes'], - fig_path=os.path.join(path_out_plots, "spatial_validation.pdf"), + fig_path=path_out_plots, path_temporal_elec_validation=path_temporal_elec_validation, path_temporal_gas_validation=path_temporal_gas_validation, regions=data['regions'], diff --git a/energy_demand/result_processing/paper_II.py b/energy_demand/result_processing/paper_II.py index e03d02cd..0e4f1875 100644 --- a/energy_demand/result_processing/paper_II.py +++ b/energy_demand/result_processing/paper_II.py @@ -115,7 +115,6 @@ def paper_II_plots( #################################################################### if plot_crit_dict['plot_spatial_distribution_of_peak']: - # Select simulation years simulation_yrs = [2015, 2050] @@ -123,7 +122,7 @@ def paper_II_plots( field_to_plot = "std_deviation_p_demand_peak_h" #field_to_plot = "std_deviation_abs_demand_peak_h" - fig_spatial_distribution_of_peak.run( + fig_spatial_distribution_of_peak.run_fig_spatial_distribution_of_peak( only_scenarios, path_to_folder_with_scenarios, path_shapefile_input, @@ -131,36 +130,14 @@ def paper_II_plots( field_to_plot=field_to_plot, fig_path=os.path.join(path_to_folder_with_scenarios, '_results_PDF_figs')) - raise Exception ("SSSSSSSSSSSS") + print("Finihsed") + raise Exception("Finished") + #################################################################### - # + # left overs #################################################################### for scenario in only_scenarios: - # ----------- - # plot where spatio-temporal comparison between national and regional - # ----------- - path_regional_calculations = "C:/Users/cenv0553/ed/results/_for_FIG2a/_regional_calculations" - path_rolling_elec_demand = os.path.join( - "C:/Users/cenv0553/ed/energy_demand/energy_demand/config_data", - '01-validation_datasets', '01_national_elec_2015', 'elec_demand_2015.csv') - path_temporal_elec_validation = os.path.join( - "C:/Users/cenv0553/ed/energy_demand/energy_demand/config_data", - '01-validation_datasets', '02_subnational_elec', 'data_2015_elec_domestic.csv') - path_temporal_gas_validation = os.path.join( - "C:/Users/cenv0553/ed/energy_demand/energy_demand/config_data", - '01-validation_datasets', '03_subnational_gas', 'data_2015_gas_domestic.csv') - path_non_regional_elec_2015 = os.path.abspath( - os.path.join(path_regional_calculations, '..', "_non_regional_calculations_2015")) - - # Plot figure national an regional validation comparison - '''figs_p2.plot_fig_spatio_temporal_validation( - path_regional_calculations=path_regional_calculations, - path_rolling_elec_demand=path_rolling_elec_demand, - path_temporal_elec_validation=path_temporal_elec_validation, - path_temporal_gas_validation=path_temporal_gas_validation, - path_non_regional_elec_2015=path_non_regional_elec_2015)''' - # ----------- # Other plots # ----------- @@ -170,6 +147,31 @@ def paper_II_plots( path_out_plots, plot_crit_dict) + # #################################################################### + # Plot demand over time and peak over time (for modassar paper) + # #################################################################### + '''if plot_crit_dict['plot_weather_day_year']: + + # -------------------------------------------- + # Plot peak demand and total demand per fueltype + # -------------------------------------------- + for fueltype_str in data['lookups']['fueltypes'].keys(): + + fig_total_demand_peak.run( + data_input=weather_yr_container['tot_fueltype_yh'], + fueltype_str=fueltype_str, + fig_name=os.path.join( + path_out_plots, "tot_{}_h.pdf".format(fueltype_str))) + + # plot over period of time across all weather scenario + fig_weather_variability_priod.run( + data_input=weather_yr_container['tot_fueltype_yh'], + fueltype_str='electricity', + simulation_yr_to_plot=2015, # Simulation year to plot + period_h=list(range(200,500)), #period to plot + fig_name=os.path.join( + path_out_plots, "weather_var_period.pdf"))''' + return if __name__ == '__main__': diff --git a/energy_demand/scripts/batch_commands_main.py b/energy_demand/scripts/batch_commands_main.py index 69ff4785..4bdd17db 100644 --- a/energy_demand/scripts/batch_commands_main.py +++ b/energy_demand/scripts/batch_commands_main.py @@ -9,9 +9,9 @@ def my_function(simulation_number): print('simulation_number ' + str(simulation_number)) - all_weather_stations = True + all_weather_stations = False - same_weather_yr = False + same_weather_yr = True defined_weather_yr = 2015 # -------------------------- @@ -47,7 +47,7 @@ def my_function(simulation_number): # =============================== #simulation_number = range(40) -simulation_number = range(0, 10) +simulation_number = range(0, 200) for i in simulation_number: my_function(i) diff --git a/energy_demand/validation/elec_national_data.py b/energy_demand/validation/elec_national_data.py index 41f11922..6acf218f 100644 --- a/energy_demand/validation/elec_national_data.py +++ b/energy_demand/validation/elec_national_data.py @@ -261,6 +261,7 @@ def compare_peak( """ logging.debug("...compare elec peak results") + real_elec_peak = np.copy(real_elec_2015_peak) # ------------------------------- # Compare values # ------------------------------- @@ -278,12 +279,12 @@ def compare_peak( linewidth=0.5, label='model') - x_smoothed, real_elec_2015_peak_smoothed = basic_plot_functions.smooth_data( - range(24), real_elec_2015_peak, num=500) + x_smoothed, real_elec_peak_smoothed = basic_plot_functions.smooth_data( + range(24), real_elec_peak, num=500) plt.plot( x_smoothed, - real_elec_2015_peak_smoothed, + real_elec_peak_smoothed, color='black', linestyle='-', linewidth=0.5, @@ -291,10 +292,10 @@ def compare_peak( #raise Exception # Calculate hourly differences in % - diff_p_h = np.round((100 / real_elec_2015_peak) * modelled_peak_dh, 1) + diff_p_h = np.round((100 / real_elec_peak) * modelled_peak_dh, 1) # Calculate maximum difference - max_h_real = np.max(real_elec_2015_peak) + max_h_real = np.max(real_elec_peak) max_h_modelled = np.max(modelled_peak_dh) max_h_diff = round((100 / max_h_real) * max_h_modelled, 2) diff --git a/energy_demand/validation/lad_validation.py b/energy_demand/validation/lad_validation.py index c38a9b2f..dbd67368 100644 --- a/energy_demand/validation/lad_validation.py +++ b/energy_demand/validation/lad_validation.py @@ -419,6 +419,9 @@ def spatio_temporal_val( elec_factored_yh = f_diff_elec * elec_2015_indo + logging.info("EKOLOGIT") + logging.info(elec_factored_yh[18]) + temporal_validation( result_paths, ed_fueltype_national_yh[fueltypes['electricity']], @@ -471,9 +474,11 @@ def spatio_temporal_val( # Peak across all fueltypes WARNING: Fueltype specific peak_day_all_fueltypes = enduse_func.get_peak_day_all_fueltypes(ed_fueltype_national_yh) + logging.info("Peak day 'peak_day_all_fueltypes': " + str(peak_day_all_fueltypes)) fueltype = fueltypes['electricity'] peak_day_electricity, _ = enduse_func.get_peak_day_single_fueltype(ed_fueltype_national_yh[fueltype]) + logging.info("Peak day 'peak_day_electricity': " + str(peak_day_electricity)) elec_national_data.compare_peak( "validation_peak_elec_day_all_fueltypes.pdf", @@ -494,7 +499,7 @@ def spatio_temporal_val( elec_national_data.compare_peak( "validation_elec_peak_day_{}.pdf".format(peak_day), result_paths['data_results_validation'], - elec_2015_indo[peak_day], + elec_factored_yh[peak_day], ed_fueltype_national_yh[fueltypes['electricity']][peak_day], peak_day) @@ -502,10 +507,21 @@ def spatio_temporal_val( elec_national_data.compare_peak( "validation_elec_peak_day_{}.pdf".format(peak_day), result_paths['data_results_validation'], - elec_2015_indo[peak_day], + elec_factored_yh[peak_day], ed_fueltype_national_yh[fueltypes['electricity']][peak_day], peak_day) + peak_day_real_electricity, _ = enduse_func.get_peak_day_single_fueltype(elec_2015_indo) + logging.info("Peak day 'peak_day_electricity': " + str(peak_day_real_electricity)) + + #raise Exception + elec_national_data.compare_peak( + "validation_elec_peak_day_{}.pdf".format(peak_day_real_electricity), + result_paths['data_results_validation'], + elec_factored_yh[peak_day], + ed_fueltype_national_yh[fueltypes['electricity']][peak_day_real_electricity], + peak_day_real_electricity) + # --------------------------------------------------- # Validate boxplots for every hour (temporal validation) # ---------------------------------------------------