chilemapas is back on CRAN
Before the main content: I am creating an R Community on Google Groups. You can join the group using this form.
I recently lost access to my old uni email, and so I never knew I had to fix a few things about the Spanish documentation for chilemapas. As a result, it was removed from CRAN and now it’s back. This package is now seven years old!
Here is how to create a map with a gradients reflecting the number of letters for each region name.
if (!require(chilemapas)) install.packages("chilemapas", repos = "https://cran.r-project.org")
if (!require(tmap)) install.packages("tmap", repos = "https://cran.r-project.org")
library(chilemapas)
library(tmap)
chile_regions <- generar_regiones()
chile_regions_names <- codigos_territoriales[, c("codigo_region", "nombre_region")]
chile_regions_names <- unique(chile_regions_names)
chile_regions_names$letters <- nchar(chile_regions_names$nombre_region)
chile_regions <- merge(chile_regions, chile_regions_names)
dev("chile.png")
m <- tm_shape(chile_regions) +
tm_polygons(fill = "letters")
tmap_save(m, "chile.png", height = 7)
For the next release I will work on simplified dependencies, this release “just works”.
Note: Antartic territories are excluded and under no event these maps mean there is a cession or occupation of sovereign territories against International Laws from Chile.