Exploring the wind power that the UK is discarding due to transmission constraints
https://wind-curtailment-app-ahq7fucdyq-lz.a.run.app/
By pulling data from Elexon, we combine FPNs, BOALS, and BOD to see the effects of wind curtilament
More details are here
We use the Elexon API to get data. See scripts/fetch_data.py
. This is saved to an SQLite DB. Note that raw data is also saved as feather
files to ./data/PHYBM/raw
.
Run scripts/calculate_curtailment.py
to run the analysis against the SQLite DB.
There's some old analysis in scripts
and notebooks/curtailment.ipynb
,
mostly useful for identifying the right day to focus on.
Prototype is in notebooks/bidoffer.ipynb
.
Might need to run
export PYTHONPATH=${PYTHONPATH}:/lib
to get the lib in to your python path
simple streamlit app can be run using
streamlit run main.py
Fast API app that can be called to fetch data from Elexon and save to a database.
App is deployed via GH Actions to GCP Cloud Run.
In the Github workflow
env/.env.prod
file is made (DB_PASSWORD is saved in Secrets > Actions
in Github)app
and the etl
Depends upon a single deploy secret (GLOUD_AUTH) which is in Secrets > Actions
in Github, and is a base64 encoded
version of the default service account credentials in GCP.
Q: How do we make sure new BM units are being used?
A: Currently we manually update them every 6 months (or so).
This is done by running the scripts/update_bm_units.py
script.
This script will fetch the latest BM units from the Elexon API and the update the csv in data/BMU.csv
.
TODO