Skip to content

Commit

Permalink
Fix minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
albuja committed Mar 31, 2022
1 parent f347b16 commit d9e7805
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
mapsEcuador.Rproj
.Rbuildignore
R/sysdata.rds
mapa.pdf
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 2 additions & 10 deletions R/choropleth_map_prov_pdf.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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 %>%
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.

0 comments on commit d9e7805

Please sign in to comment.