Weather App – API

In the week my weather app stopped working. Looked like it was getting no data. Tried connecting via wifi, on mobile data, checked we actually had internet – but nothing. Turns out their API has a new home. Thanks for nothing Apple.

My Weather App

In case you hadn’t realised from the name of my website, I am a little obsessed with the weather. In general I love weather but in particular I love snow. And I am a great fan of seasons. Every time you start getting a bit bored with the weather, it changes to a new set of conditions. Always exciting.

But now we are due for snow, my app actually tells you how many hours till the next snow – and it has stopped working. Drop all projects. This takes priority. Turns out that Apple say they are going to support the API till the end of the year, but they have already proved that it is not going to be reliable.

The original app was my first Android project. You know how it goes when you get a new phone. Other people head straight to the app store and see what they can download. In my case I headed across to coursera, which incidentally was my second home for about 5 years, top recommendations. I’m at LinkedIn learning right now, because someone is paying my subscription – thanks boss!

Several courses later, I had my app with everything working except the slider. No matter, there are only 5 pages to go through, you can cycle through them just as easily. My favourite bits – apart from the snow countdown of course – are the graphs. By looking at the quantity and probability side by side, you get a much better picture than the old 2 drip icon. And it was fun doing the bitmaps.

Two graphs side by side, one showing Hourly Precipitation over time, and one showing Precipitation % Probability over time.

The new API – OpenWeather

Lools like OpenWeather is the solution to the weather problems. Nope – they don’t have precipitation probability. I love my probability graph. Bulleted

Visual Crossing is also good. Need to compare these two now and decide

WeatherAPI – this is another option.

WeatherBit – does have minutely, and it is really small I can probably combine two apis

Next job is to assess Visual Crossing and WeatherAPI and decide which, or use both if necessary.

Anyway – right now we need to take a walk – rained all night and the river was already pretty high yesterday… river is pretty epic, but nothing like the Limpopo right now.

WeatherAPI vs VisualCrossing

WeatherAPIVisualCrossing
Current WeatherYES
Precipitation field☃︎ Total Precipitation
☃︎ Will it rain
☃︎ Chance of rain
☃︎ Precip
☃︎ Precip prob
☃︎ Precip Cover
Snow fields – Daily☃︎ Will it snow
☃︎ Chance of snow
☃︎ Precip Type
☃︎ Snow
☃︎ Snow depth

WeatherAPI gives a nice summary of Current weather.
Visual Crossing wins on the precipitation.

Climacell – No good

This site has probability, so I’ll give it a go. Climacell. It’s the same pricing plan as all the others. Free for the first 1000 calls a day.

This is more difficult to get started with, than the other APIs, but then again it seems to give you more. The documentation is not great. Here is an example call.

https://data.climacell.co/v4/timelines?location=54.8%2C-0.3&fields=humidity,temperature,weatherCode&timesteps=1m,1h&apikey=xxxxx

Time example:

https://data.climacell.co/v4/timelines?location=54.9%2C-0.3&startTime=2021-02-12T06%3a00%3a00%2b0000&endTime=2021-02-12T07%3a00%3a00%2b0000&fields=humidity,temperature,weatherCode,precipitationIntensity,precipitationProbability,precipitationType,cloudCover,windSpeed&timesteps=1m,1h&apikey=xxxxx

I’m liking Climacell more and more. It has a lot of useful data. In fact it is really necessary to start and end time otherwise you just get way too much. It is a bit too much data for the phone.

Rubbish – in the bin. I’m sorry Climacell, it will not snow at 8 degrees C. I think I need to teach you about weather basics. Back to the drawing board. It’s not just that – your weather is wildly different from DarkSky. Not happy at all with it.

ProviderEvaluation
AccuWeatherPaid
Aeris WeatherPaid
API Weather.mgNo probability – actually this has everything except a free tier
ClearAgCan’t find price but it seems to have probability
ClimacellInaccurate data
Only one location
GoogleDeprecated
Meteo MaticsPaid
National Weather Service APIUSA only I think
OpenWeatherMapNo probability – not even precipitation
StormglassNo probability – this is marine weather – not applicable
Visual CrossingNo minutely data
Weather APINo probability – I’m back here, does ‘chance of rain’
Weather 2020Doesn’t seem to have an API
WeatherbitFree tier – limited weather data, but they do have minutely rain and snow figures
World Weather Online.comPaid
YahooDue to be shut down
WeatherStackNo minutely. They do have probability ie Chance of Rain. Also chance of wind, sunshine, frost, snow, thunder and more – that is very nice. But only 250 API calls a month – that’s pretty hectic.

Below are my notes and they make no sense, but it’s a bit easier than trawling through my browser history trying to find that API I saw two weeks ago, but I can’t remember what it is called

Good

`https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/weatherdata/forecast?locations=Herndon,VA,20170&aggregateHours=24&unitGroup=us&shortColumnNames=false&contentType=csv&key=xxx`

Here are some visual crossing calls:

https://api.weather.gov/gridpoints/LWX/96,70/forecast/hourly

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/53.92,-0.36?key=xxx

Nice tool here, thank you WeatherAPI:

https://www.weatherapi.com/api-explorer.aspx

http://api.weatherapi.com/v1/forecast.json?key=xxx&q=53.92,-0.367&days=1&aqi=no&alerts=no

https://api.weatherbit.io/v2.0/forecast/minutely?lat=53.92&lon=-0.36&key=xxx

This last is real tiny. there is no probability, but you do get a minute by minute rain and snow figure – best we’ve got for minute so far

Not so good

This works without an api key. Not sure what the gridpoints are though:

https://api.weather.gov/gridpoints/LWX/96,70/forecast/hourly

Nice page this – just need an api key: https://api.weather.mg/api-detail-pages/forecast-parameter.html

Found it! Dark Sky again

My last API disappeared on me, so I’ve had no weather app for a while.

But now I’ve found Dark Sky again. It is now called WeatherKit

Need to figure out if it is free, but it is bookmarked here for when I am ready.

☃️

Leave a Reply

Your email address will not be published. Required fields are marked *