R/bdc_coordinates_from_locality.R
bdc_coordinates_from_locality.Rd
This function Identifies records whose coordinates can potentially be extracted from locality information.
bdc_coordinates_from_locality(
data,
lat = "decimalLatitude",
lon = "decimalLongitude",
locality = "locality",
save_outputs = FALSE
)
data.frame. Containing geographical coordinates and the column "locality'.
character string. The column name with latitude in decimal degrees and WGS84. Default = "decimalLatitude".
character string. The column with longitude in decimal degrees and WGS84. Default = "decimalLongitude".
character string. The column name with locality information. Default = "locality".
logical. Should a table containing transposed coordinates saved for further inspection? Default = FALSE.
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
According to DarwinCore terminology, locality refers to "the specific description of the place" where an organism was recorded.
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)
#>
#> bdc_coordinates_from_locality
#> Found 3 records missing or with invalid coordinates but with potentially useful information on locality.
#> lat lon locality
#> 1 <NA> PARAGUAY: ALTO PARAGUAY: CO.; 64KM W PUERTO SASTRE
#> 2 <NA> <NA> Parque Estadual da Serra de Caldas Novas, Goias, Brazil
#> 3 <NA> Parque Nacional Iguazu
#> .coordinates_empty .coordinates_outOfRange
#> 1 FALSE TRUE
#> 2 FALSE TRUE
#> 3 FALSE TRUE