Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SafeOrbit Logo

SafeOrbit – AI-Powered HeatMap & Routing for Safer Streets

Note: This project is a Minimum Viable Product (MVP). It serves as a proof-of-concept for community safety mapping. The current version utilizes simulated local data and routing heuristics to demonstrate the platform's core capabilities.

Overview

SafeOrbit is an advanced, AI-powered safety intelligence platform designed to improve security in public spaces. The platform collects real-time user feedback, analyzes risk factors via NLP sentiment analysis, and visualizes this information on a dynamic, color-coded safety heatmap.

By leveraging real-time data, granular time-of-day contextual analysis, and community feedback, SafeOrbit generates responsive safety heatmaps and intelligent routing that help users avoid risky areas and make informed travel decisions.


Architecture Diagram

graph TD
    A[User Interface HTML/JS/CSS] -->|Routing Requests| B[Leaflet Routing Machine]
    A -->|Submit Reports| C[Flask Backend POST /api/report]
    A -->|Fetch Map Data| D[Flask Backend GET /api/safety-data]
    A -->|Fetch Route Score| E[Flask Backend GET /api/route-score]
    
    C -->|Rate Limiting Check| F[IP Cooldown Cache]
    F -->|Store Incident| G[(SQLite Database)]
    
    D -->|Generate Points| H[AI Sentiment Analyzer]
    H -->|Calculate NLP Score| I[Dynamic Time Risk Modifiers]
    I -->|Return JSON| A
    
    E -->|Time Analysis| I
Loading

Key Features

AI Sentiment Analysis

Safety indicators aren't just random. The backend Python server utilizes Natural Language Processing (NLP) keyword-matching to analyze community reviews (e.g., "dark", "harassment", "safe", "lit"). The sentiment directly influences the safety score and color of an area.

Advanced Glowing Heatmap Visualization

Locations are displayed using a professional glowing heatmap effect via overlapping, borderless Leaflet circles:

  • Safe: High community trust, well-lit.
  • Moderately Safe: Exercise Caution.
  • Unsafe: High Risk Area based on poor sentiment and time.

Intelligent Safe Routing & Dynamic Coloring

Input an origin and destination to calculate a route. SafeOrbit provides an Overall Safety Score out of 100. The routing line drawn on the map dynamically changes color (Green, Yellow, Red) based on the calculated safety score for the journey.

Granular Time-Based Safety

Safety risks change drastically when the sun goes down. SafeOrbit features an exact Time Input that dynamically recalculates heatmaps and route safety scores based on the specific hour, heavily penalizing late-night travel in unlit areas.

Emergency Location Integration

The map automatically generates and plots nearby emergency POIs including Police Stations, Hospitals, and Metro Stops using custom FontAwesome icons to assist users in distress.

Incident Reporting & Fake Report Prevention

A seamless UI modal allows users to submit General Safety Feedback or report specific incidents. To prevent spam, the backend enforces a strict IP-based 60-second rate limiter (429 Too Many Requests). Reports are securely stored in a local SQLite database.


Technology Stack

Frontend Backend & AI Map & Visualization Database
HTML5
Vanilla CSS
JavaScript
Python
Flask
Leaflet.js
Nominatim API
SQLite

Getting Started

  1. Clone the repository:

    git clone https://github.com/yourusername/SafeOrbit.git
    cd SafeOrbit
  2. Install dependencies:

    pip install flask
  3. Run the Flask application:

    python web.py

About

SafeOrbit is a safety awareness platform that helps users identify safer areas and routes using anonymous community feedback displayed on a color-coded map.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages