Horus
A Node.js/React short term weather report designed for sports, live at https://brunopc-net.github.io/Horus.
Named after the Egyptian god of rainstorms, weather, sky and war.
RepositorySummer 2023, Wildfires were terrible in Canada. With global warming effects increasing every year, I wanted an algorithm that would advice me on what to do when I'm planning to go play outside. I also wanted something to advice me to protect from the sun, as UV can be high even if it's cloudy.
While I was on it, I decided to include precipitation alerts so I won't go for a long bike ride if there will be rain in two hours for exemple. I also included temperature alerts to make sure I'm aware of the conditions for my time outside.
It consists of two sections:
Alertsβ
Here's the alerts displayed in the advice section:
π Air quality (AQI-US)β
You can read about Air Quality Index (U.S.) here. I choose to not use maroon AIQ color for consistency with the other alerts and to make the app more intuitive.
π’ 0-50
No alert
π‘ 50-100
Not the best, outside exposure still ok
π 100-150
Play outside with N95 maskπ·
Close windows, turn on air purifier
π΄ 150-200
Play outside max 120min with N95π·
Close windows, air purifier at moderate level
π£ 200-250
No exercice, 60min max outside exposure with N95π·
Close windows, air purifier at high level
π£ 250-300
Stay inside
Close windows, air purifier at max level
π 300+
Stay inside with N95π·
Close windows, air purifier at max level
βοΈ UV Indexβ
You can read about UV Index here.
For UV, as it fluctuate during the day, I put two alerts:
- A max UV alert (if max level is later in the day)
- A time to burn alert. Time to burn is calculated by using Fitzpatrick's formula
(200 * skin_type_resistance)β(3 * UVI)
with skin type II (skin_type_resistance = 3)
If you're skin type 1, be aware that this metric is too optimistic for you ; you should protect from sun approximatly 16% faster then what's adviced and at UV Level 2.
Max UV Alertβ
π’ 0-2: No alert
π‘ 3-5: Max UV predicted: x
π 6-7: Max UV predicted: x
π΄ 8-10: Max UV predicted: x
π£ 11-12: Max UV predicted: x
π 13+: Max UV predicted: x
Time to burnβ
π’ Over predicted forecast time: No alert
π’βΉοΈ 240+ minutes: You will need sunscreen in x min
π’β οΈ 120-240 minutes: Protect your skin after x min
π‘ 30-120 minutes: Protect your skin after x min
π 20-30 minutes: Protect your skin after x min
π΄ 17-20 minutes: Protect your skin after x min
π£ 15-17 minutes: Protect your skin after x min
π 15- minutes: Protect your skin after x min
π‘οΈ Temperatureβ
Temperature used is the "feels like" temperature, so heat index should be considered in the summer and wind index should be considered in the winter.
π₯΅ Heat alertsβ
π’ 12-28Β°C
No alert
π‘ 28-32Β°C
Caution with exercice, listen to your body
Drink proactively
π 32-36Β°C
Exercice moderatly, take regular breaks
Take a lot of water/electrolytes
π΄ 36-40Β°C
Exercice lightly, no more then 120min Zone2
Take as much water/electrolytes as possible
π£ 40-44Β°C
Exercice very lightly, no more then 60min Zone1
Take as much water/electrolytes as possible
π 44+Β°C
Avoid exercice, stay as cool as you can
Take as much water/electrolytes as possible
π₯Ά Cold alertsβ
π’ 12 to 28Β°C
No alert
π‘ 6 to 12Β°C
You may need a light jacket or sleeves
π 0 to 6Β°C
You may need winter gear, watch out for iceπ§
π΄ -12 to 0Β°C
Put winter gear
π£ -24 to -12Β°C
Wear maximum clothing, goggles
π Lower than -24Β°C
Extreme cold, stay indoors
π§οΈπ¨οΈ Precipitationsβ
Support rain and snow
π§οΈ Rain alertsβ
π’ No rain: No alert
π‘ 0-2mm: Some rain drops expected
π 2-6mm: Significant rain expected
π΄ 6-12mm: A lot of rain is expected
π£ 12-24mm: Deluge is expected
π 24+mm: Heavy deluge is expected
π¨οΈ Snow alertsβ
π’ No rain: No alert
π‘ 0-5cm: A bit of snow is expected
π 5-12cm: Significant snow expected
π΄ 12-20cm: A lot of snow is expected
π£ 20-30cm: Snow storm is expected
π 30+cm: Heavy snow storm is expected