Horus
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 outside.
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