hanaml.M4Sampling a visalization method for time serie data

hanaml.M4Sampling(data, width)

Arguments

data

DataFrame
Time series data whose 1st column is index and 2nd one is value.

width

integer
Sampling Rate. It is an indicator of how many pixels being in the picture.

Value

Return the sampled DataFrame.

Details

This algorithm takes a subset of the original data for visualiztion.

Examples


> data$Collect()
                   Time            y
1   2015-12-05 08:00:29  0.000000000
2   2015-12-05 09:00:29 -0.019810209
3   2015-12-05 10:00:29 -0.014002897
4   2015-12-05 11:00:29 -0.040427794
5   2015-12-05 12:00:29  0.010019414
6   2015-12-05 13:00:29  0.020439365
7   2015-12-05 14:00:29 -0.005506123
8   2015-12-05 15:00:29  0.009907737
......
120 2015-12-10 07:00:29  0.421931228
121 2015-12-10 08:00:29  0.416323546

Call the function:


> result <- hanaml.M4Sampling(data = data, width = 20)

Results:


> result$Collect()
                  Time           y
1  2015-12-05 08:00:29  0.00000000
2  2015-12-05 09:00:29 -0.01981021
3  2015-12-05 10:00:29 -0.01400290
4  2015-12-05 11:00:29 -0.04042779
5  2015-12-05 16:00:29  0.03325561
6  2015-12-05 20:00:29  0.10194083
7  2015-12-05 22:00:29  0.01226052
8  2015-12-06 01:00:29  0.04590105
9  2015-12-06 04:00:29  0.12049788
......
51 2015-12-10 06:00:29  0.40630362
52 2015-12-10 07:00:29  0.42193123
53 2015-12-10 08:00:29  0.41632355