Skip to contents

Read

Fetch data, spatial and non-spatial, especially from APIs

get_species_by_feature()
Get species by feature

Taxonomic

Match taxa from APIs, especially World Register of Marine Species (WoRMS)

clean_sci_name()
Clean a scientific name for taxonomic matching
match_taxa()
Match taxa to spp.duckdb via cascade
wm_rest()
Query WoRMS REST API with multiple requests

Analyze

Analyses

Visualize

Plot and map Seascapes

add_cell_tiles()
Add an msens cell tile layer to a mapgl map
add_cells()
Add a raster cell layer to a map
add_pmfill()
Add a PMTile polygon fill layer to a map
add_pmlabel()
Add symbol label layers from sf point data
add_pmline()
Add PMTile outline line layers to a map
cell_stats()
Fetch msens cell value statistics for a SQL query
cell_tile_url()
Build an msens cell tile URL template
cog_tile_url()
Build a titiler /cog tile URL template for a native COG
ggmap_areas()
Static ggplot map of labeled areas
ggplot_flower()
Build a flower-plot ggplot for component scores
map_cells()
Map raster cells with outlines and labels
map_pmtiles()
Map data on PMTile vector tiles
ms_basemap()
Basemap
plot_flower()
Flower plot of component scores (interactive or static)
tbl_species()
Species table (interactive DT or static gt)

Data

Lookups for easy reference

ply_boemrgns
Polygons of BOEM Regions
ply_boemrgns_s05
Polygons of BOEM Regions, simplified to 5%
ply_ecoareas
Polygons of EcoAreas
ply_ecoareas_s05
Polygons of EcoAreas
ply_ecorgns
Polygons of Ecoregions
ply_ecorgns_s05
Polygons of Ecoregions
ply_planareas
Polygons of Planning Areas
ply_planareas_s05
Polygons of Planning Areas, simplified to 5%

Other

Other functions not defined by the concepts above

HEX_RES
H3 resolution of the v8 sampling grid (~5.16 km^2 per hexagon)
assert_within_tolerance()
Assert a delta table is within tolerance, else error (pure)
atlas_path()
Path to a release component under the atlas base
atlas_tbl()
Read a released derived table (tables/<name>.parquet) as a lazy relation
atlas_views()
Create named views over the released atlas tables
attach_atlas()
Configure a DuckDB connection to read the marine-atlas release from S3
build_targets_list()
Build the targets list from msens: frontmatter
cell_i_grid()
Canonical global 0.5-degree cell index for lon/lat
cell_id_raster()
Cell-ID SpatRaster
cells_from_ranges()
Rasterize range polygons onto the global 0.05° cell grid (whole range)
cells_from_raster()
Resample a raster SDM onto the global 0.05° cell grid
cells_in_polygon()
Cells intersecting a polygon
cells_in_pra()
Cells belonging to a Program Area zone
cells_pct_marine()
Percent of a model's cells that are marine (ocean)
compute_er_score()
Compute extinction risk score from extrisk_code and flags
copy_atlas_parquet()
COPY a DuckDB relation/query to Parquet with the standard v8 options
force_target()
Should this target be forced to rebuild?
grid_spec()
Grid spec for the global cell-id raster
hash_parquet()
Order-independent content fingerprint of Parquet file(s)
hash_query()
Order-independent content fingerprint of a DuckDB table/query
hex_add_membership()
Flag hexes inside a polygon (H3 polyfill membership)
hex_centroids()
Centroids (lon/lat) for BIGINT H3 ids
hex_grid_weights()
Precompute IDW weights from a shared source grid to hex centroids
hex_id_from_lonlat()
H3 cell ids for lon/lat points
hex_id_to_string()
Hex-string form of BIGINT H3 ids (for display)
hex_interp_idw()
Interpolate source values onto hex centroids (inverse-distance weighting)
hex_ocean()
Enumerate the ocean H3 hex tiling from a raster mask (GEOMETRY ONLY)
mass_conservation()
Mass-conservation ratio between a source model and its hex interpolation (pure)
mdl_key_merged()
Compose a merged (ms_merge) model key
mdl_key_parse()
Parse mdl_key(s) into components
mdl_key_raw()
Compose a raw (per-dataset) model key
mean_score()
Weighted mean of component scores
merge_sql()
v8 per-taxon merge rules (single source of truth)
model_hex_from_weights()
Interpolate one model's source values onto hexes with precomputed weights
parse_noaa_status()
Parse NOAA protected_status field
parse_qmd_frontmatter()
Parse msens: frontmatter from pipeline notebooks
pra_score_delta()
Program-Area composite-score delta between two version databases
publish_cog()
Publish one model's cells as a COG
publish_pmtiles()
Publish vector features as PMTiles (tippecanoe)
publish_pmtiles_from_gpkg()
Publish per-model PMTiles from an indexed GeoPackage
publish_pmtiles_models()
Publish per-model PMTiles — one file per mdl_key
rarity_class()
Rarity class from range size (pure)
report_parquet_summary()
Summarize a set of atlas Parquet files for a notebook's ## Outputs section
report_table()
House-style table for pipeline reports
require_duckdb()
Require a modern DuckDB (and optionally the spatial GEOMETRY extension)
score_delta()
Join two versions' scores and compute per-key deltas (pure)
score_delta_summary()
Summary statistics for a delta table (pure)
scores_for_cells()
Aggregate component scores across a set of cells
scores_for_pra()
Precomputed component scores for a Program Area
sdm_db_con()
Connect to SDM DuckDB
sdm_db_path()
Path to SDM DuckDB
sdm_sql_b64()
Encode SQL as urlsafe base64 for the TiTiler sql= query parameter
species_for_cells()
Species table aggregated across a set of cells
spp_db_con()
Connect to species taxonomy DuckDB
stac_build()
Build the full static STAC catalog for a version
stac_cfg()
Default configuration (base URLs) for STAC generation
stac_dataset_collection()
Dataset Collection node
stac_model_cell_item()
Model-surface Item for a (DuckDB-backed) dataset
stac_root_catalog()
Root Catalog node
stac_sdm_props()
Build the SDM properties block shared by Collections and Items
stac_season_cog_item()
Seasonal per-species Item from the NCCOS season-COG metadata
stac_version_collection()
Version Collection node (parent of the dataset Collections)
turtle_sql()
Turtle multiplicative merge rule
write_atlas_parquet()
Write an atlas surface to Parquet (arrow path) with the standard v8 options
write_manifest()
Write a deterministic, content-addressed target manifest