nwrspeciesr 0.1.0
Initial release. Provides a read-only R interface to the U.S. Fish and Wildlife Service NWRSpecies (formerly FWSpecies) occurrence database.
Features
-
get_species_list()retrieves refuge species occurrence records from the publicSpeciesList/itemsendpoint, with optional filters for region, refuge, taxonomic category, occurrence, and ITIS TSN, plus sorting and pagination. -
download_species_list()retrieves records from the CSVDownloadFileendpoint, the documented way to pull all records in a single call when combined with a largerows_per_page. -
get_species_categories()andget_species_occurrences()return the valid category and occurrence values accepted by the API. -
get_refuges()retrieves a live refuge name / unit code crosswalk from the FWS Unit REST API via the suggested fwsunitr package.
Refuge name resolution
-
get_species_list()anddownload_species_list()accept arefuge_nameargument as an alternative torefuge_code. Matching is case-insensitive and tolerant of common variants (e.g. “Kenai”, “kenai nwr”, “Kenai National Wildlife Refuge”). - Names that match more than one refuge (e.g. “Yukon”, matching both Yukon Delta and Yukon Flats) return an informative error listing the candidates.
- A bundled
refugescrosswalk is used by default; a custom or live table may be supplied via thecrosswalkargument.
