Skip to contents

Read

Functions for reading data.

Store

Connect to, summarize, query and benchmark an obis_h3 DuckDB store from R.

h3_res_table()
H3 resolution table
obis_bench()
Benchmark queries against a store
obis_bench_queries()
The paper's default benchmark query set
obis_h3t_query()
Run a tile SQL at a fixed H3 resolution
obis_store_connect()
Connect to an obis_h3 DuckDB store
obis_store_stats()
Summarize an obis_h3 store (tables, rows, totals)

Analyze

Calculate indicators, and the paper’s analyses: scale curves, rank-column vs subtree, EOV totals, SPUE vs SDM, periods, and place roll-ups.

calc_eov_totals()
Records, species and cells per Essential Ocean Variable
calc_indicators()
Calculate Biodiversity Indicators, including ES50 (Hurlbert index)
calc_period_change()
Change in an indicator between two periods, where both are reliable
calc_period_indicators()
Indicators per period (e.g. decade) and cell
calc_place_indicators()
Indicators rolled up from H3 cells to places
calc_rank_vs_subtree()
Records and species by DwC rank column vs by AphiaID subtree
calc_scale_curves()
Scale curves: indicator summaries across H3 resolutions
calc_spue_cells()
SPUE effort proxy per cell at one resolution
calc_spue_scale()
Scale curves for the SPUE effort proxy
compare_eov_totals()
Compare EOV totals between two stores (e.g. before/after taxonomy gap-fill)
compare_spue_sdm()
Compare the SPUE effort proxy with modeled suitability
h3_raster_to_cells()
Aggregate a raster (e.g. an SDM) to H3 cells
obis_cell_indicators()
Per-cell indicators for a filter at one resolution
obis_rank_presets()
Default taxon-group presets for the rank-vs-subtree comparison
place_cells()
H3 cells covering each place polygon

H3 grid & tiles

Build an H3 grid, and serve indicators as H3 hexagon tiles.

make_hex_res()
Make hexagon feature
build_obis_h3_duckdb()
Build the OBIS H3 DuckDB store
obis_h3t_sql()
Build an h3t tile SQL query for an OBIS biodiversity indicator
obis_h3t_url()
Assemble an h3t tile (or stats) URL for an OBIS indicator

Taxonomy & effort proxy

Resolve children taxa (any rank), close the WoRMS coverage gap from the REST API, and the sightings-per-unit-effort (SPUE) proxy.

calc_spue()
Sightings-per-unit-effort (SPUE) effort proxy, per H3 cell (R reference)
obis_spue_sql()
Build an h3t tile SQL query for the SPUE effort proxy
obis_taxon_children()
Resolve the descendant taxa of a WoRMS AphiaID
obis_taxon_fill_gaps()
Fill gaps in the taxon table from the WoRMS REST API
obis_taxon_orphans()
AphiaIDs present in occ_h3 but missing from the taxon table
obis_taxon_subtree_sql()
Standalone SQL for the AphiaID subtree (descendant taxonIDs)
wm_aphia_records()
Look up WoRMS taxon records by AphiaID

Essential Ocean Variables

GOOS/IOOS biology & ecosystems EOVs as WoRMS AphiaID subtrees, per the IOOS Marine Life Data Network definitions.

obis_eov_aphiaid()
AphiaID seeds for one or more EOVs
obis_eov_bake()
Bake the EOV membership and precomputed-indicator layers into a store
obis_eov_label()
Human-readable EOV label with its taxonomic definition
obis_eov_seeds()
Essential Ocean Variable (EOV) taxonomic seeds
obis_eov_sql()
Build an h3t tile SQL query for an Essential Ocean Variable

Visualize

Functions for visualizing indicators.

gmap_cells()
Map a per-cell table of indicators
gmap_indicator()
Statically map indicators using ggplot
hex_sf()
H3 cells (hex strings) to sf polygons
make_hex_res()
Make hexagon feature
plot_scale_curves()
Plot scale curves
plot_spue_sdm()
Plot SPUE-vs-model calibration

Data

Locally available datasets for running examples.

occ_1960s
OBIS occurrences, temporal sample for the 1960s, limited to 1M records
occ_1970s
OBIS occurrences, temporal sample for the 1970s, limited to 1M records
occ_1980s
OBIS occurrences, temporal sample for the 1980s, limited to 1M records
occ_1990s
OBIS occurrences, temporal sample for the 1990s, limited to 1M records
occ_1M
OBIS occurrences, global sample of 1 million records
occ_2000s
OBIS occurrences, temporal sample for the 2000s, limited to 1M records
occ_2010s
OBIS occurrences, temporal sample for the 2010s, limited to 1M records
occ_SAtlantic
OBIS occurrences, South Atlantic full regional sample
occ_fk
OBIS occurrences, Florida Keys full regional sample