Test validity of a geocode or ensure that a geocode is valid.
Usage
validate_geocode(geocode)
is_valid_geocode(geocode)
length_geocode(geocode)
na_geocode()
Arguments
geocode
data.frame with geocode data in columns "lat",
"lon", and possibly also "address".
Value
A valid geocode stored in a tibble.
FALSE for invalid, TRUE for valid.
FALSE for invalid, number of rows for valid.
A geo_code tibble with all fields set to suitable NAs.
Details
validate_geocode Converts to tibble, checks data bounds, converts
address to character if it is not already a character vector, or add
character NAs if the address column is missing.
is_valid_geocode Checks if a geocode is valid, returning 0L if not,
and the number of row otherwise.