Description Usage Arguments Value Examples
View source: R/pol_aggregate(tidyverse).R
This function allows you to aggregate cities of a spatial dataframe from designed identifier
1 | pol_aggregate(before, after, pol, idpol, namepol, nameAgr)
|
before |
A list of the identifiers to be replaced |
after |
A character string of the identifier replacement |
pol |
An sf object of the cities |
idpol |
A character string of the column containing the id of the pol object |
namepol |
A character string of the column containing the names of the pol object |
nameAgr |
A character string of the name to be changed for the aggregated city |
An sf object with a new id of aggregate city, and the polygons aggregated
1 2 3 4 5 6 7 8 9 10 11 12 | # Import data
before <- c(75101, 75102, 75103,75104, 75105,75106,75107, 75108, 75109,
75110,75111, 75112, 75113, 75114,75115, 75116, 75117,75118, 75119, 75120)
after <- 75056
data(pol)
idpol <- "idpol"
namepol <- "name"
nameAgr <- "paris"
polAggregate <- pol_aggregate(before, after, pol, idpol, namepol, nameAgr)
plot(polAggregate)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.