bdc_coordinates_empty {bdc}R Documentation

Identify records with empty geographic coordinates

Description

This function flags records missing latitude or longitude coordinates.

Usage

bdc_coordinates_empty(data, lat = "decimalLatitude", lon = "decimalLongitude")

Arguments

data

data.frame. Containing geographical coordinates.

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".

Details

This test identifies records missing geographic coordinates (i.e., empty or not applicable NA longitude or latitude)

Value

A data.frame containing the column ".coordinates_empty". Compliant (TRUE) if 'lat' and 'lon' are not empty; otherwise "FALSE".

See Also

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

Examples

x <- data.frame(
  decimalLatitude = c(19.9358, -13.016667, NA, ""),
  decimalLongitude = c(-40.6003, -39.6, -20.5243, NA)
)

bdc_coordinates_empty(
  data = x,
  lat = "decimalLatitude",
  lon = "decimalLongitude"
)


[Package bdc version 1.1.4 Index]