This aim of this project is to make a global solar forecast: a 0-48 hours forecast for every country in the world. We get the solar capacity for every country (mainly collected from Ember and Our World in Data and added in manually), and then create a solar forecast, displayed in the UI in various charts.
We've presented Global Solar Forecast at FOSDEM 2026, talking about why we built it, how it works, and how we hope for it to develop. Watch the talk
The solar forecast is very simple,
- as it assume one solar panel in the middle of the country,
- then we scaled it to the capacity of the country
- We use
open.quartz.solarwhich is for domestic solar, and uses free weather forecasts.
The following diagram shows the architecture and data flow of the Global Solar Forecast application:
flowchart TB
subgraph App["Global Solar Forecast App"]
direction TB
A[("Streamlit App<br/>main.py")] --> B["Load Country Data<br/>capacities.csv"]
B --> C{"For Each Country"}
end
subgraph Forecast["Forecast Generation"]
direction TB
C --> D["Get Country Center<br/>lat/lon coordinates"]
D --> E["Call forecast.py<br/>get_forecast()"]
E --> F["POST Request to<br/>open.quartz.solar/forecast"]
end
subgraph QuartzAPI["Quartz Solar API"]
direction TB
F --> G["Fetch Weather Data<br/>from Open-Meteo"]
G --> H["Run ML Model<br/>Solar Prediction"]
H --> I["Generate 48-hour<br/>Forecast"]
end
subgraph Display["UI Display"]
direction TB
I --> J["World Map<br/>Color-coded by generation"]
I --> K["Stacked Area Charts<br/>by region/country"]
I --> L["Country Details<br/>Individual forecasts"]
end
style App fill:#2d3436,stroke:#636e72,color:#dfe6e9
style Forecast fill:#0984e3,stroke:#74b9ff,color:#fff
style QuartzAPI fill:#6c5ce7,stroke:#a29bfe,color:#fff
style Display fill:#00b894,stroke:#55efc4,color:#fff
- App Startup: Streamlit app loads and reads solar capacity data for each country
- Forecast Request: For each country, the app calls the Quartz Solar API with location and capacity
- ML Prediction: The API fetches weather data from Open-Meteo and runs an ML model
- 48-Hour Forecast: Returns power generation predictions for the next 48 hours
- UI Rendering: Results displayed on an interactive world map and charts
TODO add weblink of where this is deployed
See FAQs here
In order to run the app locally, clone this repo and run uv sync. To start app run
uv run streamlit run src/v1/main.py
Current there are not tests, but it would be great if some were added
- PR's are welcome! See the Organisation Profile for details on contributing
- Find out about our other projects in the here
- Check out the OCF blog for updates
- Follow OCF on LinkedIn
Peter Dudfield 💻 |
dantravers 🤔 |
Megawattz 🤔 |
Ramkumar R 🎨 |
Ritkaar Singh 💻 |
Nataliia Sosnovshchenko 💻 |
Walter Michel Raja 💻 |
Sagar K Pillai 💻 |
Part of the Open Climate Fix community.


