A simple Streamlit web app for interactive visualisation and analysis of electricity dispatch scenarios using PyPSA.
- Load and explore energy dispatch scenarios from NetCDF and CSV files
- Interactive Plotly visualisations
- Region and date selection
You can deploy your own version using Streamlit Community Cloud.
Live Demo Tip: Right-click or Cmd/Ctrl+Click to open in a new tab.
-
Clone this repository
git clone https://github.com/chalg/pypsa_dispatch_app.git cd pypsa_dispatch_app
-
Install dependencies
It’s recommended to use a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r requirements.txt
-
Run the app
streamlit run streamlit_app.py
The app will open at http://localhost:8501.
pypsa_dispatch_app/
│
├── streamlit_app.py # Main Streamlit app
├── plot_dispatch.py # Plotting functions
├── requirements.txt # Python dependencies
├── results/ # Results directory (contains scenario files)
│ └── scenarios/ # Scenario files organized by resolution
│ ├── 30mins/ # Put your 30-minute resolution .nc and .csv files here
│ └── 60mins/ # Put your hourly resolution .nc and .csv files here
└── .streamlit/
└── config.toml # Streamlit settings (default to light theme)
--
The app defaults to light mode for all users via .streamlit/config.toml
:
[theme]
base="light"
Author: Grant Chalmers