weighingGauge-functions | R Documentation |
These functions clean accumulated precipitation data from a weighing gauge. The functions are wrappers for other R and CRHMr functions as well as for functions adapted from MATLAB code by Alan Barr. The typical sequence of operation of the functions is indicated by their numbers, however it it NOT always necessary to execute any given function.
Plots cumulative and interval precipitation
Gap fills the data
Removes spikes
Applies the Savitzky-Golay polynomial filter
Calls PcpFiltPosTh
Simplified reset and jitter removal
Deacumulates the precipitation
Kevin Shook
weighingGaugePlot
weighingGauge1
weighingGauge2
weighingGauge3
weighingGauge4
weighingGauge5
weighingGaugeInterval
## Not run:
# check data - shows jitter, missing values and a large reset
weighingGaugePlot(wg)
# see jitter and missing values only
weighingGaugePlot(wg, endDate = '2010-10-01')
# fill gaps, and check to see if all missing values have been interpolated
wg1 <- weighingGauge1(wg, maxGapLength=10)
weighingGaugePlot(wg1)
# remove the spikes, and check
wg2 <- weighingGauge2(wg1, spikeThreshold=300, maxSpikeGap=3)
weighingGaugePlot(wg2)
# apply the smoothing filter - only for use with high-frequency data
wg3 <- weighingGauge3(wg2, filterLength=5)
weighingGaugePlot(wg3)
# apply Alan Barr's filter
wg4 <- weighingGauge4(wg3, smallDropThreshold = 0.05, serviceThreshold = -50)
weighingGaugePlot(wg4)
# deaccumulate precipitation
wg5 <- weighingGaugeInterval(wg4)
# use simplified method and plot results
# note that the infilled values are used
wg6 <- weighingGauge5(wg1)
weighingGaugePlot(wg6)
wg7 <- weighingGaugeInterval(wg6)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.