Learn R Programming

natserv

natserv NatureServe R client

NatureServe is a non-profit organization that provides wildlife conservation related data to various groups including the public.

All functions in this package are prefixed with ns_ to prevent collision with other pkgs.

You no longer need an API key.

See also the taxize book (https://taxize.dev/) for a manual on working with taxonomic data in R, including with NatureServe data.

Installation

Stable version from CRAN

install.packages("natserv")

Development version

remotes::install_github("ropensci/natserv")
library('natserv')

Search

ns_search_comb(text = "robin", page = 0, per_page = 5)
#> $results
#> # A tibble: 5 x 14
#>   recordType elementGlobalId uniqueId nsxUrl elcode scientificName
#>   <chr>                <int> <chr>    <chr>  <chr>  <chr>         
#> 1 SPECIES             100637 ELEMENT… /Taxo… ABPBJ… Copsychus sau…
#> 2 SPECIES             102323 ELEMENT… /Taxo… ABPBJ… Turdus grayi  
#> 3 SPECIES             102179 ELEMENT… /Taxo… ABPBJ… Turdus migrat…
#> 4 SPECIES             105536 ELEMENT… /Taxo… ABPBJ… Turdus migrat…
#> 5 SPECIES             105850 ELEMENT… /Taxo… ABPBJ… Turdus rufopa…
#> # … with 22 more variables: formattedScientificName <chr>,
#> #   primaryCommonName <chr>, primaryCommonNameLanguage <chr>,
#> #   roundedGRank <chr>, nations <list>, lastModified <chr>,
#> #   speciesGlobal$usesaCode <lgl>, $cosewicCode <lgl>, $saraCode <lgl>,
#> #   $synonyms <list>, $otherCommonNames <list>, $kingdom <chr>, $phylum <chr>,
#> #   $taxclass <chr>, $taxorder <chr>, $family <chr>, $genus <chr>,
#> #   $taxonomicComments <chr>, $informalTaxonomy <chr>, $infraspecies <lgl>,
#> #   $completeDistribution <lgl>, gRank <chr>
#> 
#> $resultsSummary
#>                            name value
#> 1                          page     0
#> 2                recordsPerPage     5
#> 3                    totalPages    26
#> 4                  totalResults   126
#> 5                 species_total   103
#> 6                         total    23
#> 7                       classes     0
#> 8                    subclasses     0
#> 9                    formations     0
#> 10                    divisions     0
#> 11                  macrogroups     1
#> 12                       groups     1
#> 13                    alliances     3
#> 14                 associations    18
#> 15 terrestrialEcologicalSystems     0

See the vignette (https://docs.ropensci.org/natserv/articles/natserv.html) for more examples.

Meta

  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for natserv in R doing citation(package = 'natserv')
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Copy Link

Version

Install

install.packages('natserv')

Monthly Downloads

943

Version

1.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

May 16th, 2020

Functions in natserv (1.0.0)

ns_search_comb

Combined search
ns_search_eco

Ecosystem search
nat_states

A data.frame with 49 rows and 2 columns
ns_export

Search exports
ns_id

Get taxon by uid
natserv-package

natserv
ns_altid

Get taxon by uid, id, or elCode
ns_ecohier

Get a summary of the upper level hierarchy for an Ecosystem record
ns_search_spp

Species search