diff --git a/.DS_Store b/.DS_Store new file mode 100755 index 00000000..dea24cca Binary files /dev/null and b/.DS_Store differ diff --git a/.codespell.ignore b/.codespell.ignore old mode 100644 new mode 100755 diff --git a/.github/.DS_Store b/.github/.DS_Store new file mode 100755 index 00000000..abf71be6 Binary files /dev/null and b/.github/.DS_Store differ diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml old mode 100644 new mode 100755 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml old mode 100644 new mode 100755 diff --git a/.github/ISSUE_TEMPLATE/documentation_improvement.yaml b/.github/ISSUE_TEMPLATE/documentation_improvement.yaml old mode 100644 new mode 100755 diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md old mode 100644 new mode 100755 diff --git a/.github/dependabot.yml b/.github/dependabot.yml old mode 100644 new mode 100755 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md old mode 100644 new mode 100755 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/type-checking.yml b/.github/workflows/type-checking.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index e71eeaf1..2962d991 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,10 @@ uv.lock # jupyter *.ipynb + +# claude +.claude/ + +# local analysis files +NL_plants_comparison.xlsx +powerplants_custom.csv diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml old mode 100644 new mode 100755 diff --git a/.readthedocs.yaml b/.readthedocs.yaml old mode 100644 new mode 100755 diff --git a/CITATION.cff b/CITATION.cff old mode 100644 new mode 100755 diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt old mode 100644 new mode 100755 diff --git a/LICENSES/CC-BY-4.0.txt b/LICENSES/CC-BY-4.0.txt old mode 100644 new mode 100755 diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt old mode 100644 new mode 100755 diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt old mode 100644 new mode 100755 diff --git a/MANIFEST.in b/MANIFEST.in old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/REUSE.toml b/REUSE.toml old mode 100644 new mode 100755 diff --git a/analysis/compare-with-entsoe-stats.py b/analysis/compare-with-entsoe-stats.py old mode 100644 new mode 100755 diff --git a/analysis/danish-powerplants.py b/analysis/danish-powerplants.py old mode 100644 new mode 100755 diff --git a/analysis/german-powerplants.py b/analysis/german-powerplants.py old mode 100644 new mode 100755 diff --git a/analysis/interactive-map-with-widgets.py b/analysis/interactive-map-with-widgets.py old mode 100644 new mode 100755 diff --git a/analysis/interactive-map.py b/analysis/interactive-map.py old mode 100644 new mode 100755 diff --git a/analysis/update_powerplants.py b/analysis/update_powerplants.py old mode 100644 new mode 100755 diff --git a/docs/.DS_Store b/docs/.DS_Store new file mode 100755 index 00000000..37322bd1 Binary files /dev/null and b/docs/.DS_Store differ diff --git a/docs/api-core.md b/docs/api-core.md old mode 100644 new mode 100755 diff --git a/docs/api-data.md b/docs/api-data.md old mode 100644 new mode 100755 diff --git a/docs/api-utils.md b/docs/api-utils.md old mode 100644 new mode 100755 diff --git a/docs/assets/images/powerplants.png b/docs/assets/images/powerplants.png old mode 100644 new mode 100755 diff --git a/docs/basics.md b/docs/basics.md old mode 100644 new mode 100755 diff --git a/docs/citing.md b/docs/citing.md old mode 100644 new mode 100755 diff --git a/docs/contributors.md b/docs/contributors.md old mode 100644 new mode 100755 diff --git a/docs/custom-config.md b/docs/custom-config.md old mode 100644 new mode 100755 diff --git a/docs/examples/example.ipynb b/docs/examples/example.ipynb old mode 100644 new mode 100755 diff --git a/docs/faq.md b/docs/faq.md old mode 100644 new mode 100755 diff --git a/docs/getting-started.md b/docs/getting-started.md old mode 100644 new mode 100755 diff --git a/docs/index.md b/docs/index.md old mode 100644 new mode 100755 diff --git a/docs/installation.md b/docs/installation.md old mode 100644 new mode 100755 diff --git a/docs/license.md b/docs/license.md old mode 100644 new mode 100755 diff --git a/docs/powerplants.png b/docs/powerplants.png old mode 100644 new mode 100755 diff --git a/docs/release-notes.md b/docs/release-notes.md old mode 100644 new mode 100755 diff --git a/docs/support.md b/docs/support.md old mode 100644 new mode 100755 diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md old mode 100644 new mode 100755 diff --git a/mkdocs.yaml b/mkdocs.yaml old mode 100644 new mode 100755 diff --git a/osm-changeset-amer.md b/osm-changeset-amer.md new file mode 100755 index 00000000..8f51c4b0 --- /dev/null +++ b/osm-changeset-amer.md @@ -0,0 +1,30 @@ +# OSM changeset draft — Amer power plant + +**OSM object:** relation `power=plant` at 51.7098, 4.8437 (Amercentrale, Geertruidenberg, NL) + +**Tag changes to apply:** +- `plant:source` → `biomass` (was likely `coal` or mixed) +- `plant:method` → `combustion` +- `plant:output:electricity` → `500 MW` +- `generator:type` (on the active unit) → `steam_turbine` +- (consider) `start_date:plant:source=biomass` → `2019` (conversion year) + +--- + +## Changeset comment + + + + +## Source tags + + +- `source:plant:source` = +- `source:plant:output:electricity` = +- `source:start_date` = + +--- + +## Notes for reviewer (optional, goes in changeset comment if space) + + diff --git a/osm-changeset-hemweg.md b/osm-changeset-hemweg.md new file mode 100755 index 00000000..7551071b --- /dev/null +++ b/osm-changeset-hemweg.md @@ -0,0 +1,47 @@ +# OSM changeset draft — Hemweg coal unit retirement + +**Context:** Hemwegcentrale, Amsterdam. The site historically contained multiple units: +- Hemweg 7 (gas, CCGT) — still operating +- Hemweg 8 (coal, ~650 MW) — closed Dec 2019 (Dutch coal phase-out), demolished 2024 + +**OSM objects:** search "Hemwegcentrale" in OSM. Likely either: +- One `power=plant` relation for the whole site (must not delete — Hemweg 7 still operates) +- Separate objects per unit (preferred — edit only the coal unit) + +--- + +## Decision point — lifecycle prefix + +OSM has three ways to represent a retired asset. You must pick one: + + + +My choice: + +## Tag changes + +- Remove: `power=plant` (only if demolished) +- Add: `demolished:power=plant=yes` (or `disused:power=plant=yes`) +- Add: `end_date` = `2019` (last generation) or `2024` (physical demolition) — pick the semantically meaningful date for *this* tag +- Keep: name, operator (as historical record) + +## Changeset comment + + + +## Source tag + +- `source:end_date` = + +## IMPORTANT + +Do NOT edit anything on Hemweg 7 (the gas unit). Verify in iD that you're editing only the coal unit geometry — a wrong click here will retire an active plant in the database. diff --git a/osm-changeset-maasstroom.md b/osm-changeset-maasstroom.md new file mode 100755 index 00000000..ebdb280f --- /dev/null +++ b/osm-changeset-maasstroom.md @@ -0,0 +1,26 @@ +# OSM changeset draft — Maasstroom (Rijnmond 2) + +**OSM object:** relation `power=plant` near 51.8901, 4.352 (Maasstroom Energie, adjacent to Rijnmond 1) + +**Tag changes to apply:** +- `plant:output:electricity` → `426 MW` (was 428 MW) + +Minor correction — 2 MW delta is within common rounding error, so the changeset comment must be extra clear about the source, otherwise it may be reverted as "noise." + +## Changeset comment + + + + +## Source tag + +- `source:plant:output:electricity` = + +## Decision point + + diff --git a/osm-changeset-rijnmond.md b/osm-changeset-rijnmond.md new file mode 100755 index 00000000..b49d46b9 --- /dev/null +++ b/osm-changeset-rijnmond.md @@ -0,0 +1,17 @@ +# OSM changeset draft — Rijnmond 1 (Enecogen neighbour, InterGen) + +**OSM object:** relation `power=plant` near 51.8902, 4.3547 (Rijnmond Energie Centrale, Rotterdam) + +**Tag changes to apply:** +- `plant:output:electricity` → `750 MW` (was 810 MW) + +Simple numeric correction. No fuel/method/date change. + +## Changeset comment + + + + +## Source tag + +- `source:plant:output:electricity` = diff --git a/powerplantmatching/.DS_Store b/powerplantmatching/.DS_Store new file mode 100755 index 00000000..fbb5b877 Binary files /dev/null and b/powerplantmatching/.DS_Store differ diff --git a/powerplantmatching/__init__.py b/powerplantmatching/__init__.py old mode 100644 new mode 100755 diff --git a/powerplantmatching/accessor.py b/powerplantmatching/accessor.py old mode 100644 new mode 100755 diff --git a/powerplantmatching/cleaning.py b/powerplantmatching/cleaning.py old mode 100644 new mode 100755 diff --git a/powerplantmatching/collection.py b/powerplantmatching/collection.py old mode 100644 new mode 100755 diff --git a/powerplantmatching/core.py b/powerplantmatching/core.py old mode 100644 new mode 100755 diff --git a/powerplantmatching/data.py b/powerplantmatching/data.py old mode 100644 new mode 100755 index 01bc9966..7c24152e --- a/powerplantmatching/data.py +++ b/powerplantmatching/data.py @@ -194,7 +194,9 @@ def OPSD( .assign( Name=lambda df: df.Name.str.replace("\x96", " "), # for geoparsing projectID=lambda s: "OEU-" + s.index.astype(str), - Fueltype=lambda d: d.Fueltype.fillna(d.Energy_Source_Level_1), + Fueltype=lambda d: d.Energy_Source_Level_3.where( + d.Energy_Source_Level_3.notna(), d.Fueltype + ).fillna(d.Energy_Source_Level_1), # We don't want to include this as this is overestimating CHP capacities # Set=lambda df: np.where(df.Set.isin(["yes", "Yes"]), "CHP", "PP"), ) @@ -1409,8 +1411,10 @@ def BNETZA( regex=True, ), )[ - lambda df: df.projectID.notna() - & df.Status.str.contains(pattern, regex=True, case=False) + lambda df: ( + df.projectID.notna() + & df.Status.str.contains(pattern, regex=True, case=False) + ) ].pipe( gather_specifications, search_col=["Name", "Fueltype", "Blockname"], @@ -1418,8 +1422,9 @@ def BNETZA( ) add_location_b = bnetza[bnetza.Ort.notnull()].apply( - lambda ds: (ds["Ort"] not in ds["Name"]) - and (str.title(ds["Ort"]) not in ds["Name"]), + lambda ds: ( + (ds["Ort"] not in ds["Name"]) and (str.title(ds["Ort"]) not in ds["Name"]) + ), axis=1, ) bnetza.loc[bnetza.Ort.notnull() & add_location_b, "Name"] = ( @@ -1808,8 +1813,10 @@ def GNPT(raw=False, update=False, config=None): .pipe(convert_to_short_name) .dropna(subset="Capacity") .assign( - Name=lambda df: df["Name"] - + df["Unit Name"].fillna("").apply(lambda x: f" {x}" if x else ""), + Name=lambda df: ( + df["Name"] + + df["Unit Name"].fillna("").apply(lambda x: f" {x}" if x else "") + ), DateIn=df["DateIn"].apply(pd.to_numeric, errors="coerce"), DateOut=df["DateOut"].apply(pd.to_numeric, errors="coerce"), lat=df["lat"].apply(pd.to_numeric, errors="coerce"), @@ -1899,8 +1906,10 @@ def GCPT(raw=False, update=False, config=None): .pipe(convert_to_short_name) .dropna(subset="Capacity") .assign( - Name=lambda df: df["Name"] - + df["Unit name"].fillna("").apply(lambda x: f" {x}" if x else ""), + Name=lambda df: ( + df["Name"] + + df["Unit name"].fillna("").apply(lambda x: f" {x}" if x else "") + ), DateIn=df["DateIn"].apply(pd.to_numeric, errors="coerce"), DateOut=df["DateOut"] .apply(pd.to_numeric, errors="coerce") @@ -2545,11 +2554,13 @@ def MASTR( df_processed.loc[mask, "Set"] = "PP" df_processed["Name"] = df_processed.apply( - lambda x: f"{x.Name} {x.NameKraftwerksblock.replace(x.Name, '').strip()}" - if x.NameKraftwerksblock - and x.NameKraftwerksblock != x.Name - and x.Fueltype in config["clean_name"]["fueltypes_with_blocks"] - else x.Name, + lambda x: ( + f"{x.Name} {x.NameKraftwerksblock.replace(x.Name, '').strip()}" + if x.NameKraftwerksblock + and x.NameKraftwerksblock != x.Name + and x.Fueltype in config["clean_name"]["fueltypes_with_blocks"] + else x.Name + ), axis=1, ) diff --git a/powerplantmatching/duke.py b/powerplantmatching/duke.py old mode 100644 new mode 100755 diff --git a/powerplantmatching/export.py b/powerplantmatching/export.py old mode 100644 new mode 100755 diff --git a/powerplantmatching/heuristics.py b/powerplantmatching/heuristics.py old mode 100644 new mode 100755 diff --git a/powerplantmatching/matching.py b/powerplantmatching/matching.py old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/Comparison.xml b/powerplantmatching/package_data/Comparison.xml old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/Deleteduplicates.xml b/powerplantmatching/package_data/Deleteduplicates.xml old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/PLZ_Coords_map.csv b/powerplantmatching/package_data/PLZ_Coords_map.csv old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/config.yaml b/powerplantmatching/package_data/config.yaml old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/country_codes.csv b/powerplantmatching/package_data/country_codes.csv old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/duke_binaries/duke-core-1.3-SNAPSHOT-tests.jar b/powerplantmatching/package_data/duke_binaries/duke-core-1.3-SNAPSHOT-tests.jar old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/duke_binaries/duke-core-1.3-SNAPSHOT.jar b/powerplantmatching/package_data/duke_binaries/duke-core-1.3-SNAPSHOT.jar old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/duke_binaries/duke-es-1.3-SNAPSHOT.jar b/powerplantmatching/package_data/duke_binaries/duke-es-1.3-SNAPSHOT.jar old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/duke_binaries/duke-json-1.3-SNAPSHOT.jar b/powerplantmatching/package_data/duke_binaries/duke-json-1.3-SNAPSHOT.jar old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/duke_binaries/duke-lucene-1.3-SNAPSHOT.jar b/powerplantmatching/package_data/duke_binaries/duke-lucene-1.3-SNAPSHOT.jar old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/duke_binaries/duke-mapdb-1.3-SNAPSHOT.jar b/powerplantmatching/package_data/duke_binaries/duke-mapdb-1.3-SNAPSHOT.jar old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/duke_binaries/duke-mongodb-1.3-SNAPSHOT.jar b/powerplantmatching/package_data/duke_binaries/duke-mongodb-1.3-SNAPSHOT.jar old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/duke_binaries/duke-server-1.3-SNAPSHOT.jar b/powerplantmatching/package_data/duke_binaries/duke-server-1.3-SNAPSHOT.jar old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/entsoe_country_codes.csv b/powerplantmatching/package_data/entsoe_country_codes.csv old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/manual_corrections.csv b/powerplantmatching/package_data/manual_corrections.csv old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/manual_corrections_old.csv b/powerplantmatching/package_data/manual_corrections_old.csv old mode 100644 new mode 100755 diff --git a/powerplantmatching/package_data/parsed_locations.csv b/powerplantmatching/package_data/parsed_locations.csv old mode 100644 new mode 100755 diff --git a/powerplantmatching/plot.py b/powerplantmatching/plot.py old mode 100644 new mode 100755 diff --git a/powerplantmatching/utils.py b/powerplantmatching/utils.py old mode 100644 new mode 100755 diff --git a/powerplants.csv b/powerplants.csv old mode 100644 new mode 100755 diff --git a/pyproject.toml b/pyproject.toml old mode 100644 new mode 100755 diff --git a/test/test_aggregate.py b/test/test_aggregate.py old mode 100644 new mode 100755 diff --git a/test/test_cleaning.py b/test/test_cleaning.py old mode 100644 new mode 100755 diff --git a/test/test_duke.py b/test/test_duke.py old mode 100644 new mode 100755 diff --git a/test/test_plots.py b/test/test_plots.py old mode 100644 new mode 100755