RoadSoS / DOCUMENTATION.md
muthuk2's picture
Add DOCUMENTATION.md and PRESENTATION.md
07a9f50 verified
|
Raw
History Blame Contribute Delete
2.59 kB
# RoadSoS β€” Emergency Services Locator for Road Accidents
## National Road Safety Hackathon 2026 | IIT Madras
---
## πŸ“‹ Software Packages Used
| Package | Version | Purpose |
|---------|---------|---------|
| Python | 3.10+ | Core programming language |
| Gradio | β‰₯4.0.0 | Web UI framework (responsive, mobile-friendly) |
| Folium | β‰₯0.19.0 | Interactive map generation (Leaflet.js wrapper) |
| Geopy | β‰₯2.4.0 | Geocoding (Nominatim integration) |
| SQLite3 | Built-in | Local database for incident logging |
| urllib | Built-in | HTTP requests to Overpass API |
| json | Built-in | Data serialization |
| math | Built-in | Haversine distance calculation |
### External APIs (No API key required β€” Free and Open):
| API | Provider | Purpose |
|-----|----------|---------|
| Overpass API | OpenStreetMap | Real-time query for hospitals, police, fire stations |
| Nominatim | OpenStreetMap | Forward/reverse geocoding (text β†’ coordinates) |
---
## πŸ—οΈ System Architecture
```
USER (Web/Mobile) β†’ GRADIO UI β†’ PYTHON BACKEND β†’ Overpass API (OSM) + SQLite DB
β†’ Nominatim (Geocoding)
β†’ Folium (Map Generation)
```
---
## πŸ“ Assumptions
1. Internet connectivity required for real-time Overpass API queries
2. Users provide text location or GPS coordinates
3. OpenStreetMap data is comprehensive for metro cities; Tier-3 may be sparse
4. National emergency numbers (112, 108, 100) always shown as fallback
5. Designed for Golden Hour use β€” speed over comprehensiveness
6. English-only (production would need i18n for 22 Indian languages)
7. SQLite sufficient for hackathon; production needs PostgreSQL + PostGIS
8. No personal identifiers stored; location logged for analytics only
---
## πŸš€ How to Run
```bash
pip install -r requirements.txt
python database/init_db.py
python app.py
# β†’ http://localhost:7860
```
---
## πŸ“Š Database Schema
- **incidents**: timestamp, lat/lon, type, severity, description, services found
- **emergency_searches**: timestamp, lat/lon, location text, radius, results count
- **trauma_centers**: name, city, state, lat/lon, phone, type, ICU/blood bank flags
---
## πŸ”— Data Sources
1. OpenStreetMap (Overpass API) β€” live hospital/police/fire station data
2. Motor Vehicles Amendment Act 2019 β€” Section 134A (Good Samaritan Law)
3. MoRTH β€” Emergency number directory
4. NHAI β€” Highway helpline data
5. GVK EMRI β€” 108 Ambulance coverage
6. Supreme Court of India β€” Good Samaritan Guidelines (2016)