dimfalk / netatmo.weather

R wrapper for Netatmo Weather API
GNU General Public License v3.0
3 stars 0 forks source link

`get_period()`: throw warning if a date before 2012-01-01 is used as input #67

Closed dimfalk closed 7 months ago

dimfalk commented 7 months ago

c.f. https://en.wikipedia.org/wiki/Netatmo#Products

library(netatmo.weather)
#> 0.5.4

e <- get_extent("Dresden")
stations <- get_publicdata(e)

# define period in the past, presumably without data availability
p <- get_period(c("2000-01-01", "2000-01-03"))

# try to get observations for a single station 
obs <- get_measure(devices = stations[1, ], 
                   period = p, 
                   par = "temperature", 
                   res = 5)
dimfalk commented 7 months ago
library(netatmo.weather)
#> 0.5.5

e <- get_extent("Dresden")
stations <- get_publicdata(e)

# define period in the past, presumably without data availability
p <- get_period(c("2000-01-01", "2000-01-03"))
#> Warnmeldung:
#> In get_period(c("2000-01-01", "2000-01-03")) :
#> Netatmo's Smart Home Weather Station launched in 2012. 
#>   Please select a later start date for measurement data acquisition.

# try to get observations for a single station 
obs <- get_measure(devices = stations[1, ], 
                   period = p, 
                   par = "temperature", 
                   res = 5)
#> Fehler in get_measure(devices = stations[1, ], period = p, par = "temperature",  : 
#>   Assertion on 'period[1]' failed: Element 1 is not >= 1.32537e+09.