iterator.iterateZip: Iterate over zip codes, extracting features for meters in...

Description Usage Arguments

View source: R/iterator.R

Description

Function that iterates through all passed zip codes, looks up local weather data (once) and looks up the list of meter ids for each and calls iterator.iterateMeters with those meter ids and the per-loaded weather data. This runs faster than calling ids individually, which can load similar weather data over and over.

Usage

1
2
iterator.iterateZip(zipList, custFn, cacheResults = FALSE, ctx = new.env(),
  clearCachedResultsFromRAM = FALSE, as_df = FALSE, ...)

Arguments

zipList

List of all zip codes to iterate over

custFn

The feature function(s) to call on MeterDataClass instances from within each zip code If it is a list of feature functions, the results will be c()'d together, so make sure the names of their return values are unique!

cacheResults

A boolean flag that indicates whether feature results should be cached as RData. If true, the cached data will be looked up prior to feature extraction to bypass running features for the given zip code while returning the cached results. This can prevent duplicate processing and allow an interrupted batch process to resume processing where it left off. The cache directory is 'getwd()' by default, but can be overridden using 'ctx$resultsCache'.

ctx

The ctx environment that configures the feature run.

clearCachedResultsFromRAM

A boolean that instructs the code to drop previous results from RAM if caching is in effect. This allows for larer runs to be executed and cached without accumulating in RAM. The idea is that after the run, this function will be called again, with useCache=TRUE and this flag set to FALSE, which will simply load and concatenate results from disk to re-create the full set.

as_df

Boolean (defaulted to FALSE) that determines whether iterator.todf is run on the results before returning them.

...

Arguments to be passed into the feature function(s).


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