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 inSecrets > Actions
in Github)- the Docker image is built,
- pushed to container registry,
- a new cloud run revision is initialized against the updated image.
- This is done for both the
app
and theetl
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.
TODO