Passed
Push — dev ( 7cf077...0e9721 )
by
unknown
07:11 queued 04:45
created

data.datasets.power_plants.metadata   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 266
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 161
dl 0
loc 266
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
B metadata() 0 252 1
1
"""Metadata for power plants table
2
"""
3
import datetime
4
import json
5
6
from egon.data import db
7
from egon.data.metadata import (
8
    license_agpl,
9
    license_ccby,
10
    licenses_datenlizenz_deutschland,
11
)
12
13
14
def metadata():
15
    """Add metdata to power plants table
16
17
    Returns
18
    -------
19
    None.
20
21
    """
22
    meta = {
23
        "name": "supply.egon_power_plants",
24
        "title": "supply.egon_power_plants",
25
        "id": "",
26
        "description": "Database of powerplants ",
27
        "language": "en-GB",
28
        "keywords": [],
29
        "publicationDate": datetime.date.today().isoformat(),
30
        "context": {
31
            "homepage": "https://ego-n.org/tools_data/",
32
            "documentation": "https://egon-data.readthedocs.io/en/latest/",
33
            "sourceCode": "https://github.com/openego/eGon-data",
34
            "contact": "https://ego-n.org/partners/",
35
            "grantNo": "03EI1002",
36
            "fundingAgency": "Bundesministerium für Wirtschaft und Energie",
37
            "fundingAgencyLogo": "https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=normal&v=3",
38
            "publisherLogo": "https://ego-n.org/images/eGon_logo_noborder_transbg.svg",
39
        },
40
        "spatial": {"location": "", "extent": "Germany", "resolution": ""},
41
        "sources": [
42
            {
43
                "title": '"open-MaStR power unit registry"',
44
                "description": "Raw data download Marktstammdatenregister (MaStR) data using the webservice. All data from the Marktstammdatenregister is included. There are duplicates included. For further information read in the documentationg of the original data source: https://www.marktstammdatenregister.de/MaStRHilfe/subpages/statistik.html",
45
                "path": "https://zenodo.org/record/10480958",
46
                "licenses": [
47
                    {
48
                        "name": licenses_datenlizenz_deutschland(
49
                            '"© 2021 Bundesnetzagentur für Elektrizität, Gas, Telekommunikation, Post und Eisenbahnen"'
50
                        ),
51
                        "title": "",
52
                        "path": "",
53
                        "instruction": "",
54
                        "attribution": "eGon developers",
55
                    }
56
                ],
57
            },
58
            {
59
                "title": '"ERA5 global reanalysis"',
60
                "description": "ERA5 is the fifth generation ECMWF reanalysis for the global climate "
61
                "and weather for the past 4 to 7 decades. Currently data is available from 1950, "
62
                "split into Climate Data Store entries for 1950-1978 (preliminary back extension) and f"
63
                "rom 1979 onwards (final release plus timely updates, this page). ERA5 replaces the ERA-Interim reanalysis. "
64
                "See the online ERA5 documentation "
65
                "(https://confluence.ecmwf.int/display/CKB/ERA5%3A+data+documentation#ERA5:datadocumentation-Dataupdatefrequency) "
66
                "for more information.",
67
                "path": "https://confluence.ecmwf.int/display/CKB/ERA5%3A+data+documentation#ERA5:datadocumentation-Dataupdatefrequency",
68
                "licenses": [
69
                    {
70
                        "name": "Licence to use Copernicus Products",
71
                        "title": "Licence to use Copernicus Products",
72
                        "path": "https://cds.climate.copernicus.eu/api/v2/terms/static/licence-to-use-copernicus-products.pdf",
73
                        "instruction": "This Licence is free of charge, worldwide, non-exclusive, royalty free and perpetual. "
74
                        "Access to Copernicus Products is given for any purpose in so far as it is lawful, whereas use "
75
                        "may include, but is not limited to: reproduction; distribution; communication to the public; "
76
                        "adaptation, modification and combination with other data and information; or any "
77
                        "combination of the foregoing",
78
                        "attribution": "Copernicus Climate Change Service (C3S) Climate Data Store",
79
                    },
80
                ],
81
            },
82
            {
83
                "title": '"Verwaltungsgebiete 1:250 000 (Ebenen)"',
84
                "description": "Der Datenbestand umfasst sämtliche Verwaltungseinheiten der "
85
                "hierarchischen Verwaltungsebenen vom Staat bis zu den Gemeinden "
86
                "mit ihren Grenzen, statistischen Schlüsselzahlen, Namen der "
87
                "Verwaltungseinheit sowie die spezifische Bezeichnung der "
88
                "Verwaltungsebene des jeweiligen Landes.",
89
                "path": "https://daten.gdz.bkg.bund.de/produkte/vg/vg250_ebenen_0101/2020/vg250_01-01.geo84.shape.ebenen.zip",
90
                "licenses": [
91
                    licenses_datenlizenz_deutschland(
92
                        "© Bundesamt für Kartographie und Geodäsie "
93
                        "2020 (Daten verändert)"
94
                    )
95
                ],
96
            },
97
            {
98
                "title": '"eGon-data"',
99
                "description": "Workflow to download, process and generate data sets"
100
                "suitable for the further research conducted in the project eGon (https://ego-n.org/)",
101
                "path": "https://github.com/openego/eGon-data",
102
                "licenses": [
103
                    license_agpl(
104
                        "© Jonathan Amme, Clara Büttner, Ilka Cußmann, Julian Endres, Carlos Epia, Stephan Günther, Ulf Müller, Amélia Nadal, Guido Pleßmann, Francesco Witte"
105
                    )
106
                ],
107
            },
108
            {
109
                "title": '"Netzentwicklungsplan Strom 2035, Version 2021, erster Entwurf"',
110
                "description": "Die vier deutschen Übertragungsnetzbetreiber zeigen mit "
111
                "diesem ersten Entwurf des Netzentwicklungsplans 2035, Version 2021, den "
112
                "benötigten Netzausbau für die nächsten Jahre auf. Der NEP-Bericht beschreibt "
113
                "keine konkreten Trassenverläufe von Übertragungsleitungen, sondern er "
114
                "dokumentiert den notwendigen Übertragungsbedarf zwischen Netzknoten. "
115
                "Das heißt, es werden Anfangs- und Endpunkte von zukünftigen Leitungsverbindungen "
116
                "definiert sowie konkrete Empfehlungen für den Aus- und Neubau der Übertragungsnetze "
117
                "an Land und auf See in Deutschland gemäß den Detailanforderungen im § 12 EnWG gegeben.",
118
                "path": "https://zenodo.org/record/5743452#.YbCoz7so8go",
119
                "licenses": [license_ccby("© Übertragungsnetzbetreiber")],
120
            },
121
            {
122
                "title": '"Data bundle for egon-data"',
123
                "description": "Zenodo repository to provide several different input data sets for eGon-data",
124
                "path": "https://zenodo.org/record/10226009",
125
                "licenses": [license_ccby("© eGon development team")],
126
            },
127
        ],
128
        "licenses": [
129
            {
130
                "name": "CC-BY-4.0",
131
                "title": "Creative Commons Attribution 4.0 International",
132
                "path": "https://creativecommons.org/licenses/by/4.0/legalcode",
133
                "instruction": "You are free: To Share, To Create, To Adapt; As long as you: Attribute.",
134
                "attribution": "eGon developers",
135
            }
136
        ],
137
        "contributors": [
138
            {
139
                "title": "Ilka Cußmann",
140
                "email": "",
141
                "object": "",
142
                "comment": "Added hydro and biomass plants",
143
            },
144
            {
145
                "title": "Clara Büttner",
146
                "email": "",
147
                "object": "",
148
                "comment": "Added table structure",
149
            },
150
            {
151
                "title": "Katharina Esterl",
152
                "email": "",
153
                "object": "",
154
                "comment": "Add pv ground mounted",
155
            },
156
            {
157
                "title": "Carlos Epia",
158
                "email": "",
159
                "object": "",
160
                "comment": "Added wind power plants",
161
            },
162
        ],
163
        "resources": [
164
            {
165
                "profile": "tabular-data-resource",
166
                "name": "supply.egon_power_plants",
167
                "path": "",
168
                "format": "PostgreSQL",
169
                "encoding": "UTF-8",
170
                "schema": {
171
                    "fields": [
172
                        {
173
                            "name": "id",
174
                            "description": "Unique identifier for power plants",
175
                            "type": "Integer ",
176
                            "unit": "",
177
                        },
178
                        {
179
                            "name": "sources",
180
                            "description": "sources of power plants",
181
                            "type": "Dictionary",
182
                            "unit": "",
183
                        },
184
                        {
185
                            "name": "source_id",
186
                            "description": "Unique Identifier of sources ",
187
                            "type": "Dictionary",
188
                            "unit": "",
189
                        },
190
                        {
191
                            "name": "carrier",
192
                            "description": "Energy carrier such as biomass, wind_onshore",
193
                            "type": "String",
194
                            "unit": "",
195
                        },
196
                        {
197
                            "name": "el_capacity",
198
                            "description": "Installed electrical capacity in MW",
199
                            "type": "",
200
                            "unit": "MW",
201
                        },
202
                        {
203
                            "name": "bus_id",
204
                            "description": "bus ID where the power plant is connected",
205
                            "type": "Integer",
206
                            "unit": "",
207
                        },
208
                        {
209
                            "name": "voltage_level",
210
                            "description": "voltage level of power plant",
211
                            "type": "Integer",
212
                            "unit": "",
213
                        },
214
                        {
215
                            "name": "weather_cell_id",
216
                            "description": "Unique identifier of the corresponding weather cell",
217
                            "type": "Integer",
218
                            "unit": "",
219
                        },
220
                        {
221
                            "name": "scenario",
222
                            "description": "eGon scenario, for example eGon235 or eGon100RE",
223
                            "type": "String",
224
                            "unit": "",
225
                        },
226
                        {
227
                            "name": "geometry",
228
                            "description": "geometry of the power plant",
229
                            "type": "String",
230
                            "unit": "",
231
                        },
232
                        {
233
                            "name": "",
234
                            "description": "",
235
                            "type": "",
236
                            "unit": "",
237
                        },
238
                    ],
239
                    "primaryKey": "",
240
                },
241
                "dialect": {"delimiter": "", "decimalSeparator": ""},
242
            }
243
        ],
244
        "review": {"path": "", "badge": ""},
245
        "metaMetadata": {
246
            "metadataVersion": "OEP-1.4.1",
247
            "metadataLicense": {
248
                "name": "CC0-1.0",
249
                "title": "Creative Commons Zero v1.0 Universal",
250
                "path": "https://creativecommons.org/publicdomain/zero/1.0/",
251
            },
252
        },
253
        "_comment": {
254
            "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/v141/metadata_key_description.md)",
255
            "dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)",
256
            "units": "Use a space between numbers and units (100 m)",
257
            "languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)",
258
            "licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)",
259
            "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)",
260
            "none": "If not applicable use (none)",
261
        },
262
    }
263
264
    db.submit_comment(
265
        "'" + json.dumps(meta) + "'", "supply", "egon_power_plants"
266
    )
267