An open API service indexing awesome lists of open source software.

https://github.com/ronknight/firemon

🌐 Real-time wildfire tracking system with Leaflet.js maps
https://github.com/ronknight/firemon

fire flask

Last synced: 7 months ago
JSON representation

🌐 Real-time wildfire tracking system with Leaflet.js maps

Awesome Lists containing this project

README

          

πŸ”₯ Fire Alert Monitor


🌐 Real-time wildfire tracking system with Leaflet.js maps











Features β€’
Installation β€’
Usage β€’
API Integration β€’
Visualization β€’
Security β€’
Disclaimer

---

## 🌟 Features
- Real-time NWS alert monitoring for California
- Automatic IP-based location detection
- Interactive map visualization with Leaflet.js
- Manual location override capabilities
- Background data refresh (1-hour intervals)
- Responsive web interface
- Alert filtering for:
- Wildfires
- Evacuation orders
- Red flag warnings

---

## πŸ› οΈ Installation
```bash
git clone https://github.com/ronknight/firemon.git
cd firemon
pip install -r requirements.txt
```

---

## πŸ–₯️ Usage
1. Start the Flask server:
```bash
python3 app.py
```
2. Access the web interface at `http://localhost:8000`

**Manual Location Configuration**:
- Submit county/city/ZIP via web form
- Map automatically centers on specified location

---

## πŸ”Œ API Integration
```python
import requests

# Get active alerts
response = requests.get("http://localhost:8000/alerts")
alerts = response.json()

# Update map center
requests.post("http://localhost:8000/update_map_center", json={
"map_center": [34.0522, -118.2437] # LA coordinates
})
```

---

## πŸ—ΊοΈ Visualization Architecture
```mermaid
graph TD
A[User Browser] -->|HTTP Request| B[Flask Server]
B --> C[Background Thread]
C -->|Every 1 Hour| D[NWS API]
D --> E[Filter Alerts]
E --> F[Update Cache]
B --> G[Leaflet.js Map]
F --> G
G --> H[Display Alert Markers]
B --> I[Location Services]
I -->|IP-API.com| J[Geolocation]
```

---

## πŸ”’ Security Features
> **Important**
> - Custom User-Agent header for API compliance
> - Rate-limited API retries (3 attempts with exponential backoff)
> - Input validation for location data
> - No persistent user data storage
> - Built-in request timeout handling

---

## ⚠️ Critical Disclaimer
```text
This system provides informational alerts ONLY. Always:
- Verify with official emergency services
- Follow evacuation orders immediately
- Maintain multiple alert notification methods

NWS data may contain delays - do not rely solely on this system
for life-saving decisions. Use at your own risk.
```

---

## πŸ“‚ Repository Structure
```
firemon/
β”œβ”€β”€ app.py # Main application logic
β”œβ”€β”€ requirements.txt # Python dependencies
β”œβ”€β”€ templates/
β”‚ └── index.html # Web interface template
β”œβ”€β”€ static/
β”‚ β”œβ”€β”€ js/
β”‚ β”‚ └── map.js # Javascript
β”‚ └── style.css # Stylesheets
β”œβ”€β”€ LICENSE
└── README.md
```

[![Open in Visual Studio Code](https://img.shields.io/badge/-Open%20in%20VS%20Code-007ACC?logo=visual-studio-code)](https://open.vscode.dev/ronknight/firemon)