API Wrapper for IUCN Red List.
Are you a data scientist and you are working in biodiversity? you might find this useful.
Implements all of the functionalities of the IUCN Red List API in an easy to use way.
In some cases, you can call 4 different endpoints from only 1 function, thanks to multiple dispatch.
Set your token, then use all of the wonderful functionality.
set_token("Your Token")
(If you don't have a token, you can get it here)
Check the multiple methods of the functions. If region is not added as an argument then it will return a global assessment.
You can use ID or Name (scientific) of the species.
For more details, you can check the official API Reference. Nevertheless the functions are pretty well commented in the source code, so pretty much everything you need is here.
To check what version of the IUCN Red List is driving the API
version()
To get a list of countries
countries()
To get a list of species by country isocode
species_by_country(isocode::String)
Region identifiers
regions()
Total Species published, as well as their Red List Category.
species_all(page::Int64)
species_all(page::Int64,region::String)
Total Species count.
species_count()
species_count(region::String)
To get the citation for a given species assessment.
species_citation(name::String)
species_citation(name::String,region::String)
species_citation(id::Int64)
species_citation(id::Int64,region::String)
To get a list of species by category
species_by_category(category::String)
To get information about individual species.
species_indv(name::String)
species_indv(name::String,region::String)
species_indv(id::Int64)
species_indv(id::Int64,region::String)
To get narrative information about individual species.
Please be aware that the text contains HTML markup in some places for formatting purposes.
species_narrative(name::String)
species_narrative(name::String,region::String)
species_narrative(id::Int64)
species_narrative(id::Int64,region::String)
species_synonyms(name::String)
species_common_names(name::String)
species_occurrence(name::String)
species_occurrence(name::String,region::String)
species_occurrence(id::Int64)
species_occurrence(id::Int64,region::String)
species_history(name::String)
species_history(name::String,region::String)
species_history(id::Int64)
species_history(id::Int64,region::String)
threats(name::String)
threats(name::String,region::String)
threats(id::Int64)
threats(id::Int64,region::String)
habitats(name::String)
habitats(name::String,region::String)
habitats(id::Int64)
habitats(id::Int64,region::String)
conservation_measure(name::String)
conservation_measure(name::String,region::String)
conservation_measure(id::Int64)
conservation_measure(id::Int64,region::String)
growth_forms(name::String)
growth_forms(name::String,region::String)
growth_forms(id::Int64)
growth_forms(id::Int64,region::String)
comprehensive_groups()
comprehensive_groups(group::String)
This will reorganize the dictionary, merging the result with the original dictionary.
melt_dict(dict::Dict)
This will give you access to the API funcionalities
set_token(IUCNtoken::String)
using IUCNRedList
set_token("YOUR TOKEN")
res = species_narrative("Quercus robur") # here you have the useful information
res = melt_dict(res) # here you reorder the information more nicely
# I like to see the data as dataframes
using DataFrames
DataFrame(res) # 1×11 DataFrame