1. Go to this page and download the library: Download thominj/data-miner library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Set bins and add data in the constructor
$histogram = new thominj\DataMiner\Histogram($bins, $data);
// Set bins in the constructor, add data later
$histogram = new thominj\DataMiner\Histogram($bins);
$histogram->addData($data);
// Set bins and add data after instancing the histogram
$histogram = new thominj\DataMiner\Histogram();
$histogram->setBins($bins);
$histogram->addData($data);
// Online mode
$histogram = new thominj\DataMiner\Histogram($bins);
// Add some data
$histogram->addData($data);
// Get the result
print_r($histogram->getResult());
// Add some more data
$histogram->addData($data);
// Get the new result
print_r($histogram->getResult());