Avocado π₯ β plan your next move
Avocado is an affordability intelligence engine that helps users understand the true cost of living in any major city. Designed for students, newcomers, families, and relocating professionals, Avocado provides a complete data-driven breakdown of all major lifestyle expenses and city conditions.
The platform analyzes real-time data, economic indicators, news sentiment, and a custom weighted ML model to generate the AvoScore, a 0β10 affordability index that reflects how financially livable a city is.
AvoScore Legend
- 3 β Low cost
- 4β7 β Mid cost
- 8+ β Expensive
Live demo: https://avocado.amanpurohit.com
What Avocado Delivers
Avocado provides a consolidated, real-time snapshot of a cityβs livability, including:
- Cost-of-living data across rent, groceries, dining, and transit
- Purchasing power and economic stability
- Crime, safety, transportation, and finance-related news
- Live weather and environmental conditions
- City sentiment computed from real-time news feeds
- A machine-learning powered affordability score (AvoScore)
- Gemini-powered conversational insights for interpretation
The goal is simple:
Help users make informed, data-backed decisions about where to live.
AvoScore β The Affordability Engine
The AvoScore is produced through a hybrid weighted ML model that combines classification, regression, and sentiment analysis to deliver a stable, interpretable affordability measure.
Feature Inputs
| Category | Features |
|---|---|
| Housing | Rent index, price-to-income ratio |
| Groceries | Grocery index |
| Dining | Restaurant index |
| Safety | Crime index, safe-walking-at-night score |
| Economics | Local purchasing power, employment volatility |
| Transport | Transit accessibility and cost |
| Weather | Climate & comfort score |
| Sentiment | VADER sentiment from real-time news |
EDA & Preprocessing
Libraries and methods used:
- pandas β data ingestion, merging, cleanup
- numpy β numerical transformations
- matplotlib, seaborn β visualization and correlation analysis
- scikit-learn β scaling, preprocessing, and baselines
- scipy β outlier detection (IQR trimming)
- NLTK (VADER) β sentiment analysis
- pycountry, geopy β city validation and coordinate mapping
Modeling Approach
Avocado uses a two-stage ML pipeline:
1. Logistic Regression (Classification Baseline)
Predicts affordability tiers:
- Low
- Medium
- High
2. XGBoost Regressor
Generates a continuous affordability score.
Weighted Ensemble Formula
AvoScore =
(0.70 * XGBoost) +
(0.15 * city_sentiment) +
(0.10 * weather_comfort) +
(0.05 * local_purchase_power)
This weighted method provides balanced predictions across diverse cities, smoother scoring, and improved generalization.
Sample Classification Performance
precision recall f1-score support
Low Cost 0.89 1.00 0.94 16
Medium Cost 0.89 0.80 0.84 10
High Cost 1.00 0.83 0.91 6
accuracy 0.91 32
macro avg 0.93 0.88 0.90 32
weighted avg 0.91 0.91 0.90 32
System Architecture
AVOCADO SYSTEM ARCHITECTURE
----------------------------------
βββββββββββββββββββββββββββββββββββ
β Frontend (Vercel) β
β Next.js + TypeScript UI β
β - City search β
β - City detail pages β
β - AvoScore visualizations β
βββββββββββββββββ¬ββββββββββββββββββ
β HTTPS Fetch
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Backend (Cloud Run) β
β Python FastAPI in Docker Container β
β Auto-scaled via Cloud Run β
βββββββββββββββββ¬βββββββββββββββββββββββ¬βββββββββββββ€
β β β β
βββββββββββββββΌββββββββ ββββββΌβββββββββββββββββ ββββββΌββββββββββββββββ
β Weather Service β β News Aggregation β β ML Affordability β
β WeatherAPI.com β β NewsData / Currents β β Engine (AvoScore) β
β β β Crime/Finance/ β β Weighted Model β
β β β Transport/Events β β XGBoost + LR β
ββββββββββββββββββββββββ ββββββββββββββββββββββββ ββββββββββ¬ββββββββββββ
β
ββββββββββββββββΌβββββββββββββββ
β AvoScore API β
β 0β10 Affordability Index β
β + Explanations β
ββββββββββββββββββββββββββββββββ
AI Assistant (Gemini Integration)
Avocado uses Gemini to provide conversational explanations, comparisons, and real-time insights about:
- Affordability breakdowns
- City-to-city comparisons
- Risk and volatility (economic or environmental)
- Forecast trends and city outlook
This turns data into interpretable, user-friendly guidance.
Why Avocado?
Affordability influences every aspect of daily life β housing, transportation, food, lifestyle, and even small decisions like whether you can buy an avocado. Avocado makes the affordability question clear, actionable, and data-driven.
It delivers financial transparency for anyone making a major life decision about where to live.
What's Next?
Weβre expanding Avocado beyond major metropolitan hubs to support real-time affordability insights for any city, town, or region. That means: Ingesting more granular, real-time data sources (regional rents, local transit, groceries, utilities). Scaling the AvoScore model to handle thousands of locations with dynamic retraining.
Factoring in live shocks like policy changes, climate events, or economic swings, to show how affordability shifts over time.
Built With
- cloudrun
- currentsapi
- docker
- fastapi
- gcp
- gemini
- google-maps
- logisticregressionclassification
- newsdataapi
- nextjs
- python
- randomforest
- tailwind
- typescript
- weatherapi

Log in or sign up for Devpost to join the conversation.