View source: R/percent_located_disasters.R
percent_located_disasters | R Documentation |
Tells us how successful the geocoding is.
How many of the disasters in this data frame have non NA coordinates?
percent_located_disasters(
.,
how = "any",
lat_column = "lat",
lng_column = "lng",
plot_result = TRUE
)
. |
Data Frame that has been locationized. see |
how |
takes in a function, "any", or "all" to determine how to count the disaster as being geocoded if any, at least one location must be coded, if all, all locations must have lat/lng if a function, it must take in a logical vector and return a single logical |
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) |
The percent and number of Locations that have been geocoded (see plot_result
for type of output)
d <- tibble::tribble(
~`Dis No`, ~value, ~location_word, ~Country, ~lat, ~lng,
1, "city of new york", "new york", "USA", 40.71427, -74.00597,
2, "kerala, chennai municipality, and san francisco", "kerala", "India", 10.41667, 76.5,
2, "kerala, chennai municipality, and san francisco", "chennai", "India", 13.08784, 80.27847)
percent_located_disasters(d,
how = "any",
lat_column = "lat",
lng_column = "lng",
plot_result = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.