mapSpain 1.0.0
CRAN release: 2026-01-17
This major release introduces a full overhaul of the codebase and test suite. Requests now use httr2, and cached files are reorganized into topic-based subfolders for easier management.
Because of internal changes, existing caches are not compatible with this release and must be rebuilt.
We have transitioned from rappdirs::user_config_dir() to tools::R_user_dir() for managing your persistent cache directory. If you are a heavy mapSpain user and already have a cache directory in place, you’ll receive a one-time friendly message informing you about this migration. Consider it a warm welcome to mapSpain 1.0.0 😉.
The package now requires R ≥ 4.1, and dependency updates improve both performance and maintainability. All functions return tidy objects (tibbles or sf objects with tibble data).
Several new functions and arguments have been added, some functions renamed, and some others deprecated. All bundled datasets have been updated to their latest versions.
Breaking changes
- Minimum required R version is now 4.1.0.
- Removed dependency on slippymath (#126).
-
providerEspTileOptions()has been removed; useleaflet::providerTileOptions()instead. - Removed dataset
?esp_munic.sf. - Removed dataset
?leaflet.providersESP.df(superseded in mapSpain v0.8.0). - Removed dataset
?pobmun19; it has been replaced by?pobmun25. -
esp_get_grid_EEA()is deprecated and defunct, as the source file is no longer available.
Deprecations and new function names
-
esp_getTiles()has been renamed toesp_get_tiles()(old name still works). -
esp_get_country()has been renamed toesp_get_spain()(old name still works). - In
esp_get_rivers():- Arguments
resolutionandspatialtypeare deprecated. - Wetlands support has been moved to the new
esp_get_wetlands()function.
- Arguments
New features
- Added
esp_get_stations(), replacingesp_get_railway(..., spatialtype = "point"). - Added
esp_siane_bulk_download()to download all SIANE datasets to a specifiedcache_dirin a single step. - Added
esp_get_countries_siane()to retrieve all countries available in SIANE at a given date. - Added
esp_get_spain_siane(), analogous toesp_get_spain(), using SIANE data. - Added
esp_get_attributions()to retrieve the attributions of a tile provider. - Added dataset
?esp_nuts_2024, replacing?esp_nuts.sf. -
esp_get_rivers()gains a newmoveCANargument. -
esp_get_tiles()can be used with providers that needs an API key.
mapSpain 0.10.0
CRAN release: 2024-12-15
- Fix a bug on
esp_get_prov_siane()when selecting columns #115. - New argument
typeinesp_get_comarca(). Now it is possible to extract different types of comarcas: Official (IGN), statistical (INE), agrarian or livestock comarcas (MAPA).
mapSpain 0.9.2
CRAN release: 2024-08-26
- SIANE 2024 Update: Adapt functions to new databases.
- Improve dictionaries:
esp_dict_region_code()andesp_dict_translate().
mapSpain 0.9.0
CRAN release: 2024-01-23
- Changes on how to handle modifications on Canary Islands objects (#101):
- Add a helper function for displace stand-alone
sfobjects in Canary Islands:esp_move_can(). -
esp_move_can()is used internally on all functions.
- Add a helper function for displace stand-alone
- Add a new function to show the current cache directory:
esp_detect_cache_dir(). -
mapSpain::layer_spatraster()removed (was deprecated in mapSpain 0.6.2).
mapSpain 0.8.0
CRAN release: 2023-07-12
- Improve download of NUTS data from giscoR.
- Upgrade
?esp_tiles_providersto https://dieghernan.github.io/leaflet-providersESP/ v1.3.3. New providers included:IDErioja.BaseIDErioja.RelieveIDErioja.ClaroIDErioja.Oscuro
-
esp_getTiles()now supports non-OGC compliant WMTS providers, such as Stamen or OpenStreetMaps (see examples).
mapSpain 0.7.0
CRAN release: 2022-12-22
- Upgrade
?leaflet.providersESP.dfto https://dieghernan.github.io/leaflet-providersESP/ v1.3.2. - Changes on how to package manages tiles providers:
-
?leaflet.providersESP.dfis superseded in favor of?esp_tiles_providers. - You can use a custom url with the
typeargument inesp_getTiles()(#88). - Add new function
esp_make_provider()that helps to create custom providers.
-
mapSpain 0.6.2
CRAN release: 2022-08-13
- Now
moveCANis a explicit argument in the relevant functions. - Deprecate
layer_spatraster().Usetidyterra::geom_spatraster_rgb()instead. - Fix geometries on
esp_get_hex_prov()andesp_get_hex_ccaa(). - Add new function to get comarcas from INE:
esp_get_comarca(). - Add new functions to get simplified maps from INE:
mapSpain 0.6.0
CRAN release: 2022-02-18
- Upgrade
?leaflet.providersESP.dfto https://dieghernan.github.io/leaflet-providersESP/ v1.3.0. New providers:Catastro.BuildingPartCatastro.AdministrativeBoundaryCatastro.AdministrativeUnit
- Add new param
optionstoesp_getTiles(). - Improve regex search on municipalities: Now the casing of the word is ignored.
mapSpain 0.5.0
CRAN release: 2022-01-25
- Rebuild coding database to avoid errors due to encoding.
- Fix translations on Galician.
- New grid functions (#61):
mapSpain 0.4.0
CRAN release: 2021-10-14
- Switch from raster to terra.
- Clean up dependencies. Imagery packages moved to ‘Suggests’.
- Add
layer_spatraster(). - Move examples to ggplot2.
mapSpain 0.3.1
CRAN release: 2021-09-10
- Fix an error on CRAN related with the cache folder #52:
- Update docs with
@familytag.
mapSpain 0.3.0
CRAN release: 2021-09-01
- Caching improvements: new function
esp_set_cache_dir()based onrappdirs::user_cache_dir(). Now the cache_dir path is stored and it is not necessary to set it up again on a new session. - Add a new argument
zoomminonesp_getTiles(). - New tests with testthat.
- Update on docs. New examples
- Precompute vignette.
mapSpain 0.2.3
CRAN release: 2021-04-25
- Move minimum version of giscoR to v0.2.4
- Fix typos on
esp_dict_translate()(#36). - Not run examples on tiles, as the server sometimes doesn’t respond.
- Re factor
sysdata.rda. -
CRAN fixes:
- Removed broken link on
addProviderEspTiles(). - Vignette removed (CRAN warning).
- Removed broken link on
- Now the
cachedirectory is created recursively.
mapSpain 0.2.2
CRAN release: 2021-04-17
- Migrate examples, vignettes and README to tmap.
- Add vignette to package.
-
esp_dict_region_code()works with mixed casings (e.g:esp_dict_region_code("aLbacEte", destination = "cpro")).
mapSpain 0.2.1
CRAN release: 2021-03-19
-
QUICKFIX: Fix a typo on documentation:
cache_dirshould be set asoptions(mapSpain_cache_dir = "path/to/dir").
mapSpain 0.2.0
CRAN release: 2021-02-25
- Fix DOI https://doi.org/10.5281/zenodo.4318024
- Documentation ported to roxygen2.
- Include CartoBase ANE data https://github.com/rOpenSpain/mapSpain/tree/sianedata:
- Mute warnings from rgdal.
mapSpain 0.1.2
CRAN release: 2021-01-05
- Fix annoying warning if sf was not loaded first.
- Include new
polyoption onmapSpain::esp_get_can_box(). - New grids created with
geogrid::calculate_grid(). - Add more years on
mapSpain::esp_get_munic(). - Move to rOpenSpain organization.
mapSpain 0.1.1
CRAN release: 2020-11-30
- Fix CRAN submission.
- Added
mapSpain::esp_get_grid_prov()andmapSpain::esp_get_grid_ccaa().
