# pixel-stats

> Calculate Statistics (histogram, max, mean, min, mode, range, sum) for Imagery Pixels

Latest version **0.0.0** (published 2020-09-06) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install pixel-stats
pnpm add pixel-stats
yarn add pixel-stats
bun add pixel-stats
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2020-09-06 |
| First published | 2020-09-06 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Daniel J. Dufour |
| Maintainers | danieljdufour |
| Keywords | geotiff, img, imagery, pixel, satellite, stats, statistics |

## Links

- npm: https://www.npmjs.com/package/pixel-stats
- Repository: https://github.com/DanielJDufour/pixel-stats
- Homepage: https://github.com/DanielJDufour/pixel-stats#readme
- Issues: https://github.com/DanielJDufour/pixel-stats/issues
- npm.io page: https://npm.io/package/pixel-stats

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.0.0 (latest) — 2020-09-06

## README

:warning: This library is a work in progress.

# pixel-stats
Calculate Statistics for Imagery Pixels

# known limitations
This package currently supports the following statistics: histogram, min, max, mean, mode, and sum.
Support for standard deviation and median is forthcoming.

# install
```bash
npm install pixel-stats
```

# usage
```javascript
const calc = require('pixel-stats');

const pixels = [band1array, band2array, band3array];

const options = {
    interleaved: false,
    max: true,
    mean: true,
    median: true,
    mode: true,
    min: true,
    sum: false // don't return the sum of each band
};

const stats = calc(pixels, options);
```

# cloud optimized geotiffs
If you are looking to calculate statistics for a geotiff, consider using [geotiff-stats](https://github.com/geotiff/geotiff-stats).

---
_Source: https://npm.io/package/pixel-stats · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
