Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add datasets for timeseries: industry heat demand med/high and heatpump cop med #27

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apipe/esys/esys/config/map_ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ load: {
"file": "demand_ind_heat_timeseries.csv",
},
"heat_med-demand_ind-profile": {
"dataset": "demand_heat_region",
"file": "demand_ind_heat_timeseries.csv",
"dataset": "demand_heat_ind_med_high",
"file": "demand_ind_heat_med_timeseries.csv",
},
"heat_high-demand_ind-profile": {
"dataset": "demand_heat_region",
"file": "demand_ind_heat_timeseries.csv",
"dataset": "demand_heat_ind_med_high",
"file": "demand_ind_heat_high_timeseries.csv",
}
}

Expand Down Expand Up @@ -91,7 +91,7 @@ efficiencies: {
"file": "heatpump_cop_timeseries.csv",
},
"electricity-heatpump_heat_med-profile": {
"dataset": "heatpump_cop",
"file": "heatpump_cop_timeseries.csv",
"dataset": "heatpump_cop_heat_med",
"file": "heatpump_cop_heat_med_timeseries.csv",
},
}
5 changes: 5 additions & 0 deletions apipe/store/datasets/demand_heat_ind_med_high/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############################################################################
# This file holds configuration parameters for the creation of this dataset. #
##############################################################################

# Further custom configuration goes here
25 changes: 25 additions & 0 deletions apipe/store/datasets/demand_heat_ind_med_high/create.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
Snakefile for this dataset

Note: To include the file in the main workflow, it must be added to the respective module.smk .
"""

import pandas as pd
from apipe.store.utils import get_abs_dataset_path

DATASET_PATH = get_abs_dataset_path("datasets", "demand_heat_ind_med_high")

rule prepare_demand_ind_heat_med_high_profiles:
"""
Copies industry heat demand time series of medium and high heat carrier to
datasets.
"""
input:
get_abs_dataset_path(
"raw", "industry_heat_profiles_med_high") / "data" /
"{carrier}-demand_ind-profile.csv"
output:
DATASET_PATH / "data" / "demand_ind_{carrier}_timeseries.csv",
run:
heat_timeseries = pd.read_csv(input[0], sep=";").demand_norm
heat_timeseries.to_csv(output[0])
Empty file.
4 changes: 4 additions & 0 deletions apipe/store/datasets/demand_heat_ind_med_high/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Name des Datensatzes

Eine kurze Beschreibung des Datensatzes.
Diese hilft der Dokumentation und bei der Erstellung des Berichts.
5 changes: 5 additions & 0 deletions apipe/store/datasets/heatpump_cop_heat_med/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############################################################################
# This file holds configuration parameters for the creation of this dataset. #
##############################################################################

# Further custom configuration goes here
23 changes: 23 additions & 0 deletions apipe/store/datasets/heatpump_cop_heat_med/create.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""
Snakefile for this dataset

Note: To include the file in the main workflow, it must be added to the respective module.smk .
"""
import pandas as pd
from apipe.store.utils import get_abs_dataset_path

DATASET_PATH = get_abs_dataset_path("datasets", "heatpump_cop_heat_med")

rule prepare_heatpump_cop_heat_med_profile:
"""
Copies heat pump cop time series of medium heat carrier to datasets.
"""
input:
get_abs_dataset_path(
"raw", "heatpump_cop_heat_med") / "data" /
"heatpump_cop_heat_med_timeseries.csv"
output:
DATASET_PATH / "data" / "heatpump_cop_heat_med_timeseries.csv",
run:
heat_timeseries = pd.read_csv(input[0]).cop
heat_timeseries.to_csv(output[0])
Empty file.
4 changes: 4 additions & 0 deletions apipe/store/datasets/heatpump_cop_heat_med/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Name des Datensatzes

Eine kurze Beschreibung des Datensatzes.
Diese hilft der Dokumentation und bei der Erstellung des Berichts.
10 changes: 10 additions & 0 deletions apipe/store/datasets/module.smk
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,21 @@ module heatpump_cop:
config: config["store"]["datasets"]["heatpump_cop"]
use rule * from heatpump_cop as datasets_heatpump_cop_*

module heatpump_cop_heat_med:
snakefile: "heatpump_cop_heat_med/create.smk"
config: config["store"]["datasets"]["heatpump_cop_heat_med"]
use rule * from heatpump_cop_heat_med as datasets_heatpump_cop_heat_med_*

module demand_heat_region:
snakefile: "demand_heat_region/create.smk"
config: config["store"]["datasets"]["demand_heat_region"]
use rule * from demand_heat_region as datasets_demand_heat_region_*

module demand_heat_ind_med_high:
snakefile: "demand_heat_ind_med_high/create.smk"
config: config["store"]["datasets"]["demand_heat_ind_med_high"]
use rule * from demand_heat_ind_med_high as datasets_demand_heat_ind_med_high_*

module renewable_feedin:
snakefile: "renewable_feedin/create.smk"
config: config["store"]["datasets"]["renewable_feedin"]
Expand Down
Empty file.
55 changes: 55 additions & 0 deletions apipe/store/raw/heatpump_cop_heat_med/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Name des Datensatzes

Eine kurze Beschreibung des Datensatzes.
Diese hilft der Dokumentation und bei der Erstellung des Berichts.

# Notizen (nur zur Information, nicht Teil des dataset.md files)

