Skip to content

A package for ML models that estimate plant-level annual generation

Notifications You must be signed in to change notification settings

wri/gppd-ai4earth-api

Repository files navigation

gppd-ai4earth-api

Usage, first time, needing to build docker image

# (optional) setup python environment
# virtualenv --python=python3.7 venv
# . venv/bin/activate && pip install -r requirements

# obtain HydroBasins dataset
make models/source_files/HydroBasins


# obtain hydro runoff
#  (edit Makefile with your CDS key first)
make models/source_files/hydro_runoff

# ensure docker server is running
sudo systemctl start docker

# build the docker image
docker build .

# label image
docker image tag <image_id> ai4e_13:latest

Usage, for Global Power Plant Database

# obtain fresh copy of GPPD
make models/global_power_plant_database.csv

# ensure docker server is running
sudo systemctl start docker

# start docker API container
./dockerup.sh

# run tests
make test

# (optional) perform estimates - go to the models folder
cd models

# estimate baseline
python estimate_baseline.py

# estimate hydro
python estimate_hydro.py

# estimate solar
python estimate_solar.py

# estimate wind
python estimate_wind.py

# merge estimates into GPPD
python make_gppd.py


# ... later to stop the API container
./dockerdown.sh


Notes on the generation estimation API.

API Usage:
This API is used for estimating plant-level annual generation in the form of annual capacity factor. Capacity factors measure the ratio of actual to maximum potential generation for each plant. (see https://en.wikipedia.org/wiki/Capacity_factor for more details about capacity factor and how it can be converted to generation) on a global scale. The API can provide estimates for both actual and virtual power stations as long as the sets of parameters are provided correctly for each of the fuel specific model.

API Coverage:
This API covers generation estimates for power facilities in four catogories: wind-powered, solar-powered, hydroelectricity-powered, and gas-fired.
The current API covers different range of years for different models, here's the range list for each of them:
Wind: 2000 - 2018
Solar: 2000 - 2018
Hydro: 2013 - 2017
Gas: 2014 - 2017

API Parameters:
Required parameters depend on the category. Here are lists of parameters needed for each model:
Wind: fuel_type, capacity_mw, estimating_year, commissioning_year, country, lat, lon
Solar: fuel_type, capacity_mw, estimating_year, commissioning_year, country, lat, lon
Hydro: fuel_type, capacity_mw, estimating_year, country, lat, lon
Gas: fuel_type, capacity_mw, estimating_year, commissioning_year, turbine_type, country, lat, lon

Parameters:
fuel_type: The category of the power plant. Should be one of ['Wind','Solar','Hydro','Gas']
capacity_mw: The capacity of the power plant in MegaWatt. A numerical value (can be integer or decimal)
estimating_year: The year of interest for estimation. A integer value.
commissiong_year: The commissioning year of the power plant. A integer value.
country: The country where the power plant located. Country naming convention should be consistent with the Global Power Plant Database (can be accessed through http:https://datasets.wri.org/dataset/globalpowerplantdatabase)
lat: The latitude of the power plant. A numerical value (can be integer or decimal)
lon: The longitude of the power plant. A numerical value (can be integer or decimal)
turbine_type: The type of gas turbines used by the power plant. Should be one of ['CCGT', 'CS', 'FC', 'GT', 'IC', 'ST'] (Definition for each of the turbine types can be found in our methodology documentation as listed in this readme file)

Relevant Links:

Methodology is available in this document: Estimating Power Plant Generation in the Global Power Plant Database (2020)

About

A package for ML models that estimate plant-level annual generation

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published