Closed fhg-isi closed 4 months ago
Maybe adapt load_dataset
function in load_gas_network.py as shown below. Or fix structure of data.
def load_dataset(fn):
df = gpd.read_file(fn)
param = df.param.apply(json_string_to_series)
method_series = df.method.apply(json_string_to_series)
method = method_series[["diameter_mm", "max_cap_M_m3_per_d"]]
method.columns = method.columns + "_method"
df = pd.concat([df, param, method], axis=1)
to_drop = ["param", "uncertainty", "method", "tags"]
to_drop = df.columns.intersection(to_drop)
df.drop(to_drop, axis=1, inplace=True)
return df
def json_string_to_series(json_string):
data_dictionary = json.loads(json_string)
series = pd.Series(data_dictionary)
return series
Checklist
master
branch or the latest release. Please indicate.pypsa-eur
environment. Update viaconda env update -f envs/environment.yaml
.Describe the Bug
I tried to follow
https://pypsa-eur.readthedocs.io/en/latest/tutorial_sector.html#
and run
snakemake -call all --configfile config/test/config.overnight.yaml
Maybe format of
data/gas_network/scigrid-gas/data/IGGIELGN_PipeSegments.geojson
changed?Error Message