Comments (3)
This fixes the issue:
library(mapSpain)
#> Warning: package 'mapSpain' was built under R version 4.0.5
library(sf)
#> Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
CCAA <- esp_get_ccaa()
# Try tmap - duplicate labels ¿?¿
library(tmap)
#> Warning: package 'tmap' was built under R version 4.0.4
tm_shape(CCAA) +
tm_polygons() +
tm_text(text="iso2.ccaa.code")
# Pass to MULTIPOLYGON
CCAA2 <- st_cast(CCAA,"MULTIPOLYGON")
tm_shape(CCAA2) +
tm_polygons() +
tm_text(text="iso2.ccaa.code")
sessionInfo()
#> R version 4.0.3 (2020-10-10)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19041)
#>
#> Matrix products: default
#>
#> locale:
#> [1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
#> [3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
#> [5] LC_TIME=Spanish_Spain.1252
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] tmap_3.3-1 sf_0.9-8 mapSpain_0.2.1
#>
#> loaded via a namespace (and not attached):
#> [1] Rcpp_1.0.6 lattice_0.20-41 png_0.1-7 class_7.3-18
#> [5] assertthat_0.2.1 digest_0.6.27 utf8_1.2.1 R6_2.5.0
#> [9] backports_1.2.1 reprex_2.0.0 evaluate_0.14 e1071_1.7-6
#> [13] highr_0.8 pillar_1.5.1 rlang_0.4.10 raster_3.4-5
#> [17] rmarkdown_2.7 styler_1.4.1 stringr_1.4.0 htmlwidgets_1.5.3
#> [21] proxy_0.4-25 compiler_4.0.3 xfun_0.22 pkgconfig_2.0.3
#> [25] tmaptools_3.1-1 base64enc_0.1-3 htmltools_0.5.1.1 tidyselect_1.1.0
#> [29] tibble_3.1.0 codetools_0.2-18 XML_3.99-0.6 fansi_0.4.2
#> [33] viridisLite_0.3.0 crayon_1.4.1.9000 dplyr_1.0.5 withr_2.4.1
#> [37] grid_4.0.3 lwgeom_0.2-6 lifecycle_1.0.0 DBI_1.1.1
#> [41] magrittr_2.0.1 units_0.7-1 KernSmooth_2.23-18 stringi_1.5.3
#> [45] debugme_1.1.0 fs_1.5.0 leafsync_0.1.0 leaflet_2.0.4.1
#> [49] sp_1.4-5 ellipsis_0.3.1 generics_0.1.0 vctrs_0.3.7
#> [53] RColorBrewer_1.1-2 tools_4.0.3 dichromat_2.0-0 leafem_0.1.3
#> [57] glue_1.4.2 purrr_0.3.4 crosstalk_1.1.1 abind_1.4-5
#> [61] parallel_4.0.3 yaml_2.2.1 stars_0.5-2 classInt_0.4-3
#> [65] knitr_1.31
Created on 2021-04-10 by the reprex package (v2.0.0)
from mapspain.
The fix breaks macOS-oldrel, try to found an alternative solution
from mapspain.
Thanks to @Nowosad to the heads up! Not need to fix anything (I think): just use point.per
option:
library(mapSpain)
#> Warning: package 'mapSpain' was built under R version 4.0.5
library(tmap)
#> Warning: package 'tmap' was built under R version 4.0.4
CCAA <- esp_get_ccaa()
tm_shape(CCAA, point.per = "feature") +
tm_polygons() +
tm_text(text="iso2.ccaa.code")
#> Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
sessionInfo()
#> R version 4.0.3 (2020-10-10)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19041)
#>
#> Matrix products: default
#>
#> locale:
#> [1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
#> [3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
#> [5] LC_TIME=Spanish_Spain.1252
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] sf_0.9-8 tmap_3.3-1 mapSpain_0.2.1
#>
#> loaded via a namespace (and not attached):
#> [1] Rcpp_1.0.6 lattice_0.20-41 png_0.1-7 class_7.3-18
#> [5] assertthat_0.2.1 digest_0.6.27 utf8_1.2.1 R6_2.5.0
#> [9] backports_1.2.1 reprex_2.0.0 evaluate_0.14 e1071_1.7-6
#> [13] highr_0.8 pillar_1.5.1 rlang_0.4.10 raster_3.4-5
#> [17] rmarkdown_2.7 styler_1.4.1 stringr_1.4.0 htmlwidgets_1.5.3
#> [21] proxy_0.4-25 compiler_4.0.3 xfun_0.22 pkgconfig_2.0.3
#> [25] tmaptools_3.1-1 base64enc_0.1-3 htmltools_0.5.1.1 tidyselect_1.1.0
#> [29] tibble_3.1.0 codetools_0.2-18 XML_3.99-0.6 fansi_0.4.2
#> [33] viridisLite_0.3.0 crayon_1.4.1.9000 dplyr_1.0.5 withr_2.4.1
#> [37] grid_4.0.3 lwgeom_0.2-6 lifecycle_1.0.0 DBI_1.1.1
#> [41] magrittr_2.0.1 units_0.7-1 KernSmooth_2.23-18 stringi_1.5.3
#> [45] debugme_1.1.0 fs_1.5.0 leafsync_0.1.0 leaflet_2.0.4.1
#> [49] sp_1.4-5 ellipsis_0.3.1 generics_0.1.0 vctrs_0.3.7
#> [53] RColorBrewer_1.1-2 tools_4.0.3 dichromat_2.0-0 leafem_0.1.3
#> [57] glue_1.4.2 purrr_0.3.4 crosstalk_1.1.1 abind_1.4-5
#> [61] parallel_4.0.3 yaml_2.2.1 stars_0.5-2 classInt_0.4-3
#> [65] knitr_1.31
Created on 2021-04-11 by the reprex package (v2.0.0)
from mapspain.
Related Issues (20)
- New feature: function for displacing external objects located on Canary Islands
- Release mapSpain 0.9.0
- Tidy documentation
- Release mapSpain 0.9.1
- Release mapSpain 0.5.0
- Añadir secciones censales HOT 1
- Release mapSpain 0.6.0
- Release mapSpain 0.6.1
- Añadir mapas del INE
- Release mapSpain 0.6.2
- How to offset points when moveCAN is set to TRUE HOT 6
- Problem installing mapSpain in R version 4.2.1 (2022-06-23) HOT 2
- Update leaflet providers to v1.3.1
- Does Leaflet-providersESP work with mapview? HOT 2
- More WMS? HOT 3
- Release mapSpain 0.7.0
- URGENT! Failed CRAN Checks: 2023-02-13
- Release mapSpain 0.8.0
- Echo de menos 3 municipios en el resultado de esp_get_munic_siane HOT 1
- pkgcheck results - main HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapspain.