WeatherWise ← Back to Weather App

🌤️ Dynamic Outdoor Comfort Index

A comprehensive, real-world focused algorithm that tells you how pleasant (or harsh) it feels outside right now.

💡 What Is This?

The Outdoor Comfort Index distills complex weather data into a single, easy-to-understand score from 0-100:

🎯 Key Innovation: Unlike simple weather apps, our system uses dynamic weighting - whichever factor is causing the most discomfort automatically gets more importance in the final score.

📊 What We Measure

Seven key parameters that actually affect how comfortable you feel:

🌡️
Temperature

Adjusted by heat index (temp + humidity) or wind chill (temp + wind)

Cold
Ideal
Hot
💧
Humidity

Critical in hot weather (sticky heat), less important when cool

Dry
Ideal
Humid
💨
Wind

Harmful in cold (wind chill), helpful in heat (cooling), dangerous when very strong

Calm
Breezy
Windy
🌧️
Precipitation

Rain/snow ruins outdoor plans - heavier precipitation = lower comfort

Dry
Rain
Heavy
🌫️
Air Quality (AQI)

Polluted air is worse in stagnant conditions, better with rain/wind dispersion

Good
Moderate
Poor
☀️
UV Index

More important during midday with clear skies - sunburn risk

Low
High
Extreme
☁️
Weather Conditions

Clear skies vs storms, fog, etc. - affects visibility and comfort

Clear
Overcast
Storm

🧬 Pollutant-Specific Air Quality

Instead of a single AQI number, we track 6 individual pollutants and calculate a health-weighted score:

Tracked Pollutants

Pollutant Symbol Source Toxicity Weight
PM2.5 Fine Particulate Matter Vehicle emissions, combustion 1.0 (most harmful)
O₃ Ozone Summer smog 0.9
NO₂ Nitrogen Dioxide Traffic pollution 0.8
PM10 Coarse Particulate Matter Dust, construction 0.5
SO₂ Sulphur Dioxide Industrial pollution 0.4
CO Carbon Monoxide Vehicle emissions 0.3 (least harmful)
🎯 Why This Matters: PM2.5 at 100 μg/m³ is far more dangerous than PM10 at 100 μg/m³. Our system reflects this by weighting PM2.5 twice as heavily!

Reserved AQI Share (AQI ≥ 60)

When air quality is poor, AQI gets a guaranteed minimum portion of the total weight:

AQI Value Reserved Share Impact on Score
< 60 None Normal dynamic weighting
60-70 30% AQI becomes significant factor
80-90 50% AQI dominates equally with others
100-150 70% AQI heavily dominates
200-300 90% AQI almost entirely controls score
> 300 95% Extreme danger - AQI controls score
Example: PM2.5-Heavy Pollution (Delhi Winter)
PM2.5: 110 μg/m³
PM10: 112 μg/m³
NO₂: 18 μg/m³
O₃: 67 μg/m³

What Happens:

  • PM2.5 scores only 8/100 (very unhealthy)
  • PM2.5 has highest toxicity weight (1.0)
  • Health-weighted score: 8/100 from PM2.5
  • European AQI: 127 → Reserved share: 70%
  • Result: AQI gets 70% of weight, temp/wind/etc share 30%

Final Comfort: ~15/100 - Avoid Outdoor Activity

Dominant Pollutant: PM2.5

Two-Step AQI Process:

1. AQI Value (0-500) → Determines reserved share + labels
2. Pollutant Comfort (0-100) → Health-weighted score for calculation

This separation ensures the score accurately reflects health risk while displaying familiar AQI values.

⚖️ Dynamic Weighting - The Secret Sauce

The algorithm starts with baseline weights, then automatically adjusts based on severity:

Temperature Severity Multipliers

Condition Temp Range Weight Multiplier Impact
❄️ Extreme Cold < 0°C ×2.0 Temperature dominates the score
🥶 Very Cold 0-5°C ×1.7 Cold is very uncomfortable
🌤️ Ideal 18-26°C ×1.0 Baseline weight (perfect conditions)
🔥 Hot 30-35°C ×1.6 Heat is uncomfortable
🌡️ Extreme Heat > 35°C ×2.2 Heat dominates the score

Interconnected Adjustments

🌡️ + 💧 Heat Index (Hot + Humid)

When temperature > 28°C AND humidity > 60%:

  • Humidity weight increases up to ×2.5
  • Effective temperature calculated using heat index formula
  • Result: 35°C with 80% humidity feels like 42°C
🌡️ + 💨 Wind Chill (Cold + Windy)

When temperature < 10°C AND wind> 15 km/h:

  • Wind weight increases to ×1.8
  • Effective temperature calculated using wind chill formula
  • Result: -5°C with 30 km/h wind feels like -15°C
🌫️ + 🌧️ AQI-Weather Interaction

Pollution impact changes based on weather:

  • Stagnant Air (no wind, no rain): AQI weight ×1.8
  • Rain Washout (rain > 1mm): AQI weight ×0.6 (cleaner air)
  • Wind Dispersal (wind > 20 km/h): AQI weight ×0.7
☀️ UV Context Awareness

UV importance varies by time and conditions:

  • Peak Sun (10AM-4PM, clear sky, UV ≥ 6): UV weight ×2.0
  • Early/Late or Cloudy: UV weight ×0.5
Weight Adjustment Process:

1. Start with base weights
2. Apply severity multipliers for each parameter
3. Apply interdependent adjustments (heat index, wind chill, AQI-weather, UV-time)
4. Renormalize so weights sum to 100%
5. Calculate: finalScore = Σ(parameter_score × adjusted_weight)

🌍 Real-World Examples

Scenario 1: Extreme Cold + Wind
🌡️ Temp: -5°C
💨 Wind: 30 km/h
🌫️ AQI: Good
🌧️ Precip: 0mm

What Happens:

  • Wind chill makes it feel like -15°C
  • Temperature weight: 30% × 2.0 = 60%
  • Wind weight: 15% × 1.8 = 27%
  • Other parameters compressed to 13%

Final Score: 12/100 - Avoid Outdoor Activity

Scenario 2: Hot + Humid
🌡️ Temp: 35°C
💧 Humidity: 80%
💨 Wind: 5 km/h
☀️ UV: 9

What Happens:

  • Heat index makes it feel like 42°C
  • Temperature weight: 30% × 2.2 = 66%
  • Humidity weight: 10% × 2.5 = 25%
  • UV weight (midday): 5% × 2.0 = 10%

Final Score: 8/100 - Avoid Outdoor Activity

Scenario 3: Heavy Rain but Mild Temp
🌡️ Temp: 22°C
🌧️ Rain: 15mm
💨 Wind: 10 km/h
🌫️ AQI: Good

What Happens:

  • Precipitation weight: 20% × 3.0 = 60% (heavy rain dominates)
  • Temperature near ideal but doesn't matter
  • Rain makes outdoor activity miserable despite good temp

Final Score: 28/100 - Uncomfortable

Scenario 4: Mild but Very Polluted
🌡️ Temp: 24°C
💧 Humidity: 50%
💨 Wind: 3 km/h (stagnant)
🌫️ AQI: 180 (Very Unhealthy)

What Happens:

  • Stagnant air makes pollution worse
  • AQI weight: 15% × 1.8 = 27% becomes largest single factor
  • Temperature perfect but air quality ruins it

Final Score: 32/100 - Uncomfortable

Scenario 5: Perfect Spring Day
🌡️ Temp: 22°C
💧 Humidity: 45%
💨 Wind: 8 km/h
☀️ UV: 4
🌫️ AQI: 15
🌧️ Rain: 0mm

What Happens:

  • All parameters in ideal ranges
  • No severity multipliers triggered
  • Baseline weights apply normally

Final Score: 95/100 - Very Comfortable

🔬 Technical Implementation

Heat Index Formula

HI = -8.78 + 1.61T + 2.34RH - 0.146T·RH - 0.012T² - 0.016RH² + 0.00064T²·RH + 0.00072T·RH² + 0.000038T²·RH²

Where T = temperature (°C), RH = relative humidity (%)
Only applied when T > 27°C

Wind Chill Formula

WC = 13.12 + 0.6215T - 11.37v^0.16 + 0.3965Tv^0.16

Where T = temperature (°C), v = wind speed (km/h)
Only applied when T < 10°C and v> 4.8 km/h

Pollutant Scoring Functions

Pollutant Excellent Good Moderate Unhealthy
PM2.5 (μg/m³) ≤ 12 ≤ 25 ≤ 35 > 35
PM10 (μg/m³) ≤ 25 ≤ 50 ≤ 90 > 90
NO₂ (μg/m³) ≤ 20 ≤ 40 ≤ 70 > 70
O₃ (μg/m³) ≤ 50 ≤ 70 ≤ 85 > 85

Final Comfort Score

Step 1: Calculate Individual Scores (0-100)
Each parameter scored on 0-100 scale

Step 2: Determine Dynamic Weights
Base weights × severity multipliers → renormalized to sum to 1.0

Step 3: Reserved AQI Share (if AQI ≥ 60)
If AQI ≥ 60: aqiShare = 30-95% based on AQI value
Other parameters share remaining (1 - aqiShare)

Step 4: Final Score
Score = Σ (parameter_score × adjusted_weight)

= (temp_score × W_temp) +
  (humidity_score × W_humidity) +
  (wind_score × W_wind) +
  (precip_score × W_precip) +
  (weather_score × W_weather) +
  (aqi_score × W_aqi) +
  (uv_score × W_uv)

🧮 Interactive Calculator

Experiment with different values to see how the comfort score changes:

22°C
50%
10 km/h
0 mm
25
4
COMFORT SCORE
--
--
--

Weight Distribution

← Back to Weather App