diff --git a/Snakefile b/Snakefile index 5b2de322e..ee2dc01b1 100644 --- a/Snakefile +++ b/Snakefile @@ -269,6 +269,7 @@ rule base_network: hvdc_as_lines=config["electricity"]["hvdc_as_lines"], countries=config["countries"], base_network=config["base_network"], + cooking=config["cooking"]["stove"] # added link to config for cooking input: osm_buses="resources/" + RDIR + "base_network/all_buses_build_network.csv", osm_lines="resources/" + RDIR + "base_network/all_lines_build_network.csv", diff --git a/scripts/base_network.py b/scripts/base_network.py index 04e0c388d..98aec0ec8 100644 --- a/scripts/base_network.py +++ b/scripts/base_network.py @@ -124,6 +124,24 @@ def _load_buses_from_osm(fp_buses): # TODO: Drop NAN maybe somewhere else? buses = buses.dropna(axis="index", subset=["x", "y", "country"]) + # create a function to add the buses + stove = snakemake.params.cooking + x = [0,0,0,0,0,0] + y = [0,0,0,0,0,0] + geometry = ['NA','NA','NA','NA','NA','NA'] + country = ['ZM','ZM','ZM','ZM','ZM','ZM'] + tag_area = [0,0,0,0,0,0] + tag_substation = [0,0,0,0,0,0] + under_construction = [False,False,False,False,False,False] + symbol = ['substation','substation','substation','substation','substation','substation'] + v_nom = [0,0,0,0,0,0] + substation_lv = [False,False,False,False,False,False] + + stove_df = pd.DataFrame({'v_nom':v_nom, 'symbol':symbol, 'under_construction':under_construction, 'tag_substation':tag_substation, 'tag_area':tag_area, + 'lon':y, 'lat':x, 'country':country, 'geometry':geometry, 'substation_lv':substation_lv, 'carrier':stove, 'x':x,'y':y}) + + buses = pd.concat([buses, stove_df], ignore_index=True) # what worked + return buses