Get data on ESA action petitions

get_petitions_table(tsn = NULL)

Arguments

tsn
The TSN identifier for a species, or NULL for all [default = NULL]

Value

A data_frame with 11 variables:

Petition_Title
The title given by ECOS
Petition_Date
The date of the petition
Area_Covered
The states, countries, or regions covered; comma-sep
Petitioners
A semicolon-separated list of petitioners
Action_Requested
A semicolon-separated list of requested actions
Action_Result
FWS's conclusion on the petition
Action_Result_URL
URL to FWS's conclusion, if any
Active_Petition
Whether FWS considers the petition active
Petition_Doc_Title
A semicolon-separated list of documents that comprise the petition
Petition_Doc_URL
A semicolon-separated list of URLs to the petition documents, if any
TSN
The TSN of the query

Details

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.

Note

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.

Examples

## 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() ## ---------------------------------------------