located_in_shapefile {weed} | R Documentation |
Locations In the Shapefile
Description
Creates a new column (in_shape) that tells whether the lat/long is in a certain shapefile.
Usage
located_in_shapefile(
.,
lat_column = "lat",
lng_column = "lng",
shapefile = NA,
shapefile_name = NA
)
Arguments
. |
Data Frame that has been locationized. see |
lat_column |
Name of column containing Latitude data |
lng_column |
Name of column containing Longitude data |
shapefile |
The shapefile itself (either shapefile or shapefile_name must be provided) |
shapefile_name |
FileName/Path to shapefile (either shapefile or shapefile_name must be provided) |
Value
Data Frame with the shapefile data as well as the previous data
Examples
## Not run:
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.2847)
located_in_shapefile(d,
lat_column = "lat",
lng_column = "lng",
shapefile_name = "~/dummy_name")
## End(Not run)
[Package weed version 1.1.2 Index]