Closed dimfalk closed 2 years ago
Date data are only available for scales from 1 day to 1 month and unit is Local Unix Time in seconds.
Example:
jsonlite::read_json("foo.json") |> unlist() |> as.numeric() |> as.POSIXct(origin = "1970-01-01") |> tail(10)
#> [1] "2022-10-19 09:55:55 CEST" "2022-10-20 04:13:57 CEST" "2022-10-21 03:10:32 CEST" "2022-10-22 06:25:11 CEST" "2022-10-23 04:45:01 CEST"
#> [6] "2022-10-24 20:59:49 CEST" "2022-10-25 01:27:18 CEST" "2022-10-26 00:31:34 CEST" "2022-10-27 05:06:32 CEST" "2022-10-28 00:03:53 CEST"
Basically, you get what you ask for. If you really wanted to know the timestamps of the daily minimum/maximum pressure/temperature/humidity recorded (without knowing the observed value per se), you're good to go.
On the other hand, it's hard to believe timestamps are recorded at 1 second resolution, e.g. daily maximum relhum at "2022-10-26 00:31:34 CEST". And even if Netatmo did, who needs this kind of precision?
Coming from original timeseries acquired, the unique selling point of these parameters is not clear yet. All information necessary is availabe, e.g. daily max. relhum timestamps can be derived easily from the xts objects created.
library(netatmo.weather)
fetch_token()
stations <- get_publicdata(ext = get_extent(x = c(6.89, 51.34, 7.13, 51.53)))
xts <- get_measure(stations[1,], period = get_period(), par = "humidity")[[1]]
plot(xts, col = "blue", main = "relative humidity, 5-minutely")
Idea to be dismissed for now. May be reopened at a later stage when needed.