Overview
ThesankeyLand() function creates interactive Sankey diagrams to visualize one-step or multi-step land use and cover (LUC) transitions. Sankey diagrams are ideal for showing flows and transitions between categories across time periods.
Function Signature
Parameters
A table of multi-step (
lulc_Multistep) or one-step transitions (lulc_Onestep) generated by contingencyTable().A table containing the LUC legend items and their respective colors (
tb_legend). Must include columns: categoryValue, categoryName, and color.Number of iterations in the diagram layout for computation of the depth (y-position) of each node. See
networkD3::sankeyNetwork() for details.Return Value
Returns an interactive HTML widget (Sankey diagram) created using thenetworkD3 package. The diagram shows:
- Nodes representing land use categories at each time point
- Links showing the flow/transition between categories
- Link width proportional to the transition area (km²)
- Color coding based on the source category
Usage Examples
One-Step Sankey Diagram
Visualize transitions between the first and last year only:Multi-Step Sankey Diagram
Visualize transitions across all time intervals:Multi-step Sankey diagrams show the complete temporal evolution of land use patterns, making it easier to identify persistent categories and sequential transitions.
Customization
Adjusting Layout
Theiterations parameter controls the vertical positioning of nodes:
Color Scheme
Colors are determined by thelegendtable$color column, ordered by category names:
Saving Sankey Diagrams
Since Sankey diagrams are HTML widgets, save them usinghtmlwidgets:
Interpretation Guide
- Node height: Represents the total area of a category at a given time point
- Link width: Proportional to the transition area between categories
- Link color: Matches the source category color
- Interactive: Hover over nodes and links to see exact values
See Also
- chordDiagramLand - Alternative circular visualization
- netgrossplot - Net and gross change comparison
- Visualization Guide - Complete visualization workflow