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

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.
The AvoScore is produced through a hybrid weighted ML model that combines classification, regression, and sentiment analysis to deliver a stable, interpretable affordability measure.
| 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 |
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
Avocado uses a two-stage ML pipeline:
Predicts affordability tiers:
- Low
- Medium
- High
Generates a continuous affordability score.
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.
precision recall f1-score support
Low 0.86 0.82 0.84 52
Medium 0.92 0.89 0.90 88
High 0.88 0.94 0.91 67
accuracy 0.89 207
macro avg 0.89 0.88 0.88
weighted avg 0.89 0.89 0.89
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 │
└──────────────────────────────┘
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.
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.