precipitationChance for currentWeather dataset using future dates

Hi, thanks for the REST API, it's fantastic to have a replacement for DarkSky.

I've noticed that precipitationChance is missing on the currentWeather dataset. If currentAsOf is specified in the request as a future date/time, precipitationChance would be really helpful to have since there appears to be no other way to know the probability of precipitation short of getting an hourly forecast for the same time period.

Could we have precipitationChance added? An additional benefit would be improved symmetry with hourly forecasts.

Thanks,

David

Hi,

The CurrentWeather object generally contains only data that is currently observable, and not forecasts of future conditions. In the present moment, it is either raining or it isn't, and so it doesn't make sense to have precipitationChance, which should always be either 0 or 1.

To get precipitationChance for the remainder of the current day, you can fetch forecastDaily instead and use DayWeatherConditions.precipitationChance for the current day.

See https://developer.apple.com/documentation/weatherkitrestapi/dayweatherconditions.

Hope that helps!

Thanks for the fast response!

To provide a little more context, my primary use-case (~3.8M requests/month) relies on location-specific forecasts at a point in time. A precipitationChance at the daily or hourly level is not useful for my customers who range from professional cyclists in the Tour de France to casual riders preparing for a weekend ride. Knowing when it will likely rain is important information that they use to plan race tactics or decide what to wear.

Currently with DarkSky I am using requests that look like this:

https://api.darksky.net/forecast/${API_TOKEN}/${lat},${long},${unixTime}?exclude=minutely,hourly,flags&units=ca

I'm able to achieve the same result with the currentWeather dataset using currentAsOf to specify the time. This works beautifully, the only thing that's missing is precipitationChance.

DarkSky supports setting the time arbitrarily in the future or past. WeatherKit currently supports currentAsOf for forecasts several days in the future and past. For my app to remain viable, I need this to continue working as it currently does. I'd also really appreciate the addition of precipitationChance.

precipitationChance for currentWeather dataset using future dates
 
 
Q