Skip to content

Commit

Permalink
fixed error in minimum_setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Eggimann committed Sep 24, 2018
1 parent 8ec17d4 commit 23241c2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 35 deletions.
5 changes: 0 additions & 5 deletions energy_demand/read_write/data_loader.py
Expand Up @@ -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

Expand Down Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion energy_demand/scripts/s_post_installation.py
Expand Up @@ -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'],
Expand Down
44 changes: 15 additions & 29 deletions energy_demand/scripts/s_write_dummy_data.py
Expand Up @@ -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):
"""
"""
Expand All @@ -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']:
Expand Down Expand Up @@ -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'])
Expand Down Expand Up @@ -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")

0 comments on commit 23241c2

Please sign in to comment.