bdmep_import: Import data from Brazilian meteorological stations

Description Usage Arguments Details Value Author(s) Examples

View source: R/bdmep.R

Description

Import data from Brazilian meteorological stations

Usage

1
2
3
4
bdmep_import(id = c("83844", "83967"), sdate = "01/01/1961",
  edate = format(Sys.Date(), "%d/%m/%Y"), email = "[email protected]",
  passwd = "your-password", verbose = TRUE, destdir = NULL,
  na.strings = "-9999")

Arguments

id

A character vector with codes of meteorological stations

sdate

Start date in "d/m/Y" format

edate

End date in "d/m/Y" format, default values format(Sys.Date(), "%d/%m/%Y")

email

E-mail to access BDMEP

passwd

Password to access BDMEP

verbose

If TRUE, prints login sucessfull.

destdir

A character string with the path where the downloaded data is saved. If it is NULL, data will not be saved in disk.

na.strings

a character string which is to be interpreted as NA values. na.strings is only used when destdir is not NULL.

Details

The data are in sub-daily time scale. A minimum data quality control is applied to the data. This include: a chronological sequence check; filling data from missing dates with NA; remove duplicated data. Time variables (year, month, day, hour) are aggregated into a POSIX object in UTC

Value

A data frame with variables in columns (see bdmep_description) and observations (date and time) along rows.

Author(s)

Jonatan Tatsch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# download data for Santa Maria and Porto Alegre
metdata <- bdmep_import(id = c("83936", "83967"),
                        sdate = "01/01/1961",
                        edate = format(Sys.Date(), '%d/%m/%Y'),
                        email = "[email protected]",
                        passwd = "your-password",
                        verbose = TRUE)
head(metdata)
tail(metdata)
summary(metdata)

lhmet/inmetr documentation built on May 21, 2019, 6:08 a.m.