
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
downsample-lttb
Advanced tools
Largest Triangle Three Buckets downsample algorithm by Sveinn Steinarsson reshaped into a node.js module
Largest Triangle Three Buckets downsample algorithm by Sveinn Steinarsson reshaped into a node.js module.
This is useful for downsampling large dataseries in order to be able to plot a representative chart shape with a manageable amount of data points.
#Instructions
Install with
npm install git+https://github.com/pingec/downsample-lttb.git
Usage example
var downsampler = require("downsample-lttb");
//provide a series as an array of [x,y] pairs
var dummyDataSeries = [[1,2],[2,2],[3,3],[4,3],[5,6],[6,3],[7,3],[8,5],[9,4],[10,4],[11,1],[12,2]];
//pass the series and number of desired datapoints
var downsampledSeries = downsampler.processData(dummyDataSeries, 3);
console.log(downsampledSeries);
//outputs [ [ 1, 2 ], [ 5, 6 ], [ 12, 2 ] ]
#Downsampled chart series examples
#### of samples: 8614 downsampled to: 500
#### of samples: 8614 downsampled to: 200
#### of samples: 8614 downsampled to: 100
#### of samples: 8614 downsampled to: 50
FAQs
Largest Triangle Three Buckets downsample algorithm by Sveinn Steinarsson reshaped into a node.js module
The npm package downsample-lttb receives a total of 2,655 weekly downloads. As such, downsample-lttb popularity was classified as popular.
We found that downsample-lttb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.