Skip to contents

msens 0.5.1

  • Getting-started article: score-surface section. The msens article now maps the sensitivity score surfaces — the equal-weight composite plus each per-category component — served as raster tiles by titiler-v8 via a live cell_id → value SQL over cell_metric (no per-metric COG; the scored cells are the raster). It reports titiler cell_stats() per surface (proof the tiles carry real values) and a leaflet layers-control to toggle between them.

  • pra_score_delta() is now schema-adaptive across the v8 valueval reserved-word rename. The Program-Area score/key column is value in a v7 sdm.duckdb but val in v8, so the previously hard-coded z.value errored on any v8 database (“Table z does not have a column named value”) — it had only ever worked for v7. The column is now resolved per connection, so v7↔︎v8 and v8↔︎v8 comparisons both work. Regression-tested in test-validate.R against synthetic val/value DBs. Powers the new parameterized workflows/validate_versions.qmd report.

msens 0.5.0

The v8 “Marine Atlas” modeling + serving pass, part 2 — merge rules extracted to the package (single source of truth) and the read/score API made to compose off one connection.

  • Merge rules as a single source of truth. New merge.R: merge_sql() and turtle_sql() return the exact SQL for the two-surface merge (global viz am ∪ range; US-scoped, v7-faithful scoring surface with the AquaMaps no-EEZ constraint) and the multiplicative turtle merge. The workflows notebooks now call these and test-merge.R asserts them (one synthetic fixture per taxon category), so the notebook and the tests can never drift.
  • attach_atlas() now creates the table views (via the new exported atlas_views()), mirroring the serving serve.duckdb, so the calc/score helpers that reference bare table names (scores_for_pra(), species_for_cells(), scores_for_cells()) compose directly — e.g. scores_for_pra(attach_atlas(anon = TRUE), pra_key) just works. test-atlas.R guards it.
  • Getting-started article + STAC alignment. The msens article now walks attach → browse → search the STAC catalog → retrieve + map a whole-range COG → score a Program Area (flower plot) → species. The v8 STAC catalog reads cleanly in R (rstac::read_stac() for the static catalog — not stac(), which is for STAC API servers) and Python (pystac); rstac added to Suggests.
  • cells_from_ranges() uses terra touches-rasterize as the fast default (keeping the exact_extract coverage option) — big speed-up on large ranges.
  • cell_tile_url() / cell_stats() default base → the v8 titiler-v8 factory (accepts ?mdl_key=). The legacy v7 titilecache Varnish takes ?sql= and 422s on mdl_key, which had left default-base callers (e.g. the article’s map) with blank tiles.

msens 0.4.0

The v8 “Marine Atlas” foundation: read the S3 Parquet release, ingest source models onto the global 0.05° grid, publish native + gridded representations, and emit a STAC catalog.

msens 0.3.4

  • cell_tile_url() gains a color argument for single-color mask tiles: when set to a hex string (e.g. "#222222"), the URL uses the msens TiTiler factory’s color= query param, which renders every valid pixel in that flat RGBA color and ignores colormap / rescale. Used by the mapgl app’s “Cells outside Program Areas” overlay — replaces the old msens::add_cells(r_outside_pra, colors = c("#222222","#222222"), ...) pattern that shipped a terra raster as a base64 image source.

msens 0.3.3

msens 0.3.2

msens 0.3.1

  • Pin mapgl (>= 0.4.5.9000) and add Remotes: walkerke/mapgl so install_github() pulls the dev build that exports add_pmtiles_source() (needed by add_pmfill() / add_pmline()). Fixes a silent install failure on fresh environments where the pinned CRAN snapshot still served mapgl 0.1.3.

msens 0.3.0

msens 0.2.1

  • Added mapping functions for use in docs and map apps, including raster cells (add_cells()), and using PMtiles as vectors sources to add fills (add_pmfill(), eg for Program Area scores), outlines (add_pmline(), eg for Ecoregion outlines), and labels (add_pmlabel(), eg for Ecoregion names and Program Area acronymns).

msens 0.2.0

  • Swapped polygons:
    • OLD: hierarchy ply_shlfs > ply_rgns (and *_s05 simplifications) that were clipped to US EEZ.
    • NEW: hierarchy ply_boemrgns > ply_ecorgns | ply_planareas > ply_ecoareas, which are the intersection of ply_ecorgns and ply_planareas. Created *_s05 simplifications of each. The new polygons conform to BOEM’s original nomenclature for “OCS Regions”, Planning Areas” and “Ecoregions”. These polygons are not clipped to the US EEZ.

msens 0.1.2

msens 0.1.1

msens 0.1

  • Added data basic Outer Continental Shelf (OCS) regions ply_shlfs and BOEM Planning Regions ply_rgns with simplified to 5% variants (ply_shlfs_s05, ply_rgns_s05).