- Overview
- Features
- Architecture
- Installation
- Usage
- Project Structure
- Data Sources
- Technologies
- How It Works
- License
Inferno Watch is a geospatial wildfire prediction system that combines meteorological data analysis with machine learning to forecast wildfire risk across user-defined geographic regions. The application provides an interactive web interface where users can select locations, specify prediction dates, and visualize fire risk predictions overlaid on an interactive map.
This project aims to support fire prevention efforts, emergency response planning, and environmental monitoring by providing accessible, data-driven wildfire risk assessments.
- Interactive Map Interface: Select any geographic location with latitude/longitude coordinates
- Dynamic Area Selection: Adjust prediction area size (30-200 km offset)
- Real-time Weather Data Integration: Fetches historical meteorological data from Open-Meteo API
- Kriging Interpolation: Generates smooth, continuous risk surfaces from discrete prediction points
- Risk Visualization: Color-coded markers and heat maps showing Low/Medium/High fire risk levels
- Date-based Predictions: Specify any date for wildfire risk forecasting
- Responsive Web UI: Built with Streamlit for intuitive user interaction
The application follows a modular architecture with clear separation of concerns:
User Input → Weather Data Retrieval → Risk Prediction → Kriging Interpolation → Map Visualization
streamlit_app.py
- Frontend application and user interfacelogic.py
- Business logic and prediction orchestrationmeteo_data.py
- Weather data acquisition from Open-Meteo APIkriging.py
- Spatial interpolation and heat map generation
- Python 3.12 or higher
- pip package manager
- Virtual environment (recommended)
-
Clone the repository
git clone https://github.com/Obuda-University-Space-Lab/NASA_SpaceApps_challenge_2025.git cd NASA_SpaceApps_challenge_2025
-
Create and activate virtual environment
# Create virtual environment python -m venv venv # Activate on Windows venv\Scripts\activate # Activate on Linux/Mac source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Activate the virtual environment (if not already activated)
# Windows venv\Scripts\activate # Linux/Mac source venv/bin/activate
-
Run the Streamlit application
streamlit run streamlit_app.py
-
Access the web interface
- The application will automatically open in your default browser
- Default URL:
http://localhost:8501
-
Set Prediction Parameters
- Longitude: Enter longitude coordinate (-180.0 to 180.0)
- Latitude: Enter latitude coordinate (-90.0 to 90.0)
- Date to Predict: Select the date for fire risk prediction
- Area Offset: Choose prediction area size (30-200 km)
-
Generate Prediction
- Click the "Predict" button
- The system will:
- Fetch weather data for the past 31 days
- Generate fire risk predictions
- Create kriging interpolation
- Display results on the interactive map
-
Interpret Results
- Green markers: Low fire risk (<70%)
- Orange markers: Medium fire risk (70-90%)
- Red flame icons: High fire risk (>90%)
- Heat map overlay: Continuous risk surface visualization
NASA_SpaceApps_challenge_2025/
│
├── streamlit_app.py # Main Streamlit web application
├── logic.py # Core prediction logic and orchestration
├── meteo_data.py # Weather data retrieval from Open-Meteo API
├── kriging.py # Spatial interpolation using PyKrige
├── requirements.txt # Python package dependencies
│
├── data/ # eg. Dataset directory
│ ├── greece_fire_places.csv
│ ├── greece_fire_dates.csv
│ ├── greece_fire_weather.csv
│ └── [other regional fire data]
│
├── weather_output/ # Generated weather data cache
├── design_elements/ # UI design assets
├── .streamlit/ # Streamlit configuration
└── venv/ # Virtual environment (not in git)
- Implements the web-based user interface
- Handles user input validation
- Manages map visualization with Folium
- Displays prediction results and risk markers
- Coordinates between UI and backend logic
- Orchestrates the prediction workflow
- Validates geographic bounds
- Manages data flow between components
- Generates prediction dataframes
- Integrates weather data with ML models
Key functions:
is_within_bounds()
: Validates coordinates within specified arealogic_func()
: Main prediction pipeline orchestrator
- Interfaces with Open-Meteo Archive API
- Fetches historical weather data for multiple locations
- Processes weather variables into structured dataframes
- Handles API requests and error management
Key functions:
fetch_point_history()
: Retrieves weather data for single coordinatebuild_weather_dataframe()
: Aggregates data across multiple locationsmeteo_data_extract()
: Main entry point for weather retrievalload_coordinates_from_csv()
: Filters coordinates by bounds
Weather variables retrieved:
- Temperature (max, min, apparent)
- Precipitation and rainfall
- Wind speed and direction
- Solar radiation
- Evapotranspiration
- Daylight and sunshine duration
- Implements Ordinary Kriging interpolation
- Generates smooth risk surfaces from discrete points
- Creates heat map visualizations
- Produces overlay images for Folium maps
Key functions:
krige_data()
: Performs kriging interpolation using spherical variogramimage_overlay()
: Creates Folium-compatible image overlay
The application uses the Open-Meteo Historical Weather API to retrieve meteorological data.
API Endpoint: https://archive-api.open-meteo.com/v1/archive
Features:
- Free, open-source weather API
- Historical data from 1940 to present
- High-resolution meteorological variables
- No API key required
- Worldwide coverage
Retrieved Variables (17 features):
temperature_2m_max
- Maximum 2m temperaturetemperature_2m_min
- Minimum 2m temperatureapparent_temperature_max
- Maximum apparent temperatureapparent_temperature_min
- Minimum apparent temperaturesunrise
- Sunrise timesunset
- Sunset timedaylight_duration
- Duration of daylightsunshine_duration
- Duration of sunshineprecipitation_sum
- Total precipitationrain_sum
- Total rainfallsnowfall_sum
- Total snowfallprecipitation_hours
- Hours with precipitationwind_speed_10m_max
- Maximum wind speed at 10mwind_gusts_10m_max
- Maximum wind gusts at 10mwind_direction_10m_dominant
- Dominant wind directionshortwave_radiation_sum
- Total solar radiationet0_fao_evapotranspiration
- Reference evapotranspiration
Historical fire occurrence data from NASA FIRMS (Fire Information for Resource Management System):
- Greece fire locations and dates (2000-2021)
- Italy fire data (2000-2021)
- Israel fire data (2000-2021)
- Tunisia fire data (2000-2021)
- Streamlit (1.28.0+) - Web application framework
- Folium (0.14.0+) - Interactive map visualization
- PyKrige (1.7.0+) - Geostatistical analysis and kriging
- Pandas (2.0.0+) - Data manipulation and analysis
- NumPy (1.24.0+) - Numerical computing
- GeoPandas (0.13.0+) - Geospatial data operations
- scikit-learn (1.3.0+) - Machine learning algorithms
- joblib - Model serialization
- Matplotlib (3.7.0+) - Plotting library
- Seaborn (0.12.0+) - Statistical visualization
- Pillow - Image processing
- Rasterio (1.3.0+) - Raster data I/O
- PyProj (3.6.0+) - Cartographic projections
- Cartopy (0.21.0+) - Geospatial data processing
- Requests (2.31.0+) - HTTP library for API calls
- aiohttp (3.9.0+) - Asynchronous HTTP client
-
User Input Collection
- Collects latitude, longitude, date, and area offset from UI
- Calculates geographic bounds based on offset
-
Historical Weather Retrieval (
meteo_data.py
)- Fetches 31 days of historical weather data ending 1 day before prediction date
- Retrieves data for all fire-prone locations within specified bounds
- Caches results to
weather_output/all_locations_weather.csv
-
Fire Risk Prediction (
logic.py
)- Loads pre-trained machine learning model (
model.pkl
) - Processes weather features for each location
- Generates fire risk probability (0.0 to 1.0) for each coordinate
- Filters predictions to locations within bounds
- Loads pre-trained machine learning model (
-
Spatial Interpolation (
kriging.py
)- Applies Ordinary Kriging with spherical variogram model
- Creates continuous risk surface from discrete prediction points
- Generates heat map visualization
- Saves interpolation as
kriging_interpolation.png
-
Visualization (
streamlit_app.py
)- Overlays kriging heat map on Folium map
- Adds risk markers:
- Green circles for low risk (<70%)
- Orange circles for medium risk (70-90%)
- Red flame icons for high risk (>90%)
- Displays interactive map with zoom and pan capabilities
if risk_level < 0.7:
risk = "Low" (Green)
elif risk_level < 0.9:
risk = "Medium" (Orange)
else:
risk = "High" (Red)
This project was developed for the NASA Space Apps Challenge 2025.
Óbuda University Space Lab
Developed by the team Terra and Luna Analytics.
Team members:
- Bence Majer
- László Potyondi
- Sándor Burian
- Tamás Péter Kozma
- Yhair Sifuentes
- Zsombor Korb
- NASA - For organizing the Space Apps Challenge
- Open-Meteo - For providing free historical weather data
- NASA FIRMS - For fire occurrence datasets
- Streamlit - For the excellent web framework
For questions or feedback about this project, please open an issue on the GitHub repository.