percent_located_locations: Percent of Locations Successfully Geocoded

View source: R/percent_located_locations.R

percent_located_locationsR Documentation

Percent of Locations Successfully Geocoded

Description

Tells us how successful the geocoding is.

How many of the locations in this data frame have non NA coordinates?

Usage

percent_located_locations(
  .,
  lat_column = "lat",
  lng_column = "lng",
  plot_result = TRUE
)

Arguments

.

Data Frame that has been locationized. see weed::split_locations

lat_column

Name of column containing Latitude data

lng_column

Name of column containing Longitude data

plot_result

Determines output type (Plot or Summarized Data Frame)

Value

The percent and number of Locations that have been geocoded (see plot_result for type of output)

Examples

d <- tibble::tribble(
~value,  ~location_word,                    ~Country,     ~lat,       ~lng,
"city of new york",      "new york",                       "USA", 40.71427,  -74.00597,
"kerala, chennai municipality, and san francisco",  "kerala", "India", 10.41667,       76.5,
"kerala, chennai municipality, and san francisco",  "chennai",  "India", 13.08784,   80.27847)
percent_located_locations(d,
lat_column = "lat",
lng_column = "lng",
plot_result = FALSE)


weed documentation built on Oct. 17, 2023, 1:06 a.m.