Smart Meter data analysis tools for R
VISDOM relies most heavily on the following core functions. See the example vignettes for examples of their usage:
DataSource
: An S3 class that implements the set of standard data source function for your data.
MeterDataClass
: S3 class that holds meter data in both vector time series and daily matrix formats, associated weather data, and several supporting functions.
TestData
: Example data source S3 class that implements all required data source functions and generates random synthetic data for use in testing and examples.
WeatherClass
: S3 class that holds weather data and related functions.
basicFeatures
: Function that implements a full suite of "basic" feature calculations, which include annual, seasonal, monthly, hour of day averages and variances, and other simple statistics, like simple correlation between outside temperature and consumption.
dbCfg
: S3 class that can parse a database config from text file. This is used by the util-dbUtil.R file to connect to the configired database.
run.query
: Main function used to run SQL queries to load and cache data.
iterator.callAllFromCtx
: Function that iterates through all feature algorithms listed in the configuration ctx environment and returns a concatenated named list of all resulting features for a given MeterDataClass instance.
iterator.iterateMeters
: Function that iterates through all passed meter ids to instantiate MEterDataClass for each and call one or more feature extraction functions on each. This requires a properly configured data source, database connection (if applicable) and is further configured using fields in the ctx context object.
iterator.iterateZip
: 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.
iterator.runMeter
: Utility function that runs the configured set of featture functions on a single passed meter. This is useful for testing and feature development, but also as the function called by parallelizable methods like apply, and the *ply function of plyr.
iterator.todf
: The iterator.iterate* functions return lists of feature lists, indexed by meter id. This function converts all the scalar features in this data structure into a single data.frame, one row per meter id.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.