plot_units {flexurba}R Documentation

Plot the spatial units classification

Description

[Deprecated]

plot_units() has been renamed to DoU_plot_units() to create a more consistent API and to better indicate that this function is specifically designed for plotting the DEGURBA classification generated with DoU_classify_units().

Usage

plot_units(
  units,
  classification = NULL,
  level1 = TRUE,
  extent = NULL,
  column = NULL,
  palette = NULL,
  labels = NULL,
  title = NULL,
  scalebar = FALSE,
  filename = NULL
)

Arguments

units

object of class sf. The spatial units to be displayed on the plot

classification

dataframe with the classification of the spatial units, as returned by DoU_classify_units(). If NULL, it is assumed that the classification results are merged in the units object.

level1

logical. Whether the spatial units are classified according to level 1 of the Degree of Urbanisation (TRUE), or level 2 of the Degree of Urbanisation (FALSE).

extent

SpatExtent or an object of class "bbox" (sf). If not NULL, the spatial units will be filtered based on the provided extent before plotting.

column

character. Column name of the spatial units classification. By default, "flexurba_L1" when level1=TRUE and "flexurba_L2" when level1=FALSE.

palette

named vector with the color palette used to plot the spatial units classification. If NULL, the standard color palette of the GHSL is used (see GHSL_palette()).

labels

vector with the labels used in the legend. If NULL, the standard labels of the GHSL are used (see GHSL_labels()).

title

character. Title of the plot.

scalebar

logical. Whether to add a scale bar to the plot.

filename

character. Path to the location to save the plot

Value

ggplot object


[Package flexurba version 0.2.2 Index]