## mapSpain <img src="https://ropenspain.github.io/mapSpain/logo.png" alt="mapSpain-logo" height="70" style="margin-top: -10px;vertical-align: middle;"> <span style="font-size: 50%;">(on CRAN)</span> **Key features**: - **Easy mapping of boundaries of Spain** (nation-wide, autonomous communities, provinces, municipalities). - Use of **WMS/WMTS image tiles** (Google Maps-like) on either static and interactive maps (with {`leaflet`}) provided by Spanish public organisms. - Translates names of autonomous communities and provinces across languages (Spanish, English, Catalan, ...) and into standardized codes (ISO, NUTS, INE codes, ...) **Data sources**: - [GISCO](https://ec.europa.eu/eurostat/web/gisco) (Eurostat). - [Instituto Geografico Nacional](https://www.ign.es/) (IGN). - For tiles: Public organisms (<https://www.idee.es/web/idee/segun-tipo-de-servicio>). **Output formats:** - **sf** for vectors (as boundaries, roads, etc.) - **SpatRaster** (`terra`) for static tiles. --- ## Quick demo .pull-left[ ```r library(mapSpain) library(tidyverse) galicia <- esp_get_munic_siane(region = "Galicia") %>% mutate( Provincia = esp_dict_translate(ine.prov.name, "es") ) ggplot(galicia) + geom_sf(aes(fill = Provincia), color = "grey70" ) + labs(title = "Provincias de Galicia") + scale_fill_discrete( type = hcl.colors(4, "Blues") ) + theme_bw() ``` ] .pull-right[ <img src="data:image/png;base64,#index_files/figure-html/unnamed-chunk-1-1.png" width="100%" /> ]