diff --git a/.gitignore b/.gitignore index 7f4efc0..d0a053a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ mapsEcuador.Rproj .Rbuildignore R/sysdata.rds +mapa.pdf diff --git a/DESCRIPTION b/DESCRIPTION index 3ba5655..2b9097d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -9,9 +9,8 @@ Description: Easy create Ecuador choroplet maps in PDF format at province and ca customizing options. Galapagos islands included in a frame secondary map. License: GPL-3 Encoding: UTF-8 -LazyData: true Imports: scales, dplyr, ggplot2, stringr, sf, classInt, ggspatial, png, grid, showtext, sysfonts, grDevices, kimisc Depends: - R (>= 2.10) + R (>= 3.5.0) RoxygenNote: 7.1.0 diff --git a/R/choropleth_map_prov_pdf.R b/R/choropleth_map_prov_pdf.R index 7361f69..42cc512 100644 --- a/R/choropleth_map_prov_pdf.R +++ b/R/choropleth_map_prov_pdf.R @@ -63,6 +63,8 @@ choropleth_map_prov_pdf <- function(values, font_add_google(legend_title_font, 'legend_title_font') font_add_google(legend_items_font, 'legend_items_font') showtext_auto() + + st_crs(shp_pro) <- 4326 box <- st_bbox(shp_pro) @@ -81,17 +83,7 @@ choropleth_map_prov_pdf <- function(values, include.lowest = TRUE, sep = '; ')) - galapagos <- shp_pro %>% - filter(DPA_PROVIN == '20') %>% - st_set_geometry(., st_geometry(.) + c(8e5, 0)) %>% - st_set_crs(32717) - - shp_pro <- shp_pro %>% - filter(DPA_PROVIN != '20') %>% - rbind(galapagos) - mapa <- shp_pro %>% - filter(DPA_PROVIN != '90') %>% left_join(scores) labels <- mapa %>% diff --git a/R/sysdata.rda b/R/sysdata.rda index c771074..40ed944 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