Commit 4bbcaaed by Jan Wijffels

use date range

parent ae43088f
......@@ -93,13 +93,14 @@ observeEvent(input$uiInput_downloadtimeseries, {
result$userdata <- citizenair_userdata()
citizen <- result$userdata$appdata$getCitizenData("timeseries")
result$station <- result$userdata$appdata$getComparisonStation()
period <- lubridate::as.interval(as.POSIXct(input$uiInput_period[1] - 1), as.POSIXct(input$uiInput_period[1] + 1))
period <- lubridate::as.interval(as.POSIXct(input$uiInput_period[1]), as.POSIXct(input$uiInput_period[2] + 1))
#period <- lubridate::as.interval(difftime(input$uiInput_period[2], input$uiInput_period[1]), input$uiInput_period[1])
if(length(result$station) > 0){
showModal(popups$download)
showNotification(sprintf("We halen nu data af vanaf de IRCEL webservice van meetstation %s %s", result$station, result$userdata$appdata$getStationLabel(result$station)))
}
#official <- try(result$userdata$appdata$fetch_timeseries(result$station, time_span = period))
official <- try(result$userdata$appdata$fetch_timeseries(result$station))
official <- try(result$userdata$appdata$fetch_timeseries(result$station, time_span = period))
#official <- try(result$userdata$appdata$fetch_timeseries(result$station))
removeModal()
if(inherits(official, "try-error")){
showNotification(sprintf("Er loopt iets fout met het ophalen van de data vanaf de IRCEL webservice: %s", error_message(official)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment