From 23241c2fe5b5b301474de42a229e5b5e619ee8d9 Mon Sep 17 00:00:00 2001 From: Sven Eggimann Date: Mon, 24 Sep 2018 13:29:56 +0100 Subject: [PATCH] fixed error in minimum_setup --- energy_demand/read_write/data_loader.py | 5 --- energy_demand/scripts/s_post_installation.py | 1 - energy_demand/scripts/s_write_dummy_data.py | 44 +++++++------------- 3 files changed, 15 insertions(+), 35 deletions(-) diff --git a/energy_demand/read_write/data_loader.py b/energy_demand/read_write/data_loader.py index 59db01e1..0cd681b1 100644 --- a/energy_demand/read_write/data_loader.py +++ b/energy_demand/read_write/data_loader.py @@ -9,7 +9,6 @@ import numpy as np import pandas as pd import geopandas -import shapefile from shapely.geometry import Point import matplotlib.pyplot as plt @@ -472,10 +471,6 @@ def get_local_paths(path): path, '_processed_data', '_post_installation_data'), 'data_processed_disaggregated': os.path.join( path, '_processed_data', '_post_installation_data', 'disaggregated'), - 'dir_changed_weather_station_data': os.path.join( - path, '_processed_data', '_post_installation_data', 'weather_station_data'), - 'changed_weather_station_data': os.path.join( - path, '_processed_data', '_post_installation_data', 'weather_station_data', 'weather_stations.csv'), 'weather_data': os.path.join( path, '_raw_data', 'A-temperature_data', 'cleaned_weather_stations_data'), 'load_profiles': os.path.join( diff --git a/energy_demand/scripts/s_post_installation.py b/energy_demand/scripts/s_post_installation.py index 17917b9f..ea50db20 100644 --- a/energy_demand/scripts/s_post_installation.py +++ b/energy_demand/scripts/s_post_installation.py @@ -67,7 +67,6 @@ def post_install_setup(args): folders_to_create = [ data['local_paths']['data_processed'], data['local_paths']['path_post_installation_data'], - data['local_paths']['dir_changed_weather_station_data'], data['local_paths']['load_profiles'], data['local_paths']['rs_load_profile_txt'], data['local_paths']['ss_load_profile_txt'], diff --git a/energy_demand/scripts/s_write_dummy_data.py b/energy_demand/scripts/s_write_dummy_data.py index 6c3e1039..2867c5e8 100644 --- a/energy_demand/scripts/s_write_dummy_data.py +++ b/energy_demand/scripts/s_write_dummy_data.py @@ -11,19 +11,6 @@ from energy_demand.assumptions import general_assumptions from energy_demand.basic import lookup_tables -def dummy_raw_weather_station(local_paths): - """Write dummy weater station for a single weather station - """ - create_folders_to_file(local_paths['folder_path_weater_stations'], "_raw_data") - - rows = [ - ['headers', 'headers', 'headers'], - ['station_Nr_999', '50.035', '-5.20803']] - - write_data.create_csv_file( - local_paths['changed_weather_station_data'], - rows) - def create_folders_to_file(path_to_file, attr_split): """ """ @@ -41,14 +28,23 @@ def create_folders_to_file(path_to_file, attr_split): basic_functions.create_folder(path_curr_folder) def dummy_sectoral_load_profiles(local_paths, path_main): + """Create dummy sectoral load profiles + + Arguments + --------- + local_paths : dict + Paths + path_main : str + Main path """ - """ - create_folders_to_file(os.path.join(local_paths['ss_load_profile_txt'], "dumm"), "_processed_data") + create_folders_to_file( + os.path.join(local_paths['ss_load_profile_txt'], "dumm"), "_processed_data") paths = data_loader.load_paths(path_main) - lu = lookup_tables.basic_lookups() + lookups = lookup_tables.basic_lookups() - dict_enduses, dict_sectors, dict_fuels = data_loader.load_fuels(lu['submodels_names'], paths, lu) + dict_enduses, dict_sectors, dict_fuels = data_loader.load_fuels( + lookups['submodels_names'], paths, lookups['fueltypes_nr']) for enduse in dict_enduses['service']: for sector in dict_sectors['service']: @@ -99,7 +95,6 @@ def post_install_setup_minimum(args): basic_functions.create_folder(raw_folder) basic_functions.create_folder(processed_folder) basic_functions.create_folder(local_paths['path_post_installation_data']) - basic_functions.create_folder(local_paths['dir_changed_weather_station_data']) basic_functions.create_folder(local_paths['load_profiles']) basic_functions.create_folder(local_paths['rs_load_profile_txt']) basic_functions.create_folder(local_paths['ss_load_profile_txt']) @@ -130,19 +125,10 @@ def post_install_setup_minimum(args): # Create not publica available files # ========================================== - # -------- - # Generate dummy weather stations - # -------- - dummy_raw_weather_station(local_paths) - - # -------- - # Generate dummy temperatures - # -------- - dummy_raw_weather_data(local_paths) - # -------- # Dummy service sector load profiles # -------- - dummy_sectoral_load_profiles(local_paths, path_energy_demand) + dummy_sectoral_load_profiles( + local_paths, path_energy_demand) print("Successfully finished post installation setup with open source data")