Get home faster. Safer. Smarter.
Overview • Features • Architecture • Tech Stack • Repositories • Getting Started • Team
Complete walkthrough demonstrating route search, danger slider tuning, hot-zone visualization, and safe rerouting
albatross_demo.mp4
Albatross is an AI-powered navigation system that prioritizes your safety by calculating routes that avoid crime hot-zones. Like the albatross bird that never fails to find its way home, our application ensures you reach your destination through the safest possible path.
Traditional navigation apps optimize for distance or time. Albatross optimizes for your safety. By aggregating criminal history data with real-time traffic and city layout information, we provide quick, safe, and efficient routing.
Many of us have experienced moments when navigation apps have led us into areas that felt unsafe or uneasy. Current routing solutions don't factor in neighborhood safety, leaving users vulnerable to potentially dangerous situations.
Albatross uses machine learning to:
- Analyze historical crime data
- Generate dynamic crime hot-zones
- Calculate routes that intelligently avoid high-risk areas
- Provide real-time rerouting based on safety scores
| Feature | Description |
|---|---|
| Interactive Map | Beautiful, intuitive map powered by HERE Maps API |
| Multi-Modal Transport | Car, pedestrian, bicycle, truck, scooter, taxi, and bus |
| Danger Sensitivity | Customize safety threshold with danger level slider (0-5) |
| Current Location | One-click access to your current position |
| Dark Mode | Easy on the eyes for night navigation |
| Smart Search | Place search with autocomplete |
| Route Instructions | Turn-by-turn navigation with time & distance |
| Crime Visualization | See danger zones highlighted on the map |
flowchart TB
subgraph Client["Client Layer"]
UI[Vue.js Dashboard]
MAP[HERE Maps SDK]
end
subgraph Edge["Edge Computing"]
CF[Cloudflare Workers]
POLY[Polyline Decoder]
GEO[Geometry Utils]
end
subgraph API["External APIs"]
HERE[HERE Routing API]
GEOCODE[HERE Geocoding API]
end
subgraph Processing["Data Processing"]
PY[Python Analysis Engine]
ML[ML Crime Scoring]
EMB[OpenAI Embeddings]
end
subgraph Storage["Data Layer - AWS"]
DB[(Databricks)]
DELTA[(Delta Lake)]
MLFLOW[MLflow]
end
subgraph Data["Data Sources"]
CRIME[Crime Data CSV]
GEO_DATA[GeoJSON Boundaries]
GOOGLE[Google Geocoding API]
end
UI --> MAP
UI -->|"Route Request"| HERE
UI -->|"Encoded Polyline"| CF
CF --> POLY
CF --> GEO
CF -->|"Fetch Crime Zones"| DB
HERE -->|"Re-calculated Route"| UI
CF -->|"N-gon Crime Hotzones"| UI
CRIME --> PY
GEO_DATA --> PY
PY --> ML
ML --> EMB
PY -->|"Crime Blocks"| DELTA
DB --> DELTA
DB --> MLFLOW
GOOGLE --> PY
sequenceDiagram
participant U as User
participant V as Vue.js App
participant H as HERE API
participant C as Cloudflare Worker
participant D as Databricks
U->>V: Enter Origin & Destination
V->>H: Request Initial Route
H-->>V: Return Polyline
V->>C: Send Polyline + Danger Level
C->>D: Query Crime Zones
D-->>C: Return N-gon Polygons
C->>C: Check Intersections
C-->>V: Return Overlapping Zones
V->>V: Display Crime Zones
V->>H: Request Route (Avoid Areas)
H-->>V: Return Safe Route
V-->>U: Display Safe Navigation
flowchart LR
subgraph ETL["ETL Pipeline"]
E[Extract]
T[Transform]
L[Load]
end
subgraph Extract
CSV[Crime CSV Files]
GEO[GeoJSON Boundaries]
end
subgraph Transform
ADDR[Address Geocoding]
BLOCK[Block Assignment]
EMBED[Crime Embeddings]
SCORE[Severity Scoring]
CLUSTER[K-Means Clustering]
end
subgraph Load
DELTA[(Delta Lake)]
FINAL[final_fast.csv]
end
CSV --> E
GEO --> E
E --> ADDR
ADDR --> BLOCK
BLOCK --> EMBED
EMBED --> SCORE
SCORE --> CLUSTER
CLUSTER --> L
L --> DELTA
L --> FINAL
graph TD
subgraph Input
CRIME[Crime Description]
end
subgraph Processing
EMB[OpenAI Embeddings]
COS[Cosine Similarity]
end
subgraph Reference["Reference Embeddings"]
R0["Level 0: Safe"]
R1["Level 1: Low"]
R2["Level 2: High"]
end
subgraph Output
SCORE[Severity Score 0-2]
end
CRIME --> EMB
EMB --> COS
R0 --> COS
R1 --> COS
R2 --> COS
COS --> SCORE
| Technology | Purpose |
|---|---|
| Reactive UI Framework | |
| Fast Development Server | |
| State Management | |
| Interactive Mapping |
| Technology | Purpose |
|---|---|
| Serverless Edge Functions | |
| Worker Logic |
| Technology | Purpose |
|---|---|
| Data Analysis | |
| Crime Text Embeddings | |
| K-Means Clustering | |
| Numerical Processing |
| Technology | Purpose |
|---|---|
| Unified Analytics | |
| ACID Data Lake | |
| Distributed Computing | |
| ML Lifecycle Management |
| Service | Purpose |
|---|---|
| HERE Routing API | Optimal Pathfinding |
| HERE Geocoding API | Address to Coordinates |
| HERE Autosuggest API | Search Autocomplete |
| Google Geocoding API | Batch Address Resolution |
This project is organized into multiple repositories:
| Requirement | Version |
|---|---|
| 18+ | |
| 3.9+ | |
| Account Required | |
| Account Required | |
| Developer Account | |
| API Key |
# Clone the frontend repository
git clone https://github.com/YOUR_USERNAME/albatross-frontend.git
cd albatross-frontend
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env
# Add your HERE API key to .env
# Start development server
npm run devConfiguration Details
Configuration (src/MapPage.vue & src/components/HereMap.vue):
// Replace with your HERE API key
apiKey: 'YOUR_HERE_API_KEY'# Clone the cloudflare repository
git clone https://github.com/YOUR_USERNAME/albatross-cloudflare.git
cd albatross-cloudflare
# Install Wrangler CLI
npm install -g wrangler
# Login to Cloudflare
wrangler login
# Deploy the worker
wrangler deployWorker Files
| File | Purpose |
|---|---|
worker.js |
Main request handler |
polylineDecoder.js |
Flexible polyline decoding |
geometryUtils.js |
Polygon intersection algorithms |
polygonFetcher.js |
Databricks data fetching |
# Clone the analysis repository
git clone https://github.com/YOUR_USERNAME/albatross-analysis.git
cd albatross-analysis
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install numpy scikit-learn openai requests polyline
# Set OpenAI API key
export OPENAI_API_KEY='your-api-key'
# Run the analysis pipeline
python analyze.pyRequired Data Files
datafiles/
├── usa.geojson # US Census block boundaries
├── boston_crime.csv # Boston crime incidents
├── crime.csv # Additional crime data
└── final_fast.csv # Output: processed crime zones
- Create a Databricks workspace on AWS
- Upload the Scala notebooks:
Create4gonDeltaLake.scala- Initialize Delta Lake tablesCrimeDataProcessing.scala- Process and store crime data
- Upload crime data CSV to DBFS
- Run notebooks in order
Delta Lake Schema
val schema = StructType(Array(
StructField("vertex1_lat", DoubleType),
StructField("vertex1_lon", DoubleType),
StructField("vertex2_lat", DoubleType),
StructField("vertex2_lon", DoubleType),
StructField("vertex3_lat", DoubleType),
StructField("vertex3_lon", DoubleType),
StructField("vertex4_lat", DoubleType),
StructField("vertex4_lon", DoubleType),
StructField("crime_score", DoubleType)
))| Step | Process |
|---|---|
| 1 | Data Ingestion - Crime data loaded from CSV files |
| 2 | Geocoding - Addresses converted to coordinates via Google API |
| 3 | Block Assignment - Crimes assigned to census blocks using ray-casting |
| 4 | Severity Scoring - OpenAI embeddings + cosine similarity |
| 5 | Zone Classification - Ranked by crime density into 5 levels |
| 6 | Polygon Simplification - K-Means clustering to 4-sided N-gons |
| Level | Percentile | Risk |
|---|---|---|
| 5 | Top 2% | Most dangerous |
| 4 | Top 5% | Very dangerous |
| 3 | Top 10% | Dangerous |
| 2 | Top 50% | Moderate risk |
| 1 | Bottom 50% | Low risk |
- User enters origin and destination
- Initial route calculated via HERE Routing API
- Polyline sent to Cloudflare Worker
- Worker checks intersections with crime zones
- Matching danger zones returned to frontend
- Route recalculated with
avoid[areas]parameter - Safe route displayed with crime zones visualized
- Real-time Notifications - Push alerts for nearby incidents
- Personalized Safety - User-specific risk preferences
- AI Crime Prediction - Predictive models for emerging hot-zones
- Mobile Apps - Native iOS and Android applications
- Community Reports - Crowdsourced safety data
- Time-based Routing - Different routes for day vs. night
- 911 Integration - Emergency service coordination
- Completed all core functionalities within hackathon timeframe
- Successfully integrated multiple new technologies (Databricks, Cloudflare Workers)
- Built efficient real-time crime data clustering system
- Implemented flexible polyline encoding workarounds
- Created scalable architecture for future enhancements
| Technology | Learnings |
|---|---|
| Databricks & Delta Lake | Unified analytics platform and ACID transactions |
| Cloudflare Workers | Edge computing for low-latency processing |
| HERE APIs | Geo-routing and flexible polyline encoding |
| Vue.js | Reactive frontend development |
| Scala & Spark | Distributed data processing |
| ML Embeddings | Text similarity for crime classification |
We welcome contributions! Please see our Contributing Guidelines for details.
# 1. Fork the repository
# 2. Create your feature branch
git checkout -b feature/AmazingFeature
# 3. Commit your changes
git commit -m 'Add some AmazingFeature'
# 4. Push to the branch
git push origin feature/AmazingFeature
# 5. Open a Pull RequestThis project is licensed under the MIT License - see the LICENSE file for details.
HackHarvard 2024
![]() Shahir Ahmed Full Stack |
![]() Boosung Kim Full Stack |
![]() Jordan Zedeck Full Stack |
Special thanks to Boston Police Department for open crime data
Albatross - Because everyone deserves to get home safe.




