NAME
App::csvtool::Smudge
- implements the csvtool smudge command
COMMANDS
smudge
$ csvtool smudge -F IDX:FILTER INPUT...
Applies smudging filters to columns of the input, generating new data that is output in the same shape. A "smudge" filter is one that operates on numerical data, attempting to reduce the imact of any individual values and smooth out small variations, emitting values that follow general trends. This assumes that successive rows of data represent successive moments in time, containing measurements or readings taken at each instant.
Different filters can be applied to individual columns, as specified by the --filter
(or -F
) argument. Any columns that are not filtered are simply copied as they stand, and thus do not even have to be numeric in nature.
--filter, -F
A filter specification to apply to a column of data. Specified as a string giving the column index (starting from 1), and the name of the filter. May be specified multiple times to apply multiple different filters for different columns. IDX
may specify multiple field indexes, separated by commas.
FILTERS
The following name templates may be used. Names are parametric, and encode information about how the filter acts.
avgNNN
Applies a moving window average over the previous NNN values.
midNNN
Sorts the previous NNN values and returns the middle one. To be well-behaved, N should be an odd number.
ravgNNN
Recursive average with weighting of 2 ** -NNN
.
total
Running total of every value seen so far.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>