Skip to content

dbojdo/downsampling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web-IT Downsampling Library

A simple interface for Downsampling algorithms

Installation

via Composer

Add the webit/downsampling into composer.json

{
    "require": {
        "php":              ">=7.1",
        "webit/downsampling": "^2.0.0"
    }
}

Usage

use Webit\DownSampling\DownSampler\LargestTriangleThreeBucketsDownSampler;

$data = array();
for ($i=0; $i < 500; $i++) {
    $data[] = [$i, mt_rand(0, 200)];
}

$sampler = new LargestTriangleThreeBucketsDownSampler();
$sampled = $sampler->sampleDown($data, 100);
echo count($sampled); // displays 100

Algorithms provided

About

Downsampling algorithms library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages