get_species: Get Species list data from Common API

View source: R/get_species.R

get_speciesR Documentation

Get Species list data from Common API

Description

This function accesses the api endpoint to for Species list available in Common. Only the fields spc, spc_nmco, spc_nmsc and species_at_risk are returned unless detail=TRUE is specified in the filter_list. The optional filter list can be used to return species based on part of their common or scientific name.

Usage

get_species(filter_list = list(), to_upper = TRUE)

Arguments

filter_list

list

to_upper
  • should the names of the dataframe be converted to upper case?

Details

See https://intra.glis.mnr.gov.on.ca/common/api/v1/swagger/ and filter by "species" for the full list of available filter keys (query parameters)

See https://intra.glis.mnr.gov.on.ca/common/species/ for the full list of fish species

Value

dataframe

Author(s)

Adam Cottrill adam.cottrill@ontario.ca

Examples


species <- get_species()
trout <- get_species(list(spc_nmco__like = "trout"))
goby <- get_species(list(spc = 366, detail = TRUE))

AdamCottrill/glfishr documentation built on Aug. 9, 2024, 5:47 p.m.