Overview
OpenLand provides comprehensive visualization tools to explore and communicate land use change patterns. These functions create publication-ready graphics for one-step and multi-step transitions.Available Visualization Functions
- sankeyLand(): Interactive Sankey diagrams for transition flows
- chordDiagramLand(): Circular chord diagrams for transition networks
- netgrossplot(): Bar charts comparing net vs. gross changes
- barplotLand(): Grouped bar charts showing category areas over time
- plot(): S4 methods for intensity analysis objects
Sankey Diagrams
Sankey diagrams visualize land use transitions as flows between time points. Flow width represents transition area.Multi-Step Sankey
Show all consecutive transitions across the entire time series:- Vertical nodes for each category at each time point
- Flows connecting categories between consecutive years
- Hover tooltips with transition details
One-Step Sankey
Show only transitions from first to last year:- Net change assessment
- Communication with non-technical audiences
- Long time series where intermediate steps obscure patterns
Customizing Sankey Diagrams
dataset: Uselulc_Multisteporlulc_Onesteplegendtable: The editedtb_legendtable with category names and colorsiterations: Number of layout iterations (default = 0, higher = better spacing)
Sankey diagrams are built with the networkD3 package and render as interactive HTML widgets. They work in RMarkdown documents, Shiny apps, and can be saved with
htmlwidgets::saveWidget().Chord Diagrams
Chord diagrams show one-step transitions in a circular layout, emphasizing the network structure of land use changes.Basic Chord Diagram
- Categories arranged in a circle
- First year categories on one side
- Last year categories on opposite side
- Ribbons connecting transitions (width = area)
- Directional arrows showing flow direction
Customizing Chord Diagrams
-
legposition: Vectorc(x, y)for legend coordinatesx = -1.3places legend to the lefty = 0centers vertically- Adjust based on your plot dimensions
-
sectorcol: Color for the outer arc labels (years) -
x.margin: Extend canvas to make room for legendc(-1, 1)is defaultc(-2, 1)for more left spacec(-1, 2)for more right space
Net vs. Gross Changes
Thenetgrossplot() function creates a combined bar chart showing:
- Gross changes: Total area that changed (gains + losses)
- Net gain: Net positive change
- Net loss: Net negative change
Basic Net-Gross Plot
Customizing the Net-Gross Plot
- Wide gray bars = total gross change
- Narrower colored bars = net change (above 0 = gain, below 0 = loss)
- Categories with small net but large gross = high turnover
- Categories with similar net and gross = directional change
Example interpretation:If “Pasture” shows:
- Gross change: 500 km²
- Net gain: 450 km²
- 475 km² gained from other categories
- 25 km² lost to other categories
- Net result: +450 km²
Category Areas Over Time
ThebarplotLand() function shows how category areas evolve across all time points.
Basic Bar Plot
- X-axis: Years (all time points in the series)
- Y-axis: Area
- Bars: One per category (color-coded)
- Groups: Clustered by year
Customizing Bar Plots
- Identify dominant categories at each time point
- Track expansion or contraction trends
- Detect regime shifts or tipping points
- Communicate overall landscape composition
Visualization Workflow Example
library(OpenLand)
# Load and prepare data
SL_2002_2014 <- contingencyTable(input_raster = SaoLourencoBasin,
pixelresolution = 30)
# Edit legend
SL_2002_2014$tb_legend$categoryName <- factor(
c("Ap", "FF", "SA", "SG", "aa", "SF", "Agua", "Iu", "Ac", "R", "Im"),
levels = c("FF", "SF", "SA", "SG", "aa", "Ap", "Ac", "Im", "Iu", "Agua", "R")
)
SL_2002_2014$tb_legend$color <- c(
"#FFE4B5", "#228B22", "#00FF00", "#CAFF70", "#EE6363",
"#00CD00", "#436EEE", "#FFAEB9", "#FFA54F", "#68228B", "#636363"
)
# Show category evolution
barplotLand(dataset = SL_2002_2014$lulc_Multistep,
legendtable = SL_2002_2014$tb_legend,
area_km2 = TRUE)
# Show net vs gross changes
netgrossplot(dataset = SL_2002_2014$lulc_Multistep,
legendtable = SL_2002_2014$tb_legend,
color = c(GC = "gray70", NG = "#006400", NL = "#EE2C2C"))
# Multi-step Sankey (all intervals)
sankeyLand(dataset = SL_2002_2014$lulc_Multistep,
legendtable = SL_2002_2014$tb_legend)
# One-step Sankey (first to last)
sankeyLand(dataset = SL_2002_2014$lulc_Onestep,
legendtable = SL_2002_2014$tb_legend)
# Chord diagram (first to last)
chordDiagramLand(dataset = SL_2002_2014$lulc_Onestep,
legendtable = SL_2002_2014$tb_legend)
# Run intensity analysis first
my_intensity <- intensityAnalysis(
dataset = SL_2002_2014,
category_n = "Ap",
category_m = "SG"
)
# Plot interval level
plot(my_intensity$interval_lvl,
labels = c(leftlabel = "Interval Change Area (%)",
rightlabel = "Annual Change Area (%)"),
marginplot = c(-8, 0))
# Plot category gains
plot(my_intensity$category_lvlGain,
labels = c(leftlabel = bquote("Gain Area (" ~ km^2 ~ ")"),
rightlabel = "Intensity Gain (%)"),
marginplot = c(.3, .3))
# Plot transition to Pasture
plot(my_intensity$transition_lvlGain_n,
labels = c(leftlabel = bquote("Gain of Ap (" ~ km^2 ~ ")"),
rightlabel = "Intensity Gain of Ap (%)"),
marginplot = c(.3, .3))
Saving Visualizations
ggplot2-based plots (barplotLand, netgrossplot)
Base R plots (chordDiagramLand, intensity plots)
Interactive plots (sankeyLand)
Tips for Publication-Quality Graphics
Next Steps
- Perform spatial analysis to map accumulated changes
- Learn about intensity analysis interpretation
- Explore the Visualization API Reference for detailed parameter descriptions