Skip to contents

Calls the msens TiTiler factory /statistics endpoint. Returns a named list with n, min, max, mean, std, p2, p50, p98. Use to set a stable legend rescale that doesn't depend on per-tile computation.

Usage

cell_stats(
  sql,
  mtime = NULL,
  base = "https://titilecache.marinesensitivity.org"
)

Arguments

sql

character(1); same SELECT passed to cell_tile_url()

mtime

character; optional cache-bust tag, see cell_tile_url()

base

character; base URL of the titilecache service

Value

named list of numeric statistics