Skip to content

USFWS/servcat

Repository files navigation

servcat The servcat R package hex showing a fish, bird, and files.

servcat provides an R interface to ServCat, the authoritative repository for U.S. Fish and Wildlife Service (FWS) data and reference information.

Use this package to search ServCat, retrieve reference metadata, inspect related units and subject categories, access saved collections, retrieve lookup values, and download files associated with ServCat references.

Installation

You can install the development version of servcat from GitHub with:

# install.packages("pak")
pak::pak("USFWS/servcat")

Then load the package:

library(servcat)

Usage

A typical workflow might look like this:

library(servcat)

# Search ServCat
results <- search_references(
  criteria = list(
    quickSearch = "Kodiak, goats"
  ),
  top = 100,
  composite = TRUE,
  all_pages = TRUE
)

# Inspect a known reference ID
ref <- get_references(140411)

# Retrieve related metadata
keywords <- get_keywords(140411)
files <- get_files(140411)
units <- get_units(140411)
subjects <- get_subjects(140411)
bboxes <- get_bboxes(140411)
taxa <- get_taxa(140411)

# Download associated files and inspect per-file status
downloaded_files <- download_files(
  reference_id = 140411,
  path = "data-raw/servcat-files"
)

downloaded_files[, c("resourceId", "success", "error")]

Getting help

Contact a project maintainer for help with this repository.

Contribute

Contact the project maintainer for information about contributing to this repository.

Submit a GitHub Issue to report a bug or request a feature or enhancement.


This work is licensed under a Creative Commons Zero Universal v1.0 License.

About

Interact with ServCat in R.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages