* allow area-weighted statistics by adding `coverage` option in `rio_tiler.utils.get_array_statistics`
python
Data Array
1, 2
3, 4
data = numpy.ma.array((1, 2, 3, 4)).reshape((1, 2, 2))
Coverage Array
0.5, 0
1, 0.25
coverage = numpy.array((0.5, 0, 1, 0.25)).reshape((2, 2))
stats = utils.get_array_statistics(data, coverage=coverage)
assert len(stats) == 1
assert stats[0]["min"] == 1
assert stats[0]["max"] == 4
assert stats[0]["mean"] == 1.125 (1 * 0.5 + 2 * 0.0 + 3 * 1.0 + 4 * 0.25) / 4
assert stats[0]["count"] == 1.75 (0.5 + 0 + 1 + 0.25) sum of the coverage array
stats = utils.get_array_statistics(data)
assert len(stats) == 1
assert stats[0]["min"] == 1
assert stats[0]["max"] == 4
assert stats[0]["mean"] == 2.5
assert stats[0]["count"] == 4
* add `rio_tiler.utils.get_coverage_array` method to create a `coverage %` array
* add `cmocean` colormaps
<img src="https://raw.githubusercontent.com/cogeotiff/rio-tiler/main/docs/src/img/colormaps_for_oceanography.png" style="max-width: 500px;">
* allow uppercase in `cmap.get` method
python
from rio_tiler.colormap import cmap
Before
cm = cmap.get("greys")
Now
cm = cmap.get("Greys")