Skip to content

Commit

Permalink
add sources to dsm time series tables metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
khelfen committed Apr 13, 2023
1 parent 8b758da commit 990e544
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 13 deletions.
33 changes: 30 additions & 3 deletions src/egon/data/datasets/DSM_cts_ind.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
license_odbl,
meta_metadata,
oep_metadata_version,
sources,
)

# CONSTANTS
Expand Down Expand Up @@ -242,15 +243,36 @@ def add_metadata_individual():
"egon_sites_ind_load_curves_individual_dsm_timeseries": ["site_id"],
}

sources_dict = {
"egon_etrago_electricity_cts_dsm_timeseries": [
sources()["nep2021"],
sources()["zensus"],
],
"egon_osm_ind_load_curves_individual_dsm_timeseries": [
sources()["hotmaps_industrial_sites"],
sources()["schmidt"],
sources()["seenergies"],
],
"egon_demandregio_sites_ind_electricity_dsm_timeseries": [
sources()["openstreetmap"],
],
"egon_sites_ind_load_curves_individual_dsm_timeseries": [
sources()["hotmaps_industrial_sites"],
sources()["openstreetmap"],
sources()["schmidt"],
sources()["seenergies"],
],
}

contris = contributors(["kh", "kh"])

contris[0]["date"] = "2023-03-17"

contris[0]["object"] = "metadata"
contris[1]["object"] = "dataset"

contris[0]["comment"] = "add metadata to dataset."
contris[1]["comment"] = "Add worflow to generate dataset."
contris[0]["comment"] = "Add metadata to dataset."
contris[1]["comment"] = "Add workflow to generate dataset."

for t_dict in targets.values():
schema = t_dict["schema"]
Expand Down Expand Up @@ -281,7 +303,12 @@ def add_metadata_individual():
"aggregationType": "average",
},
},
"sources": [],
"sources": [
sources()["egon-data"],
sources()["vg250"],
sources()["demandregio"],
]
+ sources_dict[table],
"licenses": [license_odbl("© eGon development team")],
"contributors": contris,
"resources": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ def add_metadata():
contris[0]["object"] = "metadata"
contris[1]["object"] = "dataset"

contris[0]["comment"] = "add metadata to dataset."
contris[1]["comment"] = "Add worflow to generate dataset."
contris[0]["comment"] = "Add metadata to dataset."
contris[1]["comment"] = "Add workflow to generate dataset."

table = "egon_ev_metadata"
name = f"{schema}.{table}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def add_metadata():
contris[0]["object"] = "metadata"
contris[1]["object"] = "dataset"

contris[0]["comment"] = "add metadata to dataset."
contris[1]["comment"] = "Add worflow to generate dataset."
contris[0]["comment"] = "Add metadata to dataset."
contris[1]["comment"] = "Add workflow to generate dataset."

meta = {
"name": "grid.egon_emob_charging_infrastructure",
Expand Down
4 changes: 2 additions & 2 deletions src/egon/data/datasets/power_plants/mastr_db_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ def add_metadata():
contris[0]["object"] = "metadata"
contris[1]["object"] = "dataset"

contris[0]["comment"] = "add metadata to dataset."
contris[1]["comment"] = "Add worflow to generate dataset."
contris[0]["comment"] = "Add metadata to dataset."
contris[1]["comment"] = "Add workflow to generate dataset."

for technology in technologies:
target_table = target_tables[technology]
Expand Down
4 changes: 2 additions & 2 deletions src/egon/data/datasets/power_plants/pv_rooftop_buildings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2132,8 +2132,8 @@ def add_metadata():
contris[0]["object"] = "metadata"
contris[1]["object"] = "dataset"

contris[0]["comment"] = "add metadata to dataset."
contris[1]["comment"] = "Add worflow to generate dataset."
contris[0]["comment"] = "Add metadata to dataset."
contris[1]["comment"] = "Add workflow to generate dataset."

meta = {
"name": name,
Expand Down
4 changes: 2 additions & 2 deletions src/egon/data/datasets/storages/home_batteries.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ def add_metadata():
contris[0]["object"] = "metadata"
contris[1]["object"] = "dataset"

contris[0]["comment"] = "add metadata to dataset."
contris[1]["comment"] = "Add worflow to generate dataset."
contris[0]["comment"] = "Add metadata to dataset."
contris[1]["comment"] = "Add workflow to generate dataset."

meta = {
"name": (
Expand Down

0 comments on commit 990e544

Please sign in to comment.