| Type: | Package |
| Title: | Connect to the Taxonomic Services of the Spanish Inventory of Natural Patrimony and Biodiversity |
| Version: | 1.2.0 |
| Description: | Provides access to 'EIDOS' https://iepnb.gob.es/areas-tematicas/especies-silvestres/eidos, the taxonomic information service from the Spanish Inventory of Natural Patrimony and Biodiversity. This package includes a suite of functions that help retrieve species' taxonomic and conservation information from 'EIDOS' and match taxa names against the checklists available in the database. More information can be found at Miranda Cebrián, H. (2025) <doi:10.7818/ECOS.3134>. |
| License: | GPL (≥ 3) |
| Encoding: | UTF-8 |
| Imports: | jsonlite, fuzzyjoin, readxl, curl, httr |
| URL: | https://github.com/hmirceb/eidosapi |
| BugReports: | https://github.com/hmirceb/eidosapi/issues |
| Depends: | R (≥ 3.5) |
| LazyData: | true |
| Config/roxygen2/version: | 8.0.0 |
| NeedsCompilation: | no |
| Packaged: | 2026-08-31 12:09:05 UTC; hector |
| Author: | Héctor Miranda-Cebrián
|
| Maintainer: | Héctor Miranda-Cebrián <hectorm94@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-09-11 12:00:09 UTC |
The eidosapi R package
Description
Provides access to 'EIDOS' https://iepnb.gob.es/areas-tematicas/especies-silvestres/eidos, the taxonomic information service from the Spanish Inventory of Natural Patrimony and Biodiversity. This package includes a suite of functions that help retrieve species' taxonomic and conservation information from 'EIDOS' and match taxa names against the checklists available in the database. More information can be found at Miranda Cebrián, H. (2025) doi:10.7818/ECOS.3134.
Details
This is an 'API' to access taxonomic information from the Spanish Inventory of Natural Patrimony and Biodiversity.
For a complete list of functions use library(help = "eidosapi")
Author(s)
Maintainer: Héctor Miranda-Cebrián hectorm94@gmail.com (ORCID) [copyright holder]
Authors:
Héctor Miranda-Cebrián hectorm94@gmail.com (ORCID) [copyright holder]
See Also
Useful links:
Get the Spanish checklist with synonyms
Description
Get the Spanish checklist with synonyms
Usage
eidos_clean_checklist()
Value
A data frame with the Spanish checklist with synonyms in a long format ready to use in other functions in the eidos_api package.
Examples
eidos_clean_checklist()
Get conservation information from EIDOS
Description
Get the conservation information from IEPNB (Inventario Español del Patrimonio Natural y de la Biodiversidad) for a given taxon using its unique identifier from the IEPNB database. Identifiers can be retrieved using the eidos_fuzzy_names() or eidos_taxon_by_name() functions. By default de API does not return taxonomic information. If needed, the function retrieves that information using eidos_taxon_by_id().
Usage
eidos_conservation_by_id(taxon_id)
Arguments
taxon_id |
An integer. A unique taxon identifier from IEPNB |
Value
A data frame with the conservation information of each taxa.
Examples
eidos_conservation_by_id(taxon_id = 1)
Sample species data
Description
A sample of species data included in the Biotrend project
Usage
eidos_example_data
Format
eidos_example_data
A data frame with 500 rows and 4 columns:
- taxon
Full taxon name
- genus
Genus
- species
Specific epithet
- subspecies
Subspecific epithet
Source
Fuzzy matching with the Spanish checklist of Wildlife Species
Description
Matches a data frame or vector with species names to any names in the Spanish checklist of Wildlife Species (Lista Patrón de Especies Silvestres). Uses fuzzy matching to allow spelling errors. In addition, you can filter by higher taxonomic levels to refine the match.
Usage
eidos_fuzzy_names(
taxa_list,
checklist = eidos_clean_checklist(),
maxdist = 0.1,
method = "jw",
mode = "left",
distance_col = "dist",
kingdom = NULL,
phylum = NULL,
class = NULL,
order = NULL,
family = NULL
)
Arguments
taxa_list |
A data frame or vector with taxonomic information to match with the Checklist. Must include at least the genus and species columns. Subspecies is optional. Additional taxonomic levels from kingdom to family can be supplied to filter any possible conflicts. These can be provided as columns with the corresponding name in the data frame or as function arguments if the supplied data was a vector of names. Taxonomic authorities are not supported yet. |
checklist |
A data frame. The result of running the eidos_clean_checklist() function. |
maxdist |
A number. Maximum dissimilarity distance between taxa names to match. Default for "jw" is 0.1 (10%) |
method |
A string. Method to calculate the distance between names inherited from fuzzyjoin::stringdist_join. One of "osa", "lv", "dl", "hamming", "lcs", "qgram", "cosine", "jaccard", "jw" or "soundex". Default is "jw". |
mode |
A string. Type of join, one of "inner", "left", "right", "full", "semi" or "anti" inherited from fuzzyjoin::stringdist_join. |
distance_col |
A string. Name of the column to display the dissimilarity distance between matched names. Set NULL to omit the column. |
kingdom |
A vector of strings of length = taxa_list with the kingdom of each supplied taxon. |
phylum |
A vector of strings of length = taxa_list with the phylum of each supplied taxon. |
class |
A vector of strings of length = taxa_list with the class of each supplied taxon. |
order |
A vector of strings of length = taxa_list with the order of each supplied taxon. |
family |
A vector of strings of length = taxa_list with the family of each supplied taxon. |
Value
A data frame
Examples
checklist = eidos_clean_checklist()
taxa_vector = c("Bordere chouardii", "Alts cisternasii")
matched_names = eidos_fuzzy_names(taxa_list = taxa_vector, checklist = checklist)
# Some names have conflicts when using fuzzy matching.
# This returns two matches for two different genera,
# Lanius (our species of interest, a bird) and Lasius (an ant).
taxa_df = data.frame(genus = "Lanius", species = "meridionalis")
matched_names = eidos_fuzzy_names(taxa_list = taxa_df, checklist = checklist)
# We can refine the search by including higher taxonomic levels:
taxa_df = data.frame(class = "Aves", genus = "Lanius", species = "meridionalis")
refined_matched_names = eidos_fuzzy_names(taxa_list = taxa_df, checklist = checklist)
# Or using a vector instead
taxa_vector = c("Lanius meridionalis")
class_vector = c("Aves")
refined_matched_names = eidos_fuzzy_names(taxa_list = taxa_vector,
checklist = checklist,
class = class_vector)
Get legal status from EIDOS
Description
Retrieves the legal status of a given taxon identifier from the EIDOS database. Identifiers can be retrieved using the eidos_fuzzy_names() or eidos_taxon_by_name() functions.
Usage
eidos_legal_status_by_id(taxon_id)
Arguments
taxon_id |
An integer. A valid taxon identifier from EIDOS. |
Value
A data frame.
Examples
eidos_legal_status_by_id(taxon_id = 1)
Retrieve one of the tables related to the Spanish Checklist of Wildlie Species
Description
The tables are downloaded verbatim from the API. This means that column names may not match those in other tables from EIDOS. The exception are the Checklists. Due to limits in the download size of files from the API these are downloaded to the disk as xlsx files and then loaded to environment.
Usage
eidos_tables(
eidos_table = c("comunidades_autonomas", "listapatronespecie",
"listapatronespecie_sinonimos", "listapatronespecie_normas",
"listapatronespecie_codigos", "componente_tema", "regbiogeograf_termar", "pais",
"norma", "provincias", "ceei")
)
Arguments
eidos_table |
Name of the table to query. The function is case insensitive, admits whitespaces and has partial matching for arguments, but these must match one of "comunidades_autonomas", "listapatronespecie_codigos", "listapatronespecie", "componente_tema", "regbiogeograf_termar", "listapatronespecie_sinonimos", "pais", "norma", "provincias" or "listapatronespecie_normas". |
Value
A data.frame with the desired table from the EIDOS API
Examples
eidos_tables(eidos_table = "comunidades_autonomas")
Get taxonomic information from EIDOS
Description
Retrieves the taxonomic information for a given taxon identifier from the EIDOS database. Identifiers can be retrieved using the eidos_fuzzy_names() or eidos_taxon_by_name() functions.
Usage
eidos_taxon_by_id(taxon_id)
Arguments
taxon_id |
An integer or vector of integers. Valid taxon identifiers from EIDOS. |
Value
A data frame.
Examples
eidos_taxon_by_id(taxon_id = 1)
Retrieve taxonomic information by name from EIDOS
Description
Connects to the EIDOS API and retrieves taxonomic information for the given taxa. Invalid names will return nothing. Note that if the supplied data is a vector, prior to querying the names the function removes all traces of "subsp.", "var." "f." and scientific authorships. Names have to be properly written, although the default API admits some common spelling errors like "i" instead of "ii" (e.g. Borderea chouardi instead of chouardii). For anything else use eidos_fuzzy_names()
Usage
eidos_taxon_by_name(taxa_list)
Arguments
taxa_list |
A vector or data.frame with taxa names. The data frame needs at least 2 columns: "genus" and "species". Optional columns are "subspecies", "scientificnameauthorship." |
Value
A data.frame with the supplied data and the taxonomic information from EIDOS for any matching taxa
Examples
example_taxo = data.frame(genus = "Alytes", species = "cisternasii", subspecies = NA)
eidos_taxon_by_name(taxa_list = example_taxo)
eidos_taxon_by_name(taxa_list = c("Alytes cisternasii", "Pinus nigra subsp. salzmannii"))