Skip to main content

Extract and process power plant data from OpenStreetMap

Project description

OSM Power Plants

CI PyPI version License: MIT Python 3.10+

Extract power plant data from OpenStreetMap for energy system modeling.

Installation

pip install osm-powerplants

Quick Start

Command Line

osm-powerplants process Germany France -o europe.csv

Python API

from osm_powerplants import process_units, get_config, get_cache_dir

df = process_units(
    countries=["Chile", "Greece"],
    config=get_config(),
    cache_dir=str(get_cache_dir(get_config())),
)

Why some plants are excluded

OSM is a crowd-sourced dataset, and many power=plant elements lack the metadata needed to plug them into an energy system model. Every OSM element that cannot be resolved into a usable unit is dropped from the output and recorded in a rejection report. The dominant reasons are:

Reason What it means
Missing output tag Plant has power=plant but no plant:output:electricity (and no source-specific capacity-estimation default in config.yaml). Very common on solar and geothermal farms.
Capacity placeholder value plant:output:electricity is set to a stub like yes instead of a number.
Capacity regex no match / Capacity non-numeric Capacity tag exists but cannot be parsed (unusual units, free-form text).
Missing source tag / Missing technology tag Cannot classify the plant — these can be relaxed with missing_technology_allowed: True in config.
Element within existing plant geometry A generator polygon lies inside an already-processed plant boundary (deduplication).

If a country returns fewer plants than you expected from overpass-turbo, set rejected_output_path to see exactly what was dropped and why:

config = get_config()
config["force_refresh"] = True  # rejection data is only populated on API fetches

df = process_units(
    countries=["Kenya"],
    config=config,
    cache_dir=str(get_cache_dir(config)),
    output_path="kenya.csv",
    rejected_output_path="kenya_rejected.csv",  # writes CSV + .geojson
)

The CSV lists each rejection with the OSM URL, coordinates, and reason code; the sibling GeoJSON can be loaded in JOSM or QGIS so OSM contributors can triage the gaps directly.

Output Format

Column Description
projectID OSM-based identifier
Name Plant name
Country Country name
lat, lon Coordinates
Fueltype Solar, Wind, Hydro, Nuclear, Natural Gas, etc.
Technology PV, Onshore, Run-Of-River, Steam Turbine, etc.
Set PP (power plant), Store (storage)
Capacity MW
DateIn Commissioning year

Documentation

Full documentation: https://open-energy-transition.github.io/osm-powerplants

Global dataset

A ready-to-use global dataset, regenerated monthly by CI, lives at the repo root:

Per-region outputs (one triplet per region) live under datasets/. Region definitions are in src/osm_powerplants/regions.py.

The CI workflow (.github/workflows/data.yml) runs on the 1st of each month: one parallel job per region (uploads artifacts) followed by a merge job that commits the global outputs.

Local regeneration:

python scripts/extract_region.py --region europe --clear-cache
python scripts/merge_global.py

Integration with powerplantmatching

This package provides OSM data for powerplantmatching. osm_global.csv is consumed by PPM's matching pipeline. The evaluation that selected which countries should include OSM by default lives in evaluation/ — see evaluation/osm_global_report.md for the methodology and findings.

The legacy osm_europe.csv at the repo root is frozen: it is retained only while the current PPM config still points to it and will be removed after the PPM PR that re-points to osm_global.csv merges.

Development

git clone https://github.com/open-energy-transition/osm-powerplants.git
cd osm-powerplants
pip install -e ".[dev]"
pre-commit install
pytest

Acknowledgments

This project is developed and maintained by Open Energy Transition, a company dedicated to accelerating the global energy transition through open-source tools and data.

License

MIT License - see LICENSE for details.

Data sourced from OpenStreetMap © OpenStreetMap contributors.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osm_powerplants-0.1.5.tar.gz (203.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

osm_powerplants-0.1.5-py3-none-any.whl (83.3 kB view details)

Uploaded Python 3

File details

Details for the file osm_powerplants-0.1.5.tar.gz.

File metadata

  • Download URL: osm_powerplants-0.1.5.tar.gz
  • Upload date:
  • Size: 203.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for osm_powerplants-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9d92d81da80da6af411939a3252e605f1b0d39dd8fd9e4a471d4c8206a0fbfed
MD5 99930067aeb2b8398d9f1958e185c23e
BLAKE2b-256 bc2554c92f737942f077176fe69b865bfd1123b00d7018d66a28eea17fd7977a

See more details on using hashes here.

Provenance

The following attestation bundles were made for osm_powerplants-0.1.5.tar.gz:

Publisher: publish.yml on open-energy-transition/osm-powerplants

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file osm_powerplants-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: osm_powerplants-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 83.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for osm_powerplants-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 13b5663cff9074733dfaf92fd665882563f8a2ead9ee2ba4d3f24c105cbe6a57
MD5 94ed19bc785cdda6efb6a8514b1c30d1
BLAKE2b-256 5f763bf9d0ac80529b24eb189425b57d13f6f1dcaa6bac44cb84a3f392e06f93

See more details on using hashes here.

Provenance

The following attestation bundles were made for osm_powerplants-0.1.5-py3-none-any.whl:

Publisher: publish.yml on open-energy-transition/osm-powerplants

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page