Skip to contents

spdgt.sight provides R wrappers for SpeedGoat’s count data and sightability analysis APIs. It handles authentication, request building, and response parsing so you can work with aerial survey data as tibbles.

Installation

Install from the SpeedGoat Nexus repository:

install.packages(
  "spdgt.sight",
  repos = c(SPDGT = "https://nexus.spdgt.com/repository/public-group/")
)

Quick start

library(spdgt.sight)

# Discover available surveys (logs you in automatically on first call)
sight_read_surveys(species = "Mule Deer")

# Pull observation + design data for a sightability analysis
dat <- sight_read_data(
  species = "Mule Deer",
  survey_type = "Sightability",
  analysis_unit = "North Converse 755",
  bio_year = 2024
)

# Fit a sightability model
sight_fit_model(
  species = "Mule Deer",
  spatial_focus = "DAU",
  bio_year = 2024,
  analysis_unit = "North Converse 755",
  survey_type = "Sightability",
  model = "Mule Deer"
)

# Optimize sample allocation for next year's survey
sight_optimize_design(
  method = "fixed",
  value = 100,
  species = "Mule Deer",
  survey_type = "Sightability",
  analysis_unit = "North Converse 755",
  bio_year = 2024
)

Every function has a name-based variant (e.g., sight_read_data()) and an ID-based variant (e.g., sight_read_data_id()). Use names for interactive work and IDs for programmatic pipelines. See vignette("getting-started") for details.

Lookup helpers

Re-exported from spdgt.core for convenience. Each entity has three variants:

lkup_species()             # all species (tibble)
lkup_species_id("Elk")     # name -> database ID
lkup_dau_opts("Mule Deer") # named vector of DAU options

Available entities: species, surveytype, dau, gmu, strata, ipm_param, models. See the reference documentation for the full list.

Vignettes

Diagnostic check

Verifies authentication, counts API connectivity, and sightability API availability in one call.