Skip to contents

tidyterra (development version)

This release adds tidyverse methods for SpatVector objects and includes documentation reviewed with AI-assisted editing.

  • Package documentation was reviewed and updated with AI-assisted editing.

New methods

The following methods were generated with AI assistance.

tidyterra 1.1.0

CRAN release: 2026-03-11

  • The minimum supported dplyr version is now 1.2.0.
  • Vignettes and articles now use Quarto.

New methods

tidyterra 1.0.0

CRAN release: 2026-01-23

tidyterra 0.7.2

CRAN release: 2025-04-14

  • Hotfix: fix test errors on CRAN.

tidyterra 0.7.1

CRAN release: 2025-04-07

  • New argument in geom_spatraster_*: mask_projection. When set to TRUE, it avoids SpatRaster wrapping around on some projections (see #115 and #169, by @dramanica).
  • Fixed an old bug exposed after terra 1.8-42, where plots crashed when using ggplot2::facet_wrap() in combination with coord_sf() or with an implicit CRS change due to other sf/Spat* objects.

tidyterra 0.7.0

CRAN release: 2025-02-03

  • The minimum supported terra version is now 1.8-10.
  • metR has been removed from Suggests.
  • Factor handling has been improved when several layers have different levels. This uses terra::combineLevels() from terra >= 1.8-10. See https://stackoverflow.com/questions/79340152.
  • scale_*_cross_blended_tint_c(), scale_*_cross_blended_tint_b(), scale_*_hypso_tint_c(), scale_*_hypso_tint_b(), scale_*_grass_c() and scale_*_grass_b() now truncate the legend when the limits argument is provided (#165 @Fan-iX).
  • geom_spatraster() and the overall pivoting of SpatRaster are now less strict with different layer classes: if several layers can be defined as numeric (i.e. double, integer and numeric), the pivoting (and therefore the plot) can be performed. This is consistent with tidyr::pivot_longer() behavior (https://stackoverflow.com/questions/79292989).

tidyterra 0.6.2

CRAN release: 2025-01-08

tidyterra 0.6.1

CRAN release: 2024-06-08

tidyterra 0.6.0

CRAN release: 2024-04-22

tidyterra 0.5.2

CRAN release: 2024-01-19

  • Tests have been adapted to ggplot2 3.5.0 (#129, @teunbrand).
  • Package size has been reduced, especially in the external raster asia.tif.

tidyterra 0.5.1

CRAN release: 2023-12-15

tidyterra 0.5.0

CRAN release: 2023-11-21

tidyterra has been accepted on JOSS. Please use the result of citation("tidyterra") or the following string:

Hernangómez, D. (2023). “Using the tidyverse with terra objects: the tidyterra package.” Journal of Open Source Software, 8(91), 5751. ISSN 2475-9066, https://doi.org/10.21105/joss.05751

Other changes in this version:

  • autoplot.SpatRaster() can now detect SpatRaster objects with color tables.
  • geom_spatraster() can now detect SpatRaster objects with color tables.
  • scale_fill_coltab() and its scale_colour_*() family scales have been added for plotting SpatRaster objects with color tables.
  • tidyverse verbs keep the associated coltab of a SpatRaster.
  • By default, all the discrete scales of tidyterra now have the following setup: na.translate = FALSE.
  • By default, all non-discrete scales of tidyterra now have na.value = "transparent" (#120).
  • glimpse.Spat() now shows metadata on geometry type, CRS and other fields.
  • New messaging interface thanks to cli package.

tidyterra 0.4.1

  • Release for JOSS paper. No relevant changes.

tidyterra 0.4.0

CRAN release: 2023-03-17

tidyterra 0.3.2

CRAN release: 2023-02-24

  • pull_crs() no longer returns "NA" for sf objects with any field equal to NA (#74).
  • scales_* documentation has been improved (#73).
  • The dependency on the superseded crayon package has been removed in favor of cli.
  • tidyverse has been removed from Suggests.

tidyterra 0.3.1

CRAN release: 2022-11-09

tidyterra 0.3.0

CRAN release: 2022-10-12

  • Package back on CRAN.
  • Libraries dplyr, tidyr and tibble are not attached by default. Needed functions are reexported instead.
  • geom_spatraster() can now avoid the default fill of the layer using geom_spatraster(fill = NA) or geom_spatraster(aes(fill = NULL)).
  • geom_spatraster() now supports aes(fill = ggplot2::after_stat()).
  • geom_spatraster() now handles aes() and layers better internally.
  • stat_spatraster() has been added.
  • Reduce the size of external files.

tidyterra 0.2.2

CRAN release: 2022-09-29

  • Changes to how dplyr, tibble and tidyr are attached. These packages are listed on ‘Depends’ and are attached before tidyterra when library or require is called. Messages on load can be suppressed with suppressPackageStartupMessages(library(tidyterra)).

tidyterra 0.2.1

CRAN release: 2022-09-23

tidyterra 0.2.0

CRAN release: 2022-06-21

tidyterra 0.1.0

CRAN release: 2022-05-24

  • DOI has been added.
  • CRAN release.

tidyterra 0.0.1