View source: R/tidy_functions.R
get_centroid | R Documentation |
Add columns from a sf object with centroids (x, y).
get_centroid(.sf)
.sf |
A sf object |
Create and add the coordinates (x, y) of the centroids to the dataframe
X Y columns with centroid
Jhon Flores Rojas
library(PeruData) #map_peru_dist |> # filter(depa == "huanuco") |> # get_centroid()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.