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
- Host: GitHub
- URL: https://github.com/ronknight/firemon
- Owner: ronknight
- License: mit
- Created: 2025-01-10T00:04:50.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-13T18:57:45.000Z (8 months ago)
- Last Synced: 2025-02-13T19:34:06.478Z (8 months ago)
- Topics: fire, flask
- Language: Python
- Homepage: https://pinoyitsolution.com
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 methodsNWS 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
```[](https://open.vscode.dev/ronknight/firemon)