These are not made up. These show exactly how the system processes data step by step for real scenarios.
Scenario: It's April. Mumbai is hot and humid. You search "Mumbai."
| Measurement | WeatherAPI Says | Open-Meteo Says |
|---|---|---|
| Temperature | 33°C | 31°C |
| Humidity | 84% | 82% |
| Wind | 22 km/h | 18 km/h |
| Cloud Cover | 60% | 55% |
| Precipitation | 0 mm | 0 mm |
Temperature = (33 × 0.60) + (31 × 0.40) = 19.8 + 12.4 = 32.2°C ≈ 32°C
Wind = (22 × 0.70) + (18 × 0.30) = 15.4 + 5.4 = 20.8 km/h
Cloud = (60 × 0.50) + (55 × 0.50) = 30 + 27.5 = 57.5% ≈ 58%
Humidity = 84% (WeatherAPI only — 100% weight)
Difference between sources: |33 - 31| = 2°C → Within 5°C threshold → both are used. ✅
conditionEngine:
- Humidity = 84%, Cloud = 58%, Precip = 0mm, Visibility = 4km
- Result:
"Partly Cloudy"+ ☁️
realFeelEngine:
- Temp = 32°C, Humidity = 84%, Wind = 21 km/h
- Heat index kicks in (humidity > 70%)
- Result: Feels like 39°C (7 degrees hotter than actual — humidity traps heat)
aqiHandler:
- PM2.5: 55 µg/m³, CO: 890 µg/m³
- AQI resolved to: 112
- Category:
"Unhealthy for Sensitive Groups"🟠
trendEngine:
- Previous 3 readings: 30°C → 31°C → 32°C
- Slope: +0.5°C per reading → ↑ Rising
predictionEngine:
- Current: 32°C, Slope: +0.5°C/30min
- Predicted (1 hr later):
33°Cwith"Partly Cloudy"
rainEngine:
- Humidity: 84% → +20 points
- Pressure trend: slightly falling → +10 points
- Cloud: 58% → +10 points
- Visibility: 4km (normal) → +0 points
- Precipitation: 0mm → +0 points
- Total: 40% rain probability
anomalyEngine:
- Temp: 32°C (below 45°C threshold)
- AQI: 112 (below 200 threshold)
- Wind: 21 km/h (below 120 threshold)
- Result: No anomalies detected ✅
insightEngine:
- Rain = 40%, AQI = 112, feels like 39°C, UV = 8
- Output:
- "Feels like 39°C due to high humidity — stay hydrated."
- "Air quality is moderately unhealthy — sensitive groups avoid prolonged outdoor activity."
- "Rain possible later in the day — consider an umbrella."
Mumbai — Partly Cloudy ☁️
32°C / 90°F | Feels like 39°C
↑ Rising | Confidence: Medium | Sources: 2
Rain Probability: 40%
AQI: 112 🟠 Unhealthy for Sensitive Groups
Predicted (1hr): 33°C Partly Cloudy
💡 Insights:
→ Feels like 39°C. Stay hydrated.
→ Air quality is moderately unhealthy.
→ Rain possible later. Take an umbrella.
Scenario: December. Delhi winters are famous for dense fog and terrible air quality.
| Measurement | WeatherAPI | Open-Meteo |
|---|---|---|
| Temperature | 9°C | 10°C |
| Humidity | 93% | 91% |
| Visibility | 0.3 km | 0.4 km |
| Wind | 4 km/h | 3 km/h |
| Cloud | 90% | 85% |
| AQI (PM2.5) | 280 µg/m³ | — |
Temperature = (9 × 0.60) + (10 × 0.40) = 5.4 + 4.0 = 9.4°C ≈ 9°C
Visibility = (0.3 × 0.50) + (0.4 × 0.50) = 0.15 + 0.20 = 0.35 km
Humidity = 93%
conditionEngine:
- Visibility = 0.35 km (< 0.5 km), Humidity = 93%
- Rule: IF visibility < 0.5 AND humidity > 90% →
"Dense Fog"🌫️
realFeelEngine:
- Temp = 9°C, Wind = 4 km/h (calm)
- No significant wind chill at this speed
- Result: Feels like 8°C
aqiHandler:
- PM2.5: 280 → AQI = 245
- Category:
"Very Unhealthy"🟣 - Tip:
"Everyone should avoid outdoor activity. Wear N95 if going out."
rainEngine:
- Humidity = 93% → +35 points
- Cloud = 87% → +20 points
- Visibility = 0.35 km → +15 points
- Precipitation = 0mm → +0 points
- Total: 70% rain probability
anomalyEngine:
⚠️ Near-Zero Visibility: 0.35 km < 0.5 km threshold
→ Alert: "🟠 Dangerous Fog — Exercise extreme caution while driving"
⚠️ Dangerous AQI: 245 > 200 threshold
→ Alert: "🔴 Very Unhealthy Air — Everyone should avoid outdoor activity"
insightEngine outputs:
- "Visibility is critically low at 0.35 km — do not drive without fog lights."
- "Air quality is very unhealthy (AQI 245). Stay indoors and close windows."
- "70% chance of rain or drizzle — umbrella essential."
Delhi — Dense Fog 🌫️
9°C | Feels like 8°C
→ Stable | Confidence: High | Sources: 2
🔴 ALERT: Very Unhealthy Air (AQI 245)
🟠 ALERT: Dangerous Fog (Visibility: 0.35 km)
Rain Probability: 70%
💡 Insights:
→ Visibility is critically low. Do not drive.
→ Stay indoors. Close windows. AQI is very unhealthy.
→ Rain likely — take an umbrella.
This is something NO normal weather app shows you. They just say "9°C, Foggy."
Scenario: Mid-afternoon. London. Pressure has been falling for the past 3 hours.
Entry 1 (past): pressure = 1015 mb
Entry 2: pressure = 1012 mb
Entry 3: pressure = 1009 mb
Entry 4 (now): pressure = 1006 mb
The Trend Engine calculates the slope:
- Drop of ~3 mb every 30 minutes
- That's -6 mb per hour — a rapid pressure drop
Rule: IF pressure drops > 5 mb per hour → Alert
Actual drop: 6 mb/hr > 5 threshold → ANOMALY DETECTED
Alert: "🟠 Rapid Pressure Drop — Storm system approaching. Conditions may worsen rapidly."
Pressure trend: −6 mb/hr → +25 points (maximum severity)
Humidity: 78% → +15 points
Cloud: 70% → +10 points
Precipitation: 0.4mm → +25 points
---------------------------------
Total: 75% 🌧️
- "A storm system is approaching — barometric pressure dropped 6 mb in the last hour."
- "75% chance of rain within the next 2 hours. Bring an umbrella."
- "Conditions are volatile — expect rapid changes."
Scenario: You search for a small city. WeatherAPI's ground station reads correctly. Open-Meteo's regional model is off.
| WeatherAPI | Open-Meteo |
|---|---|
| 24°C | 31°C |
Difference = |24 - 31| = 7°C
Threshold = 5°C
7 > 5 → OUTLIER DETECTED
→ Ignoring Open-Meteo temperature
→ Using WeatherAPI only: 24°C
Sources used: 1 (only WeatherAPI — Open-Meteo discarded as outlier)
Confidence: "Low" 🟠
Reason: "High disagreement between sources — secondary data discarded"
Dashboard shows:
🟠 Low Confidence · Sources: 1 (outlier removed) · Updated: 3:45 PM
The user now knows: "This data might not be perfect. Take it with a grain of salt."
Scenario: 50 users search for "Kolkata" within 10 minutes.
User 1 at 3:00 PM:
→ Cache check: MISS
→ Server calls WeatherAPI + Open-Meteo (takes 650ms)
→ Processes 12 engines
→ Saves to cache: "fused:kolkata" at 3:00 PM
→ Sends response
Users 2–50 (3:01 PM to 3:09 PM):
→ Cache check: HIT (saved 2–9 minutes ago, < 10 min TTL)
→ Returns from memory instantly (takes ~2ms)
→ No API calls made
User 51 at 3:11 PM:
→ Cache check: MISS (10 minutes expired, data is stale)
→ Fetches fresh data again → 650ms
→ Saves new cache entry
Result:
- 50 users served → only 2 API calls (instead of 100)
- Users 2–50 experience <5 ms response time vs 650 ms
Next: 07_why_better.md — Why SkyGlass Beats Normal Weather Apps