jabotR::jabot_coverage()jabot_coverage
Description
Measures how well a JABOT-hosted herbarium represents the Flora e Funga do Brasil (FFB). Unlike jabot_gaps (which focuses on what is missing), this function characterises what is present, computing coverage ratios at every taxonomic and geographic level:
Overall representativeness (% of FFB species held in the herbarium)
Coverage by group, family, and phytogeographic domain
Family-level bar charts ranked by coverage (best- and worst-covered)
Choropleth map of % coverage by Brazilian state
Summary statistics table
An HTML report (always generated) and optional PDF / PNG exports of every individual figure
Details
Coverage is defined as: =
The function follows the same data-preparation pipeline as jabot_gaps: FFB data are parsed, JABOT records fetched, and synonym names resolved before the comparison is made.
Arguments
| Argument | Description |
|---|---|
| herbarium | Character. Herbarium acronym in uppercase (e.g. "RB"). |
| jabot_path | Character or NULL. Path to a directory holding previously downloaded JABOT DwC-A files. When NULL (default) the records are downloaded automatically via jabot_download. |
| format | Character vector. Static formats for saving individual figures: "pdf", "png", or both. The HTML report is always generated. |
| fig_width | Numeric. Width of saved figures in inches. Default 10. |
| fig_height | Numeric. Height of saved figures in inches. Default 6. |
| open_report | Logical. If TRUE (default), opens the HTML report in the default browser after rendering. |
| verbose | Logical. If TRUE (default), progress messages are printed. |
| dir | Character. Output directory. Defaults to "<herbarium>_representativeness". |
Value
Invisibly returns a named list with all computed data frames and ggplot2 objects. The HTML report (and optional figures) are written to dir.
Examples
# Full run - renders HTML and saves PDF figures
jabot_coverage(herbarium = "RB",
format = "pdf",
dir = "RB_representativeness")
# Re-run using cached data
jabot_coverage(herbarium = "RB",
jabot_path = "jabot_download",
format = c("pdf", "png"))