tidyverse and ggplot2 methods for terra spatial objects
OTHER License
grass_db
and scale_fill_grass_c()
family. This is an implementationterra::map.pal()
, that is the default palette for terra::plot()
> 1.7.78
).autoplot.SpatRaster()
now uses also grass_db
as the default palette.scale_fill_princess_c()
scale family.Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.6.0...v0.6.1
Published by dieghernan 6 months ago
SpatVector
objects:
pivot_longer.SpatVector()
and pivot_wider.SpatVector()
.fill.SpatVector()
.geom_spatraster_contour_text()
implemented on top ofisoband::isolines_grob()
glimpse.SpatRaster()
and glimpse.SpatVector()
now displays information?tibble::print.tbl_df
approach for the header and the footer. Thedplyr::glimpse()
. Seepillar::tbl_format_header()
and pillar::tbl_format_footer()
foras_sf()
converts a SpatVector
to a sf
object with an additionaltbl_df
class for pretty printing.fortify.SpatRaster()
gains a new argument pivot
that allows bettertidyr::pivot_longer()
.pivot
methods by @dieghernan in https://github.com/dieghernan/tidyterra/pull/133
fill
method by @dieghernan in https://github.com/dieghernan/tidyterra/pull/135
geom_spatraster_contour_text
by @dieghernan in https://github.com/dieghernan/tidyterra/pull/143
Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.5.2...v0.6.0
Published by dieghernan 9 months ago
asia.tif
.Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.5.1...v0.5.2
Published by dieghernan 10 months ago
as_sf()
(#124).sf
by @dieghernan in https://github.com/dieghernan/tidyterra/pull/125
Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.5.0...v0.5.1
Published by dieghernan 11 months ago
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 on this version:
autoplot.SpatRaster()
can detect now SpatRasters with color tables.geom_spatraster()
can detect now SpatRasters with color tables.scale_fill_coltab()
and rest of family scales (colour
).coltab
of a SpatRaster.na.translate = FALSE
.na.value = "transparent"
(#120).glimpse.Spat()
with meta-information on type of geometry, crs,na.value = "transparent"
the default by @dieghernan in https://github.com/dieghernan/tidyterra/pull/122
Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.4.1...v0.5.0
Published by dieghernan 12 months ago
Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.4.0...v0.4.1
Published by dieghernan over 1 year ago
glimpse.SpatVector()
arrange.SpatVector()
distinct.SpatVector()
inner_join.SpatVector()
, left_join.SpatVector()
,right_join.SpatVector()
and full_join.SpatVector()
semi_join.SpatVector()
and anti_join.SpatVector()
summarise.SpatVector()
rowwise.SpatVector()
group_by.SpatVector()
,ungroup.SpatVector()
count.SpatVector()
, tally.SpatVector()
bind_spat_cols()
, bind_spat_rows()
dplyr::group_by()
.sf::st_as_sf()
coercion. In fact coercion between object classes isglimpse.SpatRaster()
method for SpatRaster.as_spatvector()
as_sf()
is_grouped_spatvector()
Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.3.2...v0.4.0
Published by dieghernan over 1 year ago
pull_crs()
that returned "NA"
on sf objects with anyNA
(#74).scales_*
(#73) .Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.3.1...v0.3.2
Published by dieghernan almost 2 years ago
Methods for autoplot.SpatVector()
, autoplot.SpatRaster()
.
autoplot.SpatRaster()
now is smarter on identifying the type ofMethods for fortifying SpatRasters and SpatVectors:
fortify.SpatRaster()
, fortify.SpatVector()
.
hypso.colors()
: "artic"
,"meyers"
and "nordisk-familjebok"
.scale_colour_*
.ggplot2::aes_string()
.spatraster_contour()
and geom_spatraster_contour_filled()
tolinewidth = .2
, by default.Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.3.0...v0.3.1
Published by dieghernan about 2 years ago
Package back to CRAN.
Libraries dplyr, tidyr, tibble are not attached by default.
Needed functions are reexported instead.
Improvements on geom_spatraster()
:
Now in geom_spatraster()
is possible to avoid the default fill
of
the layer using geom_spatraster(fill = NA)
or
geom_spatraster(aes(fill = NULL))
.
aes(fill = ggplot2::after_stat())
now works on geom_spatraster()
.
Internal: Better handling of aes()
and layers
Add new function stat_spatraster()
.
Reduce the size of external files.
Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.2.2...v0.3.0
Published by dieghernan about 2 years ago
library
or require
is called. Messages on load can be suppressed withsuppressPackageStartupMessages(library(tidyterra))
.Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.2.1...v0.2.2
Published by dieghernan about 2 years ago
geom_spatraster_rgb()
works with facet_wrap()
(#35)Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.2.0...v0.2.1
Published by dieghernan over 2 years ago
Recreate extdata/volcano2.tif
using official DEM information from New
Zealand. Source: Auckland LiDAR 1m DEM
(2013).
Add volcano2
dataset.
Fix errors on slice_min()
and slice_max()
for SpatRasters (#20). Also
add a new parameter na.rm
.
Add new gradient scales for use on hypsometry:
scale_fill_hypso_c()
scale_fill_whitebox_c()
scale_fill_wiki_c()
scale_fill_cross_blended_c()
Add new asia.tif file on extdata
.
Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.1.0...v0.2.0
Published by dieghernan over 2 years ago
Add DOI.
CRAN release.
Full Changelog: https://github.com/dieghernan/tidyterra/compare/v0.0.1...v0.1.0
Published by dieghernan over 2 years ago
Improvements on performance:
Conversion to tibble is avoided as much as possible.
Internally use data.table
instead of tibbles.
The package is compatible with dtplyr
.
as_spatraster()
handles tibbles with characters and factors.
Simplification and tests for geom_spatraster()
and
geom_spatraster_rgb()
.
New methods:
pull()
transmute()
rename()
New geoms:
geom_spatraster_contour()
family.