data_etl: Main data ETL

View source: R/data_etl.R

data_etlR Documentation

Main data ETL

Description

Main ETL to ingest WA+ modeled result sets found at location defined by getOption("wa.data"). This location may be specified at run time or via environment variable WA_DATA. Exact location and structure for output data files are still to be defined.

Usage

data_etl(
  iso3 = NULL,
  root = getOption("wa.data"),
  file = file.path("./data-raw/rds/data.rds")
)

Arguments

iso3

3-letter country code of the river basin to ingest. If null, all basin ISO3 listed in ISO3 will be processed. Can be used to manually test new result sets.

root

base directory (local or remote) to scan for input data files (default: package option getOption("wa.data") or environment variable WA_DATA if set)

file

a connection or the name of the file where the R object is saved to. The default behavior is to save the transformed dataset to this package's ./data-raw folder, and to include it as a built-in package dataset (this is done automatically on package build, see DATA).

Details

A vignette is available to describe the current approach.

Value

normalized data.table with variables: -

Examples

data <- data_etl("mli")


mbacou/WADashboard documentation built on Jan. 3, 2023, 6:21 p.m.