Benennungskonvention: `<quelle_datasetname>` (Kleinschreibung), z.B. ein
Datensatz zu Naturschutzgebieten des Bundesamtes für Naturschutz (BfN) könnte
`bfn_natural_reserves` heißen.

Was ist ein Datensatz? Es gibt verschiedene Definitionen, aber in dieser
Pipeline ist ein Datensatz eine Sammlung von Daten, die als eine Einheit
behandelt, welche aus mehreren Dateien bestehen und durch eine einzige
Metadaten-Datei identifiziert werden kann.

Beispiele:
- [OSM Germany](https://download.geofabrik.de/europe/germany-latest.osm.pbf)
- [ERA5 weather dataset](https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels?tab=overview)
- [BKG administrative areas](https://gdz.bkg.bund.de/index.php/default/verwaltungsgebiete-1-250-000-stand-01-01-vg250-01-01.html)

Rohdateien kommen in das Verzeichnis `data` und werden nach Möglichkeit nicht
umbenannt.

## Beschreibung

Bitte gib zumindest eine kurze Beschreibung:

- Worum geht es in dem Datensatz
- Gibt es Besonderheiten, die es zu wissen gilt? (neben Metadaten, welche
UNBEDINGT erstellt werden müssen, dazu unten mehr)

Eine schnelle und suboptimale Beschreibung ist besser als keine.

## Metadaten

Füge für jeden Roh-/Originaldatensatz, der erstellt wird, Metadaten zur
Beschreibung der Daten mit maschinenlesbaren Informationen hinzu.
Folge der [OEP](https://openenergy-platform.org/about/) Metadaten v1.5.1.
Es kann der [Metadata creator](https://meta.rl-institut.de/meta_creator/151)
verwendet werden.

Zum Vergleich die [metadata.json](metadata.json) in diesem Verzeichnis.

Alternativ kann sie auch manuell erstellt werden:
Folgen Sie
[dieses Beispiel](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/metadata/latest/example.json)
um zu verstehen, wie die Felder verwendet werden. Die Felder werden in der
[Open Energy Metadata Description](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/metadata/v141/metadata_key_description.md)
im Detail beschrieben. Bitte überprüfe, ob der Metadatenstring den OEP-Metadaten
Standards entspricht, indem das
[OMI-Tool](https://github.com/OpenEnergyPlatform/omi) verwendet wird.
Wenn der Metadatenstring konform ist, bringt OMI die Schlüssel in die richtige
Reihenfolge und gibt den vollständigen String aus (für den Export die Option
`-o` verwenden).
196 changes: 196 additions & 0 deletions apipe/store/raw/heatpump_cop_heat_med/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
{
"name": null,
"title": null,
"id": null,
"description": null,
"language": [
null
],
"subject": [
{
"name": null,
"path": null
}
],
"keywords": [
null
],
"publicationDate": null,
"context": {
"homepage": null,
"documentation": null,
"sourceCode": null,
"contact": null,
"grantNo": null,
"fundingAgency": null,
"fundingAgencyLogo": null,
"publisherLogo": null
},
"spatial": {
"location": null,
"extent": null,
"resolution": null
},
"temporal": {
"referenceDate": null,
"timeseries": [
{
"start": null,
"end": null,
"resolution": null,
"alignment": null,
"aggregationType": null
},
{
"start": null,
"end": null,
"resolution": null,
"alignment": null,
"aggregationType": null
}
]
},
"sources": [
{
"title": null,
"description": null,
"path": null,
"licenses": [
{
"name": null,
"title": null,
"path": null,
"instruction": null,
"attribution": null
}
]
},
{
"title": null,
"description": null,
"path": null,
"licenses": [
{
"name": null,
"title": null,
"path": null,
"instruction": null,
"attribution": null
}
]
}
],
"licenses": [
{
"name": null,
"title": null,
"path": null,
"instruction": null,
"attribution": null
}
],
"contributors": [
{
"title": null,
"email": null,
"date": null,
"object": null,
"comment": null
}
],
"resources": [
{
"profile": null,
"name": null,
"path": null,
"format": null,
"encoding": null,
"schema": {
"fields": [
{
"name": null,
"description": null,
"type": null,
"unit": null,
"isAbout": [
{
"name": null,
"path": null
}
],
"valueReference": [
{
"value": null,
"name": null,
"path": null
}
]
},
{
"name": null,
"description": null,
"type": null,
"unit": null,
"isAbout": [
{
"name": null,
"path": null
}
],
"valueReference": [
{
"value": null,
"name": null,
"path": null
}
]
}
],
"primaryKey": [
null
],
"foreignKeys": [
{
"fields": [
null
],
"reference": {
"resource": null,
"fields": [
null
]
}
}
]
},
"dialect": {
"delimiter": null,
"decimalSeparator": "."
}
}
],
"@id": null,
"@context": null,
"review": {
"path": null,
"badge": null
},
"metaMetadata": {
"metadataVersion": "OEP-1.5.2",
"metadataLicense": {
"name": "CC0-1.0",
"title": "Creative Commons Zero v1.0 Universal",
"path": "https://creativecommons.org/publicdomain/zero/1.0/"
}
},
"_comment": {
"metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata)",
"dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)",
"units": "Use a space between numbers and units (100 m)",
"languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)",
"licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)",
"review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/master/data-review/manual/review_manual.md)",
"null": "If not applicable use: null",
"todo": "If a value is not yet available, use: todo"
}
}
Empty file.
Loading