2

At least for Daily?

https://api.darksky.net/forecast/[key]/42.3601,-71.0589,1554264000?exclude=minutely

(Date is 2019-04-03T04:00:00Z and location is New York New York.

Daily shows:

 "daily": {
        "data": [
            {
                "apparentTemperatureHigh": 64.73,
                "apparentTemperatureHighTime": 1554325200,
                "apparentTemperatureLow": 36.19,
                "apparentTemperatureLowTime": 1554375600,
                "apparentTemperatureMax": 64.73,
                "apparentTemperatureMaxTime": 1554325200,
                "apparentTemperatureMin": 32.46,
                "apparentTemperatureMinTime": 1554289200,
                "cloudCover": 0.59,
                "dewPoint": 31.22,
                "humidity": 0.59,
                "icon": "rain",
                "moonPhase": 0.94,
                "ozone": 401.33,
                "precipIntensity": 0.0111,
                "precipIntensityMax": 0.0546,
                "precipIntensityMaxTime": 1554282000,
                "precipProbability": 1,
                "precipType": "rain",
                "pressure": 1013.35,
                "summary": "Rain in the morning.",
                "sunriseTime": 1554287063,
                "sunsetTime": 1554333169,
                "temperatureHigh": 64.73,
                "temperatureHighTime": 1554325200,
                "temperatureLow": 40.55,
                "temperatureLowTime": 1554375600,
                "temperatureMax": 64.73,
                "temperatureMaxTime": 1554325200,
                "temperatureMin": 38.61,
                "temperatureMinTime": 1554289200,
                "time": 1554264000,
                "uvIndex": 4,
                "uvIndexTime": 1554310800,
                "visibility": 8.45,
                "windBearing": 318,
                "windGust": 24.91,
                "windGustTime": 1554343200,
                "windSpeed": 6.28
            }
        ]

I see the manual says (https://darksky.net/dev/docs#time-machine-request):

precipAccumulation optional, only on hourly and daily The amount of snowfall accumulation expected to occur, in inches. (If no snowfall is expected, this property will not be defined.)

And if it is snow-only then what represents the amount of rain that has fallen?

HankCa
  • 9,129
  • 8
  • 62
  • 83

1 Answers1

3

I received a response from the Dark Sky team.

Thank you for taking the time to write in. If you're looking for the amount of rain that has fallen for a full day you can calculate it by using the precipitation intensity either by the hour (sum up all hours' precipitation intensity for the day) or by the day (multiply the daily precipitation intensity by 24 for the hours). This is something we're planning on providing in the new version of the API but can easily be calculated by the end user as described.

That does make sense though I said I found it confusing to have a field that isn't being used (but the doco says it is (for snow fall)).

All good!

HankCa
  • 9,129
  • 8
  • 62
  • 83