| Title: | Tilt your Maps and Turn Them into 'ggplot' Plots | 
| Version: | 0.0.3 | 
| Description: | Simplifies the whole process of creating stacked tilted maps, that are often used in scientific publications to show different environmental layers for a geographical region. Tilting maps and layering them allows to easily draw visual correlations between these environmental layers. | 
| License: | CC0 | 
| URL: | https://github.com/marcosci/layer, https://marcosci.github.io/layer/ | 
| BugReports: | https://github.com/marcosci/layer/issues | 
| Depends: | R (≥ 2.10) | 
| Imports: | dplyr, furrr, ggnewscale, ggplot2, magrittr, raster, scico, sf, stars, tidyr | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| RoxygenNote: | 7.3.2 | 
| NeedsCompilation: | no | 
| Packaged: | 2025-01-25 09:54:53 UTC; ek | 
| Author: | Marco Sciaini [aut, cph],
  Cédric Scherer [aut],
  Josh Erickson [ctb],
  Egor Kotov  | 
| Maintainer: | Egor Kotov <kotov.egor@gmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2025-01-29 17:30:05 UTC | 
Landscape 1
Description
Random curd neutral landscape model generated using the NLMR package.
Usage
landscape_1
Format
A raster object.
Source
Data generated using the NLMR package. See Sciaini et al. (2018) for details: doi:10.1111/2041-210X.13076.
Landscape 2
Description
Fractional Brownian motion neutral landscape model generated using the NLMR package.
Usage
landscape_2
Format
A raster object.
Source
Data generated using the NLMR package. See Sciaini et al. (2018) for details: doi:10.1111/2041-210X.13076.
Landscape 3
Description
Distance gradient neutral landscape model generated using the NLMR package.
Usage
landscape_3
Format
A raster object.
Source
Data generated using the NLMR package. See Sciaini et al. (2018) for details: doi:10.1111/2041-210X.13076.
Landscape Points
Description
Random curd neutral landscape model generated using the NLMR package.
Usage
landscape_points
Format
A raster object.
Source
Data generated using the NLMR package. See Sciaini et al. (2018) for details: doi:10.1111/2041-210X.13076.
Tilt raster and sf data
Description
Takes tilted maps and plots them with ggplot.
Usage
plot_tiltedmaps(
  map_list,
  layer = NA,
  palette = "viridis",
  color = "grey50",
  direction = 1,
  begin = 0,
  end = 1,
  alpha = 1
)
Arguments
map_list | 
 sf or terra/stars/raster object.  | 
layer | 
 vector or list of names of each column in tilted sf object that should be used for coloring  | 
palette | 
 vector of palettes provided by the viridis and scico packages for rasters  | 
color | 
 a single color applied multiple times or a vector of color strings for points or linestrings  | 
direction | 
|
begin | 
 vector of the of the start of interval the palette to sample colours from for viridis and scico color palettes  | 
end | 
 vector of the of the end of interval the palette to sample colours from for viridis and scico color palettes  | 
alpha | 
Value
A ggplot object with stacked maps.
Examples
# tilt data
tilt_landscape_1 <- tilt_map(landscape_1)
tilt_landscape_2 <- tilt_map(landscape_2, x_shift = 50, y_shift = 50)
# plot
map_list <- list(tilt_landscape_1, tilt_landscape_2)
plot_tiltedmaps(map_list, palette = "turbo")
Tilt raster and sf data
Description
Tilt and shift maps in any direction.#'
Usage
tilt_map(
  data,
  x_stretch = 2,
  y_stretch = 1.2,
  x_tilt = 0,
  y_tilt = 1,
  x_shift = 0,
  y_shift = 0,
  angle_rotate = pi/20,
  boundary = NULL,
  parallel = FALSE
)
Arguments
data | 
 sf or terra/stars/raster object.  | 
x_stretch | 
 Stretch in x dimension. A   | 
y_stretch | 
 Stretch in y dimension. A   | 
x_tilt | 
 Tilt in x dimension. A   | 
y_tilt | 
 Tilt in y dimension. A   | 
x_shift | 
 Shift in x dimension. A   | 
y_shift | 
 Shift in y dimension. A   | 
angle_rotate | 
 Rotation angle.. A   | 
boundary | 
 Another layer that is used to create a boundary that is drawn around the data  | 
parallel | 
 
  | 
Details
Code adopted from https://www.mzes.uni-mannheim.de/socialsciencedatalab/article/geospatial-data/.
Value
An sf object with tilted and shifted data.
Examples
tilt_map(landscape_1)