Description Usage Arguments Value Examples
Create a list of points (latitude/longitude coordinate pairs) for OpenCage queries.
1 2 3 4 5 6 7 |
... |
Ignored. |
latitude, longitude |
Numeric vectors of latitude and longitude values. |
data |
A |
A list of points. Each point is a named vector of length 2 containing a latitude/longitude coordinate pair.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | oc_points(-21.01404, 55.26077)
xdf <-
data.frame(
place = c("Hamburg", "Los Angeles"),
lat = c(53.5503, 34.0536),
lon = c(10.0006, -118.2427)
)
oc_points(
data = xdf,
latitude = lat,
longitude = lon
)
# create a list column with points with dplyr
library(dplyr)
xdf %>%
mutate(
points =
oc_points(
lat,
lon
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.