Description Usage Arguments Details Value Note Examples
Get data on ESA action petitions
1 | get_petitions_table(tsn = NULL)
|
tsn |
The TSN identifier for a species, or NULL for all [default = NULL] |
ECOS provides a 'slot' for a table of petitions for species, but
that table is javascript-generated. Interestingly, we can get the raw data
using a GET call. The request is keyed to the species TSN, which
is the key used by ITIS, not the 'Species Code' that FWS uses for most other
identifiers. The default tsn = NULL
will get all of the petition data,
but there is no reliable key to link petitions to species.
A data_frame with 11 variables:
The title given by ECOS
The date of the petition
The states, countries, or regions covered; comma-sep
A semicolon-separated list of petitioners
A semicolon-separated list of requested actions
FWS's conclusion on the petition
URL to FWS's conclusion, if any
Whether FWS considers the petition active
A semicolon-separated list of documents that comprise the petition
A semicolon-separated list of URLs to the petition documents, if any
The TSN of the query
The structure of the returned data_frame could be improved to expand the variables that are stored as strings of semicolon-delimited lists, but at the cost of substantially larger (and perhaps more confusing) dfs.
1 2 3 4 5 6 7 8 9 | ## Not run:
url <- "https://ecos.fws.gov/ecp0/profile/speciesProfile?spcode=A001"
pet <- get_species_tsn(url) %>% get_petitions_table()
# or
pet <- get_species_url("Myotis sodalis") %>%
get_species_tsn() %>%
get_petitions_table()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.