View source: R/get_timeseries.R
getWU | R Documentation |
Create weekly time series from meteorological station data in server taking the mean of the daily values.
getWU(
stations,
vars = "temp_min",
finalday = Sys.Date(),
iniSE = 201001,
datasource = con
)
stations |
station code (4 digits). |
vars |
vector with meteorological variables. Available variables: "temp_min" (default), "temp_max","temp_med","data_dia","umid_min","umid_med","umid_max","pressao_min","pressao_med","pressao_max" |
finalday |
last day. Default is the last available. Format = Y-m-d. |
datasource |
Use "data/WUdata.rda" to use test dataset. Use the connection to the Postgresql server if using project data. See also DenguedbConnect to open the database connection. |
data.frame with the weekly data (cidade estacao data temp_min tmed tmax umin umed umax pressaomin pressaomed pressaomax)
NOT USE: con <- dbConnect(RSQLite::SQLite(), "../../AlertaDengueAnalise/mydengue.sqlite")
res = getWU(stations = c('SBRJ','SBGL'), vars="temp_min", iniSE = 201201)
res = getWU(stations = 'SBRJ', vars=c("temp_min", "temp_med"))
tail(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.