This project leverages the National Grid ESO Carbon Intensity API to forecast regional energy fuel mix and carbon intensity measurements using postcode searches, half-hourly, for the next 48 hours. The project specifically focuses on low-income areas in the UK, which may have less access to this information and be at risk of being left behind during the energy transition. The forecast includes a calculation of the combined wind and solar energy percentage.
- 48-Hour Energy Forecast: Retrieves data from the Carbon Intensity API using postcode searches and generates an Excel file with half-hourly energy fuel mix forecasts.
- Tile Generation for Visualisation:
- Colored Tiles: Visual representations of the combined wind and solar energy percentages, with shades of green and grey indicating renewable energy contributions.
- Transparent Text Tiles: Overlay-ready tiles displaying the location, wind and solar combined percentage, date, and time, suitable for charts, video loops, GIFs, or other visualisation applications.
- Social Impact: Postcode search for regional forecasts to make this information more accessible by highlighting familiar local areas, raising awareness and advocating for equitable access to renewable energy.
To use this project, you’ll need to have Python installed on your machine along with the required Python packages.
-
Clone the repository:
git clone https://github.com/nlpfd/Local-Green-Energy-Forecast-Visualisation.git green-energy-forecast cd green-energy-forecast
-
Install dependencies:
You should create a virtual environment (to avoid clashing with the rest of your Python installation) and then activate it.
-
If you are running on Linux, then you could run:
python -m venv venv source venv/bin/activate
-
If you are running with an Anaconda distribution, you can do this with:
conda create -n green-energy-forecast conda activate green-energy-forecast
Then, install the requirements in this environment:
pip install -r requirements.txt
-
-
Run the Code: Update the
postcode
andpostcodes
variables in the script to your desired locations and run the code to generate the energy forecast and visualisation tiles.python main.py
The script fetches forecasted half-hourly energy data for regions via postcode searches for the next 48 hours, and saves it in an Excel file with separate sheets for each postcode. The data includes the percentage contribution of various fuel sources, including nuclear, gas, biomass, wind, solar, and more.
The script generates two types of tiles:
- Colored Tiles: Representing the combined wind and solar energy percentages.
- Transparent Text Tiles: Featuring text overlays with location, wind and solar percentage, date, and time.
These tiles can be used to create dynamic visualisations, such as video loops or GIFs, to illustrate the energy forecast for specific areas.
The code can be customised to include additional data points or to generate different types of visualisations. Contributions are welcome!
Contributions are encouraged! If you have ideas for new features, improvements, or want to extend the functionality, feel free to fork the repository and submit a pull request.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature-branch
) - Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- National Grid ESO Carbon Intensity API: Providing the data that powers this project.