bdc_coordinates_from_locality: Identify records lacking or with invalid coordinates but...

View source: R/bdc_coordinates_from_locality.R

bdc_coordinates_from_localityR Documentation

Identify records lacking or with invalid coordinates but containing locality information

Description

This function Identifies records whose coordinates can potentially be extracted from locality information.

Usage

bdc_coordinates_from_locality(
  data,
  lat = "decimalLatitude",
  lon = "decimalLongitude",
  locality = "locality",
  save_outputs = FALSE
)

Arguments

data

data.frame. Containing geographical coordinates and the column "locality'.

lat

character string. The column name with latitude in decimal degrees and WGS84. Default = "decimalLatitude".

lon

character string. The column with longitude in decimal degrees and WGS84. Default = "decimalLongitude".

locality

character string. The column name with locality information. Default = "locality".

save_outputs

logical. Should a table containing transposed coordinates saved for further inspection? Default = FALSE.

Details

According to DarwinCore terminology, locality refers to "the specific description of the place" where an organism was recorded.

Value

A data.frame containing records missing or with invalid coordinates but with potentially useful locality information. When save_outputs = FALSE the data.frame is saved in Output/Check/01_coordinates_from_locality.csv

See Also

Other prefilter: bdc_basisOfRecords_notStandard(), bdc_coordinates_country_inconsistent(), bdc_coordinates_empty(), bdc_coordinates_outOfRange(), bdc_coordinates_transposed(), bdc_country_standardized(), bdc_scientificName_empty()

Examples

x <- data.frame(
  lat = c(NA, NA, ""), 
  lon = c("", NA, NA), 
  locality = c("PARAGUAY: ALTO PARAGUAY: CO.; 64KM W PUERTO SASTRE", 
               "Parque Estadual da Serra de Caldas Novas, Goias, Brazil", 
               "Parque Nacional Iguazu"))

bdc_coordinates_from_locality(
data = x, 
lat = "lat", 
lon = "lon", 
locality = "locality", 
save_outputs = FALSE)


brunobrr/bdc documentation built on Nov. 21, 2024, 4:18 a.m.