The Emergency Route System is an advanced web application built with Streamlit that helps users navigate safely during emergency situations. It combines real-time weather data, traffic information, and route planning to provide the safest possible travel options during adverse conditions.
The system visualizes potential hazards like snow, rain, and fire zones along routes, calculates risk assessments, and suggests safe exit points with detailed analytics to help users make informed decisions during emergencies.
- Multi-route Planning: Fetches and displays multiple route options between start and destination points
- Weather Visualization: Displays snow, rain, and fire zones with adjustable intensity controls
- Risk Assessment: Calculates overall emergency risk based on weather and traffic conditions
- Safe Exit Recommendations: Suggests and analyzes safe exit points with detailed metrics
- Interactive Maps: Visualizes routes, hazards, and exit points on interactive maps
- Weather Forecasting: Shows hourly weather graphs for rainfall, snowfall, and temperature
- Comparative Analytics: Provides detailed comparative analysis of exit points
- Historical Data: Displays historical safety and evacuation data for informed decision-making
- Clone the repository:
git clone https://github.com/yourusername/emergency-route-system.git
cd emergency-route-system
- Install required dependencies:
pip install -r requirements.txt
-
Set up API keys:
-
Get a Google Maps API key from Google Cloud Platform
-
Get an OpenWeatherMap API key from OpenWeatherMap
-
Update the
Configclass in the code with your API keys
- Run the Streamlit application:
streamlit run main.py
- Enter your starting location and destination in the input fields
- Click "Get Live Routes" to fetch available routes
- Adjust weather intensity sliders in the sidebar to simulate different conditions
- Click "Find Safe Exit Points" to get recommendations for safe exits
- Explore the interactive maps, graphs, and analytics provided
The application is organized into several key classes:
Stores API keys and configuration settings for the application.
Handles all external API calls including:
- Google Maps Directions API for route planning
- OpenWeatherMap API for weather data
- Simulated traffic data generation
- Nearby cities and exits data
Processes data and generates simulations:
- Generates realistic snow, fire, and rain zones
- Calculates emergency risk assessments
- Suggests safe exit points
- Selects the best route based on safety factors
Manages all Streamlit UI components:
- Renders maps, charts, and visualizations
- Creates interactive controls
- Displays analytics and recommendations
Main application class that coordinates all components and manages the application flow.
- streamlit: Web application framework
- pydeck: Map visualization
- plotly: Interactive charts and graphs
- requests: API calls
- geopy: Geographic calculations
- numpy: Numerical operations
- pandas: Data manipulation
The application uses the following configuration parameters in the Config class:
class Config:
# API keys
GOOGLE_MAPS_API_KEY = "YOUR_GOOGLE_MAPS_API_KEY"
OPENWEATHERMAP_API_KEY = "YOUR_OPENWEATHERMAP_API_KEY"
# Map settings
DEFAULT_ZOOM = 5
DEFAULT_PITCH = 45
# Weather simulation settings
SNOW_POINTS = 50
FIRE_POINTS = 50
RAIN_POINTS = 50- Emergency Evacuation Planning: Plan evacuation routes during natural disasters
- First Responder Navigation: Help emergency services find the safest routes to incidents
- Logistics and Transportation: Plan delivery routes during adverse weather conditions
- Travel Safety: Help travelers avoid hazardous areas during their journeys
- Emergency Management: Assist emergency management agencies in planning and response
- Integration with real-time emergency alert systems
- Mobile app version for on-the-go access
- Machine learning models to predict hazard development
- User accounts to save favorite routes and preferences
- Offline mode for use during network outages
- Integration with vehicle navigation systems
- Support for pedestrian and public transit evacuation routes
This project is licensed under the MIT License - see the LICENSE file for details.
This application uses simulated data for demonstration purposes. In real emergency situations, always follow instructions from local authorities and emergency services.
- Google Maps Platform for route planning capabilities
- OpenWeatherMap for weather data services
- Streamlit for the interactive web application framework
- Plotly and PyDeck for data visualization components