~javiljoen/lttb-r

LTTB algorithm for downsampling time series (R implementation)
Update links to source & bug tracker in readme
10bbaa62 — javiljoen 6 years ago
document data set
0d69d931 — javiljoen 6 years ago
convert to R package

clone

read-only
https://git.sr.ht/~javiljoen/lttb-r
read/write
git@git.sr.ht:~javiljoen/lttb-r

You can also use your local clone with git send-email.

#LTTB

An R implementation of Steinarsson’s Largest-Triangle-Three-Buckets algorithm for downsampling time series–like data

Based on the original JavaScript code:

https://github.com/sveinn-steinarsson/flot-downsample

and:

Sveinn Steinarsson. 2013. Downsampling Time Series for Visual Representation. MSc thesis. University of Iceland.

The R package comes with a test data set downloaded from http://flot.base.is/ and converted from JSON to tab-delimited format. The resulting graphs look pretty similar to me.

#Installation

In R:

remotes::install_git('https://git.sr.ht/~javiljoen/lttb-r')

#Usage

library(LTTB)
?LTTB
example(LTTB)

#Bug tracker

If you find a bug or have an idea for improving this script, please submit it here:

https://todo.sr.ht/~javiljoen/LTTB.R