Inspiration
When I first came to Atlanta for my undergraduate studies, I often heard people say that downtown was risky and unsafe, especially at night. Students regularly received alert emails from the university about shootings, robberies, and incidents near campus.
Sometimes, after evening classes or late lab sessions, my friends and I felt genuinely afraid walking back to our apartments. We didn’t know which streets were safer. We relied on shortcuts, instinct, and hope.
At the same time, I knew that all of these incidents were being recorded as data. Locations, times, patterns, and trends were available, but no one was using them to help students and commuters in real time.
I wanted to build something that could turn this data into practical guidance. Something that could help people choose safer paths instead of just faster ones. That idea became SafePath.
What it does
SafePath is an AI-powered safety routing and crime-risk visualization platform for Atlanta.
It predicts short-term crime risk by location and time, displays this risk through interactive heatmaps, and generates routes that prioritize safety over speed. Users can compare fastest and safest routes, view high-risk zones, and receive clear explanations for route recommendations.
How we built it
We built SafePath as a full-stack application with a Python backend for data processing and machine learning inference, and a modern React-based frontend for interactive maps and dashboards.
The pipeline cleans and aggregates over five years of historical crime data, maps incidents to hexagonal spatial cells using H3 indexing, and generates rolling spatiotemporal features. We trained XGBoost classification and regression models to predict crime probability and severity.
These predictions are combined into real-time risk scores and stored in Supabase. A FastAPI backend serves these results to the frontend, which renders heatmaps, analytics, and safety-aware routes using Google Maps.
Automated jobs handle data refresh, feature generation, and heatmap updates.
Challenges we ran into
One major challenge was scale. The original dataset contained around 300,000 incident records, but after converting it into a dense hourly spatial grid, it expanded to over 180 million rows. This made local training impossible and required cloud-based processing and careful memory management.
Another major challenge was extreme class imbalance, with crime occurring in less than one percent of space-time cells. This required specialized sampling and evaluation strategies to train meaningful models.
We also faced challenges reconciling noisy and incomplete location data, designing fast and readable map interfaces, and aligning backend data formats with frontend requirements for real-time visualization.
Accomplishments that we're proud of
We built a complete end-to-end system from raw data ingestion to live route recommendations.
We developed machine learning models that significantly outperform random baselines on real 2025 data.
We implemented heatmap rendering that is both informative and responsive, even with dense data.
We created a clear product flow from exploration to decision-making, supported by a modular and maintainable codebase with separable training, inference, and UI layers.
Most importantly, we delivered a working platform with real-world relevance and social impact.
What we learned
We learned that feature engineering and data design matter as much as model choice for spatiotemporal risk prediction.
We learned that user trust depends on clarity and explainability, not just raw accuracy.
We discovered that building usable map interfaces is challenging, especially when balancing data density and readability.
We also learned that strong systems require tight iteration between backend, machine learning, and frontend components.
What's next for SafePath
Next, we plan to expand the model feature set and measure how each addition impacts real-world performance. This includes testing richer spatial context (neighboring hex influence), event-type embeddings, and more temporal signals like holiday and seasonality effects.
We also want to experiment with deep learning for spatiotemporal forecasting, including sequence models like LSTMs and modern alternatives such as Temporal Convolutional Networks or Transformers, to compare accuracy and ranking quality against XGBoost.
Built With
- gemini
- javascript
- pandas
- python
- react
- supabase
- xgboost
Log in or sign up for Devpost to join the conversation.