Learn R Programming

RuHere

Are your species records really where they say they are?

Check them using metadata and specialists’ range information!

Authors: Weverton C. F. Trindade and Fernanda S. Caron

Package overview

Primary biodiversity data documenting species distributions are central to understand and conserve biodiversity. A major challenge in using these data is the presence of erroneous or overly imprecise geographic coordinates associated with occurrence records. Here, we present RuHere, an R package designed to manage species occurrence data, flag potential errors, and support the iterative exploration of problematic records. The package supports robust preparation of occurrence datasets for ecological and conservation applications such as ecological niche modelling, with its main strength being the flexibility and control it provides to deal with and explore potentially erroneous records.

Workflow in RuHere

The RuHere package facilitates several key steps in species occurrence data preparation and validation:

  • Data Acquisition: Download species occurrences from multiple global databases.
  • Standardization: Merge and standardize disparate datasets into a unified format.
  • Metadata Flagging: Identify problematic records using associated metadata information.
  • Expert Validation: Flag records using specialist range information sourced from external databases.
  • Bias Mitigation: Reduce spatial sampling bias through record thinning.
  • Exploration: Visualize and investigate flagged issues within the final datasets.

The main functions of the package are presented in the figure below:

Figure 1. Overview of the RuHere workflow for species occurrence data preparation and validation

Package website

See the package website (https://wevertonbio.github.io/RuHere/) for further functions explanation and vignettes.

Installing the package

Note: Internet connection is required to install the package.

To install the latest release of RuHere use the following line of code:

# Installing from CRAN 
#install.packages("RuHere")  # in progress

The development version of RuHere can be installed using the code below.

# Installing and loading packages
if(!require(remotes)){
  install.packages("remotes")
}

# To install the package use
remotes::install_github("wevertonbio/RuHere")

# To install the package and its vignettes use (if needed use: force = TRUE)  
# remotes::install_github("wevertonbio/RuHere", build_vignettes = TRUE) # in progress

Copy Link

Version

Install

install.packages('RuHere')

Version

1.0.1

License

GPL (>= 3)

Maintainer

Weverton Trindade

Last Published

February 17th, 2026

Functions in RuHere (1.0.1)

fix_countries

Identify and correct coordinates based on country information
flag_names

Flag name dictionary
florabr_here

Download the latest version of Flora e Funga do Brasil database
flag_inaturalist

Flag occurrence records sourced from iNaturalist
flag_geo_moran

Select Spatially Thinned Occurrences Using Moran's I Autocorrelation
flag_florabr

Identify records outside natural ranges according to Flora e Funga do Brasil
format_columns

Format and standardize column names and data types of an occurrence dataset
flag_iucn

Identify records outside natural ranges according to the IUCN
flag_fossil

Flag fossil records
flag_year

Flag records outside a year range
flag_wcvp

Identify records outside natural ranges according to the World Checklist of Vascular Plants
get_bien

Download occurrence records from BIEN
ggrid_here

Static Visualization of Richness and Trait Maps
ggmap_here

Static Visualization of Occurrence Flags with ggplot
get_specieslink

Download occurrence records from SpeciesLink
moranfast

Fast Moran's I Autocorrelation Index
get_env_bins

Identify Environmental Blocks and Group Nearby Records in Environmental Space
get_idigbio

get_idigbio
map_here

Interactive Visualization of Occurrence Flags with mapview
import_gbif

Import a download requested from GBIF
iucn_here

Download species distribution information from IUCN
occ_splink

Occurrence records of azure jay from SpeciesLink
plot_env_bins

Plot Environmental Bins (2D Projection)
prepare_gbif_download

Prepare data to request GBIF download
occurrences

Integrated occurrence dataset for three example species
puma_atlanticr

Occurrence records of Puma concolor from AtlanticR
richness_here

Species Richness and Occurrence Summary Mapping
request_gbif

Submit a request to download occurrence data from GBIF.
prepared_metadata

Metadata templates used internally by format_columns()
set_specieslink_credentials

Store SpeciesLink credential
spatial_kde

Kernel Density Estimation (Heatmap) for occurrence data
relocate_after

Relocate a column in a data frame
occ_idig

Occurrence records of azure jay from iDigBio
thin_geo

Flag records that are close to each other in the geographic space
remove_accent

Remove accents and special characters from strings
standardize_states

Standardize state names
wcvp_here

Download distribution data from the World Checklist of Vascular Plants (WCVP)
occ_gbif

Occurrence records of Araucaria angustifolia from GBIF
states

Administrative Units (States, Provinces, and Regions)
remove_flagged

Remove flagged records
remove_invalid_coordinates

Identify and remove invalid coordinates
summarize_flags

Summarize flags
thin_env

Flag records that are close to each other in the enviromnetal space
standardize_countries

Standardize country names
spatialize

Spatialize occurrence records
states_dictionary

States dictionary for standardizing state and province names and codes
states_from_coords

Extract state from coordinates
occ_bien

Occurrence records of Yellow Trumpet Tree from BIEN
set_iucn_credentials

Store SpeciesLink credential
set_gbif_credentials

Store GBIF credentials
occ_flagged

Flagged occurrence records of Araucaria angustifolia
worldclim

Bioclimatic Variables from WorldClim (bio_1, bio_7, bio_12)
world

World Countries
available_datasets

Check the available distribution datasets for a set of species
create_metadata

Create metadata template
bind_here

Bind occurrences after standardizing columns
fake_data

Fake occurrence data for testing coordinate validation functions
bien_here

Download species distribution information from BIEN
country_from_coords

Extract country from coordinates
check_countries

Check if the records fall in the country assigned in the metadata
check_states

Check if the records fall in the state assigned in the metadata
fix_states

Identify and correct coordinates based on state information
cultivated

Dictionary of terms used to flag cultivated individuals
flag_env_moran

Select Environmentally Thinned Occurrences Using Moran's I Autocorrelation
country_dictionary

Country dictionary for standardizing country names and codes
flag_colors

Color palette for flagged records
flag_cultivated

Flag occurrence records of cultived individuals
faunabr_here

Download the latest version of the Fauna do Brazil (Taxonomic Catalog of the Brazilian Fauna)
flag_consensus

Get consensus across multiple flags
flag_duplicates

Flag duplicated records
flag_faunabr

Identify records outside natural ranges according to Fauna do Brasil
flag_bien

Identify records outside natural ranges according to BIEN