iterator.runZip: Iterate over all meters in a zip code, extracting features...

Description Usage Arguments

View source: R/iterator.R

Description

Function that looks up local weather and all meter data for the passed zip code (once) and caches them and then looks up all meter ids in the passed zip code calls iterator.iterateMeters with those meter ids and the pre-loaded weather and meter data. This runs faster than calling ids individually, which load individual meter data and similar weather data over and over.

Usage

1
2
iterator.runZip(zip, custFn, cacheResults = F, ctx = new.env(),
  as_df = FALSE, ...)

Arguments

zip

The zip code to use for the weather, meter ids, and meter data lookups

custFn

The feature function(s) to call on MeterDataClass instances from within the 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 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.

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.