#' Import and prepare French department limits
#'
#' @import dplyr
#'
import_dept <- function(file_dept) {
sf::st_read(file_dept,
stringsAsFactors = FALSE) %>%
select(code_insee, nom) %>%
mutate(nom = iconv(x = nom,
from = "UTF-8",
to = "ASCII//TRANSLIT") %>%
toupper()) %>%
mutate(nom = if_else(condition = code_insee %in% c("69D", "69M"),
true = "RHONE",
false = nom),
code_insee = if_else(condition = code_insee %in% c("69D", "69M"),
true = "69",
false = code_insee)) %>%
group_by(code_insee, nom) %>%
summarise()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.