Created
December 1, 2014 18:27
-
-
Save emhart/1c9d43279338d3a7cb43 to your computer and use it in GitHub Desktop.
Quick snippet for @TimDoherty_ on how to use reol to access IUCN data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Installation | |
install.packages("devtools") | |
library(devtools) | |
devtools::install_github("ropensci/reol") | |
library("Reol") | |
res <- DownloadSearchedTaxa(c("Diceros bicornis","Anolis carolinensis", "Anolis garmani"), to.file=FALSE, exact=TRUE) | |
## Get IUCN status | |
GetIUCNStat(res) | |
### Extract the full page information. | |
### This will give you all the description text from the overview page | |
## http://eol.org/pages/311501/overview | |
GatherDataObjectInformation(res[1])[1,16] | |
## Details can be accessed via other rows, so each new row will be a new field in the details page. | |
## http://eol.org/pages/311501/details | |
## e.g. Biology description from brief summary | |
GatherDataObjectInformation(res[1])[2,16] | |
### Now to what you really want | |
## Get red list assessment | |
GatherDataObjectInformation(res[1])[26,16] | |
## Get red list major threats | |
GatherDataObjectInformation(res[1])[32,16] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment