Skip to content

Commit c3897f1

Browse files
update GEM data to latest versions (Aug 2024) (#196)
* update GEM data to latest versions (Aug 2024) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * annotate * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove duplicated key * append codespell-ignore * comparison with entsoe in 2022; handle retired plants * rate GEM reliability scores higher * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * include 1-20 MW utility-scale solar * update powerplants.csv --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a15a43f commit c3897f1

File tree

7 files changed

+22535
-7008
lines changed

7 files changed

+22535
-7008
lines changed

.codespell.ignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
GuD
22
ue
33
gud
4-
hel
4+
hel
5+
BU

analysis/compare-with-entsoe-stats.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pathlib
2+
import time
23
import warnings
34

45
import country_converter as cc
@@ -27,18 +28,24 @@
2728

2829
client = EntsoePandasClient(api_key=config["entsoe_token"])
2930

30-
start = pd.Timestamp("20190101", tz="Europe/Berlin")
31-
end = pd.Timestamp("20200101", tz="Europe/Berlin")
31+
start = pd.Timestamp("20220101", tz="Europe/Berlin")
32+
end = pd.Timestamp("20230101", tz="Europe/Berlin")
3233

3334
kwargs = dict(start=start, end=end, psr_type=None)
3435

3536

3637
def parse(c):
37-
try:
38-
return client.query_installed_generation_capacity(c, **kwargs).iloc[0]
39-
except Exception as e:
40-
print(f"Country {c} failed with {e}")
41-
return np.nan
38+
rename = {"GB": "UK"}
39+
for n in range(2):
40+
try:
41+
print(c, n)
42+
return client.query_installed_generation_capacity(
43+
rename.get(c, c), **kwargs
44+
).iloc[0]
45+
except Exception as e:
46+
print(f"Country {c} failed with {e}")
47+
time.sleep(3)
48+
return np.nan
4249

4350

4451
stats = pd.DataFrame({c: parse(c) for c in powerplants.Country.unique()})
@@ -48,22 +55,19 @@ def parse(c):
4855
# Manual correction on the statistics
4956

5057
# https://de.wikipedia.org/wiki/Liste_von_Wasserkraftwerken_in_der_Schweiz?oldformat=true
51-
stats.loc["CH", "Hydro"] = 18000
52-
# https://www.bmk.gv.at/dam/jcr:f0bdbaa4-59f2-4bde-9af9-e139f9568769/Energie_in_OE_2020_ua.pdf
53-
stats.loc["AT", "Hydro"] = 14600
54-
# https://www.statista.com/statistics/496283/total-electricity-generation-capacity-uk/
55-
stats.loc["GB", "Natural Gas"] = 37000 # (adding ~10GW)
56-
stats.loc["GB", "Other"] = 1400 # (subtracting ~10GW)
57-
stats.loc["DE", "Nuclear"] = 0
58+
stats.loc["CH", "Hydro"] = 17038
5859

5960
# %%
61+
query = "(DateOut > 2022 or DateOut != DateOut) and (DateIn < 2023 or DateIn != DateIn)"
62+
powerplants = powerplants.query(query)
6063
totals = powerplants.powerplant.lookup().fillna(0)
6164

6265
sources = [s if isinstance(s, str) else list(s)[0] for s in config["matching_sources"]]
6366

6467
input_dbs = {
6568
s.title(): getattr(pm.data, s)()
6669
.powerplant.convert_country_to_alpha2()
70+
.query(query)
6771
.powerplant.lookup()
6872
.fillna(0)
6973
for s in sources

doc/release-notes.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Release Notes
22
==============
33

4-
.. Upcoming Version
5-
.. ----------------
4+
Upcoming Version
5+
----------------
66

7+
* Update Global Energy Monitor data to latest versions as of 2024-08-23.
78

89
Version 0.5.16 (31.08.2024)
910
----------------

0 commit comments

Comments
 (0)