EasyMap is a fully automated pipeline that downloads real-time river discharge forecasts from the Copernicus GloFAS API and combines them with local water station data to generate an enhanced GeoJSON map showing flood risk levels.
- π Automatic Data Retrieval β Downloads the latest GloFAS forecast daily.
- π GeoJSON Output β Produces ready-to-visualize maps for GIS or web apps.
- π Hydrological Forecast Integration β Merges real discharge predictions into station-level analysis.
- π§ Easy Customization β Simple to extend to other countries or bounding boxes.
- π Supports Automation β Can run daily via Windows Task Scheduler or cron.
EasyMap/
β
βββ main.py # Main automation script
βββ map.py # Handles GeoJSON + data enhancement
βββ grbtopdf.py # GRIB debugging / inspection tool
βββ stations.json # Water station data (input)
βββ forecast.grib # GloFAS forecast (downloaded automatically)
βββ germany_waterlevels.geojson # Base map
βββ germany_waterlevels_with_forecast.geojson # Enhanced output map
βββ requirements.txt # Dependencies
βββ LICENSE # MIT license
-
Clone the repository
git clone https://github.com/sherlock2215/EasyMap.git cd EasyMap -
Create a virtual environment (optional but recommended)
python -m venv venv source venv/bin/activate # on macOS/Linux venv\Scripts\activate # on Windows
-
Install dependencies
pip install -r requirements.txt
-
Install Copernicus CDS API key
- Create a free Copernicus Data Store account.
- Save your key to
~/.cdsapirc(Linux/macOS) orC:\Users\<you>\.cdsapirc(Windows).
Run the full automated analysis:
python main.pyThis will:
- Download the latest
forecast.gribfile. - Combine it with your water station data.
- Generate an enhanced
germany_waterlevels_with_forecast.geojsonfile.
- Open Task Scheduler
- Create a new task β Run daily at 07:00
- Command:
python "C:\Users\gosia\Downloads\EasyMap2\EasyMap\main.py"
0 7 * * * /usr/bin/python3 /path/to/main.pyExample GeoJSON snippet:
{
"station": "Berlin-Spree",
"avg_discharge": 182.4,
"flood_risk_category": "Moderate"
}This project is licensed under the MIT License β see the LICENSE file for details.
Sherlock2215
π GitHub: @sherlock2215
π Germany
π¬ Contributions and suggestions are welcome!