sanityCheckDataSource: Function to exercise the core features and calls of a...

Description Usage Arguments Details See Also

View source: R/util-dataSource.R

Description

This function exercises the core functions of a DataSource, allowing DataSource authors to check if their DataSource meets the minimal obligations of data retrieval and formatting. It can also be used to pre-populate data caches before a feature run.

Usage

1
sanityCheckDataSource(DATA_SOURCE, useCache = FALSE)

Arguments

DATA_SOURCE

The DataSource to be tested. In VISDOM, there is a convention to put the active DataSource into the global environment with the name DATA_SOURCE, so this code follows that naming convention, even though you are passing in the data source.

useCache

Boolean to control whether or not the DataSource should rely upon its data cache to retrieve data. If True and called with an empty cache, the function can be used to pre-populate the caches with id lists, geo code, meter data by geo code, and weather data by geo code.

Details

While these checks are not comprehensive, they represent the main functions exercised during a feature extraction run. DataSource authors should feel free to add functions to their DataSource and alter existing function signatures to meet their individual requirements. As long as this function still runs without errors, generic iterator functions should still work. The iterator relies on the ability to break ids and meter data down to geo code level sub-groups, to request all weather and meter data for a zip code, and to be able to instantiate a MeterDataClass object with the returned meter data and weather data.

If this function no longer runs on your DataSource, then advanced users can write their own iteration methods that break down the feature extraction problem differently.

See Also

DataSource


ConvergenceDA/visdom documentation built on May 6, 2019, 12:51 p.m.