View source: R/located_in_box.R
located_in_box | R Documentation |
Creates a new column (in_box) that tells whether the lat/long is in a certain box or not.
located_in_box(
.,
lat_column = "lat",
lng_column = "lng",
top_left_lat,
top_left_lng,
bottom_right_lat,
bottom_right_lng
)
. |
Data Frame that has been locationized. see |
lat_column |
Name of column containing Latitude data |
lng_column |
Name of column containing Longitude data |
top_left_lat |
Latitude at top left corner of box |
top_left_lng |
Longitude at top left corner of box |
bottom_right_lat |
Latitude at bottom right corner of box |
bottom_right_lng |
Longitude at bottom right corner of box |
A dataframe that contains the latlong box data
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)
located_in_box(d, lat_column = "lat",
lng_column = "lng",
top_left_lat = 45,
bottom_right_lat = 12,
top_left_lng = -80,
bottom_right_lng = 90)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.