The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.
08-29-2023 10:31 AM - edited 08-29-2023 10:39 AM
Can anyone tell me if there are plans to add weather information besides temperature to the activities API? I know Strava's front-end displays basic weather information like feels-like and precipitation about the time an activity took place but that doesn't make its way to the API in any way I can tell.
It also seems like the "average_temp" field does not show up consistently in the API. Is there a reason for this? I suspected it was older activities that did not have the data, but I cannot identify rhyme or reason why some have it and others do not.
Thanks!
09-04-2023 11:04 AM
I've been using WeatherAPI for my application and found it quite useful - in part, because it provides a full vector of conditions for a given day/route/time ( e.g. knowing that the day started sunny but had a rain storm in the middle could be useful). Obviously, it adds some cost but the per-cost API calls are pretty reasonable if the number of users is not very high.
08-29-2023 04:07 PM
The average temperature needs a temperature sensor, not every device has it.
For getting the weather you could use openweathermap.org, there you can retrieve the weather hourly for the last 5 days for free. The Strava API gives you the activity time and coordinates for that to work. That would be more exact than the Strava weather because that uses only the start time and start location and that is usually not representative for longer activities.
08-29-2023 04:09 PM
Every run I've recorded is from the same device (an Apple Watch) but not every activity has an "average_temp" value in the API. All of my activities have weather data in the Strava front-end however. Something is causing a discrepancy.
Welcome to the Community - here is your guide to help you get started!