MyNixOS website logo
Description

R Client for the BIODATACR Biodiversity Data Platform of Costa Rica.

Provides functions to query occurrence records, species information, and datasets from BIODATACR <https://biodiversidad.go.cr>, the national biodiversity information platform of Costa Rica managed by the Technical Office of CONAGEBIO, Costa Rica. Built on the Atlas of Living Australia (ALA) API infrastructure.

rbiodatacr

rbiodatacr rbiodatacr website

R-CMD-check License:MIT Lifecycle:experimental

rbiodatacr is an R client for querying BIODATACR, the national biodiversity information platform of Costa Rica managed by the Technical Office of CONAGEBIO (Comision Nacional para la Gestion de la Biodiversidad, Costa Rica).

Installation

remotes::install_github("ManuelSpinola/rbiodatacr")

Main functions

FunctionDescription
bdcr_count()Count available records for a taxon
bdcr_count_batch()Count records for multiple taxa
bdcr_occurrences()Download occurrence records for a taxon
bdcr_occurrences_batch()Download occurrence records for multiple taxa
bdcr_species_search()Search taxonomic information in the BIE index
bdcr_quality_check()Evaluate record quality and assign flags

Basic usage

library(rbiodatacr)

# Check data availability
bdcr_count("Panthera onca")
# Download occurrence records
df <- bdcr_occurrences("Panthera onca", rows = 50)
dplyr::glimpse(df)
# Query for multiple species
species <- c("Tapirus bairdii", "Panthera onca", "Ara ambiguus")
counts  <- bdcr_count_batch(species)
counts
# Quality control
df_qc <- bdcr_quality_check(df)
dplyr::count(df_qc, quality_flag, sort = TRUE)

Complete workflow

library(rbiodatacr)
library(dplyr)

# 1. Explore data availability
species <- c("Tapirus bairdii", "Panthera onca",
             "Ara ambiguus",    "Bradypus variegatus")

counts <- bdcr_count_batch(species)

# 2. Download species with sufficient data
with_data <- filter(counts, n_records >= 10)

occ_list <- bdcr_occurrences_batch(
  taxa = with_data$taxon,
  rows = 200
)

# 3. Quality control and consolidate
df_final <- purrr::map(occ_list, bdcr_quality_check) |>
  bind_rows(.id = "taxon") |>
  filter(quality_flag == "ok",
         !is.na(decimalLatitude),
         !is.na(decimalLongitude))

# 4. Summary
df_final |>
  count(taxon, sort = TRUE) |>
  rename(clean_records = n)

About BIODATACR

BIODATACR is built on the infrastructure of the Atlas of Living Australia (ALA).

License

MIT © Manuel Spinola

Logo

Tapir silhouette by Gabriela Palomo-Munoz via PhyloPic, licensed under CC BY 3.0.

Metadata

Version

0.1.1

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows