Skip to content

Commit

Permalink
Merge features/#381 into CI branch
Browse files Browse the repository at this point in the history
  • Loading branch information
IlkaCu committed Dec 2, 2021
2 parents 652bcc8 + 58e3d51 commit 75be621
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ Changed
`#540 <https://github.com/openego/eGon-data/issues/540>`_
* Migrate zensus scripts to datasets
`#422 <https://github.com/openego/eGon-data/issues/422>`_
* Add household demand profiles to etrago table
`#381 <https://github.com/openego/eGon-data/issues/381>`_


Bug fixes
Expand Down
5 changes: 4 additions & 1 deletion src/egon/data/datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,9 @@ etrago_electricity:
cts_curves:
schema: 'demand'
table: 'egon_etrago_electricity_cts'
household_curves:
schema: 'demand'
table: 'egon_etrago_electricity_households'
targets:
etrago_load:
schema: 'grid'
Expand Down Expand Up @@ -842,7 +845,7 @@ generators_etrago:
etrago_gen_time:
schema: 'grid'
table: 'egon_etrago_generator_timeseries'

weather_BusID:
sources:
power_plants:
Expand Down
14 changes: 12 additions & 2 deletions src/egon/data/datasets/electricity_demand_etrago.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,19 @@ def demands_per_bus(scenario):
index_col="bus",
)

# Select data on household electricity demands per bus

hh_curves = db.select_dataframe(
f"""SELECT bus_id, p_set FROM
{sources['household_curves']['schema']}.
{sources['household_curves']['table']}
WHERE scn_name = '{scenario}'""",
index_col="bus_id",
)

# Create one df by appending all imported dataframes

demand_curves = cts_curves.append([ind_curves_osm, ind_curves_sites])
demand_curves = cts_curves.append([ind_curves_osm, ind_curves_sites, hh_curves])

# Split array to single columns in the dataframe
demand_curves_split = demand_curves
Expand Down Expand Up @@ -187,7 +197,7 @@ class ElectricalLoadEtrago(Dataset):
def __init__(self, dependencies):
super().__init__(
name="Electrical_load_etrago",
version="0.0.3",
version="0.0.4",
dependencies=dependencies,
tasks=(export_to_db,),
)

0 comments on commit 75be621

Please sign in to comment.