FitTrackee icon indicating copy to clipboard operation
FitTrackee copied to clipboard

Get weather data using an alternative API

Open SamR1 opened this issue 5 years ago • 8 comments

Since DarkSky joins Apple (see blog post), new registrations are no longer accepted and ~~the API will be deprecated by the end of 2021~~ support for the Dark Sky API will end on March 31st, 2023.


Features provided by DarkSky used by FitTrackee:

  • 1,000 free calls per day (no credit card)
  • Following weather data:
    • temperature
    • humidity
    • wind (speed and direction)
    • icon label
  • Historical data (it's possible to get data for dates in the past)

2 calls are made for a workout (at start and end gpx points)


Some alternatives: (not exhaustive)

DarkSky Meteostat OpenWeather (One Call API 3.0) Open-Meteo Visual Crossing
Free calls 1,000/day 500/month 1,000/day fair use 1,000/day
Temperature :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Humidity :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Wind (speed & direction) :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Icon label :heavy_check_mark: :x: :heavy_check_mark: :x: :heavy_check_mark:
Historical data by a timestamp :heavy_check_mark: :x: :heavy_check_mark: :x: :white_check_mark: (on hour period)
Data Licence CC BY-NC 4.0 CC BY-NC 4.0 CC BY-NC 4.0
Misc EOL : March 2023 Historical data only on hourly period Matches parameters of Dark Sky API.
Payment info required.
Matches parameters of Dark Sky API.
No credit card required.

Links:

Other API to be considered:

  • MeteoFrance API (no historical data for now, see https://github.com/SamR1/FitTrackee/issues/485)
  • PirateWeather

SamR1 avatar Jun 01 '20 14:06 SamR1

It looks like support is extended:

By Adam Grossman on June 7, 2021.

Update: Support for the Dark Sky API service for existing customers will continue until the end of 2022. The iOS app and Dark Sky website will also be available until the end of 2022.

SamR1 avatar Aug 25 '21 18:08 SamR1

last update:

By Adam Grossman on June 6, 2022.

Update: As previously announced, the Dark Sky iOS app will no longer be available beginning on December 31st, 2022 and, as of this date, already purchased versions of the app will no longer provide weather data. The Dark Sky API and website will continue to function until March 31st, 2023.

SamR1 avatar Jun 11 '22 16:06 SamR1

How about: https://dev.meteostat.net/ ? I think, only a specific number of requests is free. But maybe it's enough.

gorgobacka avatar Sep 05 '22 21:09 gorgobacka

Looks like meteostat allows 500 requests monthly; that seems like it would be enough for most users unless you're running a service for many different users.

image

I think this is important because DarkSky is no longer allowing sign ups for new API keys

I may start playing with this a little bit to see if I can get something working.

jat255 avatar Nov 01 '22 17:11 jat255

I updated the issue about features used be FitTrackee.

One of features provided by DarkSky is that it provides historical data over long periods (it's useful when importing "old" files).

SamR1 avatar Nov 01 '22 21:11 SamR1

Here's another potential one: https://www.visualcrossing.com/resources/blog/how-to-replace-the-dark-sky-api-using-the-visual-crossing-timeline-weather-api/

jat255 avatar Nov 06 '22 22:11 jat255

Some research results:

  • OpenMeteo seems ideal, since it's free for non-commercial uses and there are no API keys. Their "historical API" is delayed by 5-7 days, however, which is not great. The "forcecast API" only goes back ~6 months. I suppose it would be possible to choose which one to use depending on the activity date, but that's not super simple
  • Visual Crossing (from the link I posted previously) has (I believe) the same terms as DarkSky; 1000 requests per day and no credit card required. They claim to have 50 years of global coverage history at hourly resolution. They also claim to support open source projects
  • Meteostat's 500/month limit might be limiting if people have a lot of back-dated workouts they want to get weather data for. Given others have no limits or higher limits, I'm leaning against it

jat255 avatar Nov 07 '22 02:11 jat255

Visual Crossing is now available in FitTrackee v0.7.11, thanks @jat255 for the PR.

SamR1 avatar Dec 31 '22 18:12 SamR1