read_BDHI {hydroToolkit}R Documentation

Reads data from Base de Datos Hidrológica Integrada (BDHI) - Argentina

Description

Reads files downloaded from the Base de Datos Hidrológica Integrada (BDHI) as a data frame.

Usage

read_BDHI(file, colName, timeStep, is.Wdir = FALSE)

Arguments

file

string with the name (including extension) of the file.

colName

string with variable name. E.g.: Qmd(m3/s)

timeStep

string with time step: 'month', 'day', 'day/3', '4h' or 'hour'.

  • 'day': data recorded once a day

  • 'month': data recorded monthly

  • '4h': applies to atmospheric pressure time series only

  • 'day/3': applies to wind related variables, relative humidity, and dry bulb temperature'

  • 'hour': in case you have to deal with hourly data.

is.Wdir

a logical value indicating if the variable is wind direction. Default value is set to FALSE.

Value

A data frame with two columns: date and variable. Gaps between dates are filled with NA_real_ and duplicated rows are eliminated automatically.

Examples

# Relative path to raw data
full_path <- system.file('extdata', package = "hydroToolkit")

# Apply function
guido_Qmd <- read_BDHI(file = paste0(full_path, '/Qmd_Mendoza_Guido'), 
                colName = 'Q(m3/s)', timeStep = 'day')


[Package hydroToolkit version 0.1.0 Index]