extractCleanGridSpyCircuit: Loads cleaned grid spy power data for a given circuit between...

extractCleanGridSpyCircuitR Documentation

Loads cleaned grid spy power data for a given circuit between two dates into a data.table

Description

extractCleanGridSpyCircuit loops over all clean household grid spy data files and loads each in turn using readr::read_csv. It filters each file to extract data for particular circuits between two dates and creates some derived time/date variables before using rbind to create a single data.table which is saved but not returned.

Usage

extractCleanGridSpyCircuit(fPath, exFile, circuitPattern, dateFrom, dateTo)

Arguments

fPath

location of files to load

exFile

location to save the results

circuitPattern

the circuit pattern to match

dateFrom

date to start extract (inclusive)

dateTo

date to end extract (inclusive)

Details

Function matches circuitPattern to extract specific circuits and selects observations between dateFrom and dateTo. Use this to extract any circuit you want between any given dates.

circuitPattern is passed to the data.table operator %like% so wild cards & stuff may work. YMMV

Use of readr::read_csv enables .gz files to be autoloaded and proper parsing of dateTimes.

Author(s)

Ben Anderson, b.anderson@soton.ac.uk


CfSOtago/GREENGridData documentation built on June 10, 2022, 8:03 p.m.