bestWU: Chooses the most updated meteorological data for a city from...

View source: R/get_timeseries.R

bestWUR Documentation

Chooses the most updated meteorological data for a city from a set of two choices

Description

Receives a set of meteorological data and return the most complete for a given city.If both are good, the first is returned.

Usage

bestWU(series, var)

Arguments

series

list of the competing time series. See examples.

var

name of the meteorological variable

Value

data.frame with the best series

Examples

NOT USE: con <- dbConnect(RSQLite::SQLite(), "../../AlertaDengueAnalise/mydengue.sqlite")
series1 = getWU(stations = 'SBCP',vars="temp_min", datasource= con)
series2 = getWU(stations = 'SBME',vars="temp_min", datasource= con)
res = bestWU(list(series1, series2),var="temp_min")
tail(res)

AlertaDengue/AlertTools documentation built on Nov. 27, 2024, 11:55 p.m.