Title: | Quantitative Analysis and Visualization of LUCC |
---|---|
Description: | Tools for the analysis of land use and cover (LUC) time series. It includes support for loading spatiotemporal raster data and synthesized spatial plotting. Several LUC change (LUCC) metrics in regular or irregular time intervals can be extracted and visualized through one- and multistep sankey and chord diagrams. A complete intensity analysis according to Aldwaik and Pontius (2012) <doi:10.1016/j.landurbplan.2012.02.010> is implemented, including tools for the generation of standardized multilevel output graphics. |
Authors: | Reginal Exavier [aut, cre] , Peter Zeilhofer [aut] |
Maintainer: | Reginal Exavier <[email protected]> |
License: | GPL-3 |
Version: | 1.0.3.9000 |
Built: | 2024-11-22 04:54:03 UTC |
Source: | https://github.com/reginalexavier/openland |
OpenLand is an open-source R package for the analysis of land use and cover (LUC) time series. It includes support for consistency check and loading spatiotemporal raster data and synthesized spatial plotting. Several LUC change (LUCC) metrics in regular or irregular time intervals can be extracted and visualized through one- and multistep sankey and chord diagrams. A complete intensity analysis according to (Aldwaik and Pontius, 2012) is implemented, including tools for the generation of standardized multilevel output graphics.
Reginal Exavier [email protected], Peter Zeilhofer [email protected]
Aldwaik, S. Z. and Pontius, R. G. (2012) ‘Intensity analysis to unify measurements of size and stationarity of land changes by interval, category, and transition, Landscape and Urban Planning. Elsevier B.V., 106(1), pp. 103–114. doi:10.1016/j.landurbplan.2012.02.010.
The core functions in this package: intensityAnalysis
,
contingencyTable
,
This function calculates the number of times a pixel has changed during the analysed period. It returns a raster with the number of changes as pixel value and a table containing the areal percentage of every pixel value (number of changes).
acc_changes(path)
acc_changes(path)
path |
The path for the Raster* directory or list of Raster* to be analysed. |
Two objects, a RasterLayer and a table.
url <- "https://zenodo.org/record/3685230/files/SaoLourencoBasin.rda?download=1" temp <- tempfile() download.file(url, temp, mode = "wb") # downloading the SaoLourencoBasin dataset load(temp) # the acc_changes() function, with the SaoLourencoBasin dataset acc_changes(SaoLourencoBasin)
url <- "https://zenodo.org/record/3685230/files/SaoLourencoBasin.rda?download=1" temp <- tempfile() download.file(url, temp, mode = "wb") # downloading the SaoLourencoBasin dataset load(temp) # the acc_changes() function, with the SaoLourencoBasin dataset acc_changes(SaoLourencoBasin)
A grouped barplot representing the areas of LUC categories at each time point of the analysed period.
barplotLand( dataset, legendtable, title = NULL, caption = "LUC Categories", xlab = "Year", ylab = "Area (km2 or pixel)", area_km2 = TRUE, ... )
barplotLand( dataset, legendtable, title = NULL, caption = "LUC Categories", xlab = "Year", ylab = "Area (km2 or pixel)", area_km2 = TRUE, ... )
dataset |
A table of the multi step transitions ( |
legendtable |
A table containing the LUC legend items and their respective
color ( |
title |
character. The title of the plot. |
caption |
character. The caption of the plot. |
xlab |
character. Label for the x axis. |
ylab |
character. Label for the y axis. |
area_km2 |
logical. If TRUE the change is computed in km2, if FALSE in pixel counts. |
... |
additional themes parameters, see |
a barplot
ggplot2::theme
# editing the category names 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") # the plot barplotLand(dataset = SL_2002_2014$lulc_Multistep, legendtable = SL_2002_2014$tb_legend, area_km2 = TRUE)
# editing the category names 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") # the plot barplotLand(dataset = SL_2002_2014$lulc_Multistep, legendtable = SL_2002_2014$tb_legend, area_km2 = TRUE)
A S4 class for the Category level result of an Intensity analysis. Can be
plotted with the plot method plot
.
The slots categoryData
and categoryStationarity
can receive
tables for "Gain" or "Loss" in the following format:
Gain
categoryData
: <tibble>
. A table containing 6 columns:
Period: <fct>
. The period [Yt, Yt+1].
To: <fct>
. A LUC category j.
Interval: <int>
. Duration of the period [Yt, Yt+1] in years.
GG_km2/GG_pixel: <dbl>/<int>
. Area of gross gain of category
j during [Yt, Yt+1].
Gtj: <dbl>
. Annual intensity of gross gain of category j
for time interval [Yt, Yt+1].
St: <dbl>
. Annual intensity of change for time interval [Yt, Yt+1].
categoryStationarity: <tibble>
. A table with the results of a
stationarity test of the gain of the categories on the Category level, containing 5 columns:
To: <fct>
. A category of interest j.
gain: <int>
. Number of times a category had gains during all
time intervals [Y1, YT].
N: <int>
. Total number of evaluated time points (T).
Stationarity: <chr>
. Active Gain or Dormant Gain.
Test: <chr>
. Y if stationarity was detected and N if not.
Loss
categoryData
: <tibble>
. A table containing 6 columns:
Period: <fct>
. The period [Yt, Yt+1].
From: <fct>
. A LUC category i.
Interval: <int>
. Duration of the period [Yt, Yt+1] in years.
GG_km2/GG_pixel: <dbl>/<int>
. Area of gross loss of category
i during [Yt, Yt+1].
Lti: <dbl>
. Annual intensity of gross loss of category i
for time interval [Yt, Yt+1].
STt: <dbl>
. Annual intensity of change for time interval [Yt, Yt+1].
categoryStationarity: <tibble>
. A table of stationarity test
over the loss of the categories in the Category level, containing 5 columns:
From: <fct>
. A category of interest i.
loss: <int>
. Number of times a category had losses during all
time intervals [Y1, YT].
N: <int>
. Total number of evaluated time points (T).
Stationarity: <chr>
. Active Loss or Dormant Loss.
Test: <chr>
. Y if stationarity was detected and N if not.
lookupcolor
The colors (character vector) associated with the LUC legend items.
categoryData
tibble. A table of Category level's results (gain (Gtj) or loss (Lti) values).
categoryStationarity
tibble. A table containing results of a stationarity test. A change is considered stationary only if the intensities for all time intervals reside on one side of the uniform intensity, i.e are smaller or bigger than the uniform rate over the whole period.
A circlize plot representing the one step transitions between two times point of interest.
chordDiagramLand( dataset, legendtable, legposition = c(x = -1.3, y = 0), legtitle = "Categories", sectorcol = "gray80", area_km2 = TRUE, legendsize = 1, y.intersp = 1, x.margin = c(-1, 1) )
chordDiagramLand( dataset, legendtable, legposition = c(x = -1.3, y = 0), legtitle = "Categories", sectorcol = "gray80", area_km2 = TRUE, legendsize = 1, y.intersp = 1, x.margin = c(-1, 1) )
dataset |
A table of the one step transition ( |
legendtable |
A table containing the LUC legend items and their respective
color ( |
legposition |
numeric. A vector containing the 'x' and 'y' values for the
position of the legend. (see |
legtitle |
character. The title of the legend. |
sectorcol |
character. The color of the external sector containing the years of compared time points. |
area_km2 |
logical. If TRUE the change is computed in km2, if FALSE in pixel counts. |
legendsize |
numeric. Font size of the legend. (see "cex" in |
y.intersp |
numeric. character interspacing factor for vertical (y) spacing in the legend. |
x.margin |
numeric vector ensuring additional space (blank area) on the
left or right of the circle for the legend, by default it is c(-1, 1). (see
"canvas.xlim" in |
A Chord Diagram
# editing the category names 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") # the plot chordDiagramLand(dataset = SL_2002_2014$lulc_Onestep, legendtable = SL_2002_2014$tb_legend)
# editing the category names 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") # the plot chordDiagramLand(dataset = SL_2002_2014$lulc_Onestep, legendtable = SL_2002_2014$tb_legend)
Extracts LUC transitions for all input grids of the time series.
contingencyTable(input_raster, pixelresolution = 30)
contingencyTable(input_raster, pixelresolution = 30)
input_raster |
path (character), Raster* object or list of Raster*
objects. See |
pixelresolution |
numeric. The pixel spatial resolution in meter. |
A list that contains 5 objects.
lulc_Mulstistep
: <tibble>
Contingency table for all
analysed time steps, containing 8 columns:
Period: <chr>
The period [Yt, Yt+1].
From: <dbl>
numerical code of a LUC category i.
To: <dbl>
numerical code of a LUC category j.
km2: <dbl>
Area in square kilometers that transited from the
category i
to category j in the period from Yt to Yt+1.
Interval: <dbl>
Interval of years between the first and
the last year of the period [Yt, Yt+1].
QtPixel: <int>
Pixel count that transited from the categories
i
to category j in the period from Yt to Yt+1.
yearFrom: <chr>
The year that the change comes from [Yt].
yearTo: <chr>
The year that the change goes for [Yt+1].
lulc_Onestep
:<tibble>
Contingency table for the entire
analysed period [Y1, YT], containing
8 columns identical with lulc_Mulstistep
.
tb_legend
: <tibble>
A table of the pixel value, his
name and color containing 3 columns:
categoryValue: <dbl>
the pixel value of the LUC category.
categoryName: <factor>
randomly created string associated with
a given pixel value of a LUC category.
color: <chr>
random color associated with the given pixel value
of a LUC category.
Before further analysis, one would like to change the categoryName
and color
values.
Therefore the category names have to be in the same order as the
categoryValue
and the levels
should be put in the right order for legend
plotting. Like:
myobject$tb_legend$categoryName <- factor(c("name1", "name2", "name3", "name4"), levels = c("name3", "name2", "name1", "name4"))
The colors have to in the same order as the values in the categoryValue
column. Colors can be given by the
color name (eg. "black") or an HEX value (eg. #FFFFFF). Like:
myobject$tb_legend$color <- c("#CDB79E", "red", "#66CD00", "yellow")
totalArea
: <tibble>
A table with the total area of the
study area containing 2 columns:
area_km2: <numeric>
The total area in square kilometers.
QtPixel: <numeric>
The total area in pixel counts.
totalInterval
: <numeric>
Total interval of the analysed
time series in years.
url <- "https://zenodo.org/record/3685230/files/SaoLourencoBasin.rda?download=1" temp <- tempfile() download.file(url, temp, mode = "wb") #downloading the online dataset load(temp) # the contingencyTable() function, with the SaoLourencoBasin dataset contingencyTable(input_raster = SaoLourencoBasin, pixelresolution = 30)
url <- "https://zenodo.org/record/3685230/files/SaoLourencoBasin.rda?download=1" temp <- tempfile() download.file(url, temp, mode = "wb") #downloading the online dataset load(temp) # the contingencyTable() function, with the SaoLourencoBasin dataset contingencyTable(input_raster = SaoLourencoBasin, pixelresolution = 30)
This function implements an Intensity Analysis (IA) according to Aldwaik & Pontius (2012), a quantitative method to analyze time series of land use and cover (LUC) maps. For IA, a cross-tabulation matrix is composed for each LUC transition step in time.
intensityAnalysis(dataset, category_n, category_m, area_km2 = TRUE)
intensityAnalysis(dataset, category_n, category_m, area_km2 = TRUE)
dataset |
list. The result object from |
category_n |
character. The gaining category in the transition of interest (n). |
category_m |
character. The losing category in the transition of interest (m). |
area_km2 |
logical. If TRUE the change is computed in km2, if FALSE in pixel counts. |
IA includes three levels of analysis of LUC changes. Consecutive analysis levels detail hereby information given by the previous analysis level (Aldwaik and Pontius, 2012, 2013).
The interval level examines how the size and speed of change vary across time intervals.
The category level examines how the size and intensity of gross losses and gross gains in each category vary across categories for each time interval.
The transition level examines how the size and intensity of a category’s transitions vary across the other categories that are available for that transition.
At each analysis level, the method tests for stationarity of patterns across time intervals.
The function returns a list with 6 objects:
lulc_table: tibble
. Contingency table of LUC transitions at all
analysed time steps, containing 6 columns:
Period: <fct>
. Evaluated period of transition in the format
year t - year t+1
.
From: <fct>
. The category in year t.
To: <fct>
. The category in year t+1.
km2: <dbl>
. Area in square kilometers that transited from the
category From
.
to the category To
in the period.
QtPixel: <int>
. Number of pixels that transited from.
the category From
to the category To
in the period.
Interval: <int>
. Interval in years of the evaluated period.
lv1_tbl: An Interval
object containing the
St and U values.
category_lvlGain: A Category
object
containing the gain of the LUC category in a period (Gtj).
category_lvlLoss: A Category
object
containing the loss of the LUC category in a period (Lti).
transition_lvlGain_n: A Transition
object
containing the annualized rate of gain in category n (Rtin) and
the respective Uniform Intensity (Wtn).
transition_lvlLoss_m: A Transition
object
containing the annualized rate of loss in category m (Qtmj) and
the respective Uniform Intensity (Vtm).
Intensity object
Aldwaik, S. Z. and Pontius, R. G. (2012) ‘Intensity analysis to unify measurements of size and stationarity of land changes by interval, category, and transition, Landscape and Urban Planning. Elsevier B.V., 106(1), pp. 103–114. doi:10.1016/j.landurbplan.2012.02.010.
Aldwaik, S. Z. and Pontius, R. G. (2013) ‘Map errors that could account for deviations from a uniform intensity of land change, International Journal of Geographical Information Science. Taylor & Francis, 27(9), pp. 1717–1739. doi:10.1080/13658816.2013.787618.
# editing the category name 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") intensityAnalysis(dataset = SL_2002_2014, category_n = "Ap", category_m = "SG", area_km2 = TRUE)
# editing the category name 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") intensityAnalysis(dataset = SL_2002_2014, category_n = "Ap", category_m = "SG", area_km2 = TRUE)
A S4 class for the Interval level result of an Intensity analysis. Can be
plotted with the plot method plot
.
The slot intervalData
receives a table containing 4 columns
in the following format:
Period: <fct>
. The period of interest [Yt, Yt+1].
PercentChange: <dbl>
. Changed area on the Interval level (%).
St: <dbl>
. Annual intensity of change for a time
period [Yt, Yt+1].
U: <dbl>
. Uniform intensity for a LUC category change in a time
period of interest.
intervalData
tibble. A table with the results of an Intensity analysis at the Interval level (St and U values).
A stacked barplot showing net and gross changes of LUC categories during the entire analysed time period.
netgrossplot( dataset, legendtable, title = NULL, xlab = "LUC category", ylab = "Area (Km2)", legend_title = "Changes", changesLabel = c(GC = "Gross change", NG = "Net gain", NL = "Net loss"), color = c(GC = "gray70", NG = "#006400", NL = "#EE2C2C"), area_km2 = TRUE )
netgrossplot( dataset, legendtable, title = NULL, xlab = "LUC category", ylab = "Area (Km2)", legend_title = "Changes", changesLabel = c(GC = "Gross change", NG = "Net gain", NL = "Net loss"), color = c(GC = "gray70", NG = "#006400", NL = "#EE2C2C"), area_km2 = TRUE )
dataset |
A table of the multi step transition ( |
legendtable |
A table containing the LUC legend items and their respective
color ( |
title |
character. The title of the plot (optional), use |
xlab |
character. Label for the x axis. |
ylab |
character. Label for the y axis. |
legend_title |
character. The title of the legend. |
changesLabel |
character. Labels for the three types of changes, defaults are c(GC = "Gross change", NG = "Net gain", NL = "Net loss"). |
color |
character. A vector defining the three bar colors. |
area_km2 |
logical. If TRUE the change is computed in km2, if FALSE in pixel counts. |
A bar plot
# editing the category names 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")) # the plot netgrossplot(dataset = SL_2002_2014$lulc_Multistep, legendtable = SL_2002_2014$tb_legend, title = NULL, xlab = "LUC Category", changes = c(GC = "Gross changes", NG = "Net Gain", NL = "Net Loss"), color = c(GC = "gray70", NG = "#006400", NL = "#EE2C2C"))
# editing the category names 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")) # the plot netgrossplot(dataset = SL_2002_2014$lulc_Multistep, legendtable = SL_2002_2014$tb_legend, title = NULL, xlab = "LUC Category", changes = c(GC = "Gross changes", NG = "Net Gain", NL = "Net Loss"), color = c(GC = "gray70", NG = "#006400", NL = "#EE2C2C"))
plot
in package OpenLand
Plot Intensity
objects based on Intensity Analysis output.
plot(x, y, ...) ## S4 method for signature 'Interval,ANY' plot( x, y, labels = c(leftlabel = "Interval Change Area (percent of map)", rightlabel = "Annual Change Area (percent of map)"), title = NA, labs = c(type = "Changes", ur = "Uniform Intensity"), marginplot = c(lh = -10, rh = 0), leg_curv = c(x = 0.1, y = 0.1), color_bar = c(fast = "#B22222", slow = "#006400", area = "gray40"), fontsize_ui = 10, ... ) ## S4 method for signature 'Category,ANY' plot( x, y, labels = c(leftlabel = "Annual Change Area (km2 or pixels)", rightlabel = "Annual Change Intensity (percent of category)"), title = NA, labs = c(type = "Categories", ur = "Uniform Intensity"), marginplot = c(lh = 0.5, rh = 0.5), leg_curv = c(x = 0.1, y = 0.1), fontsize_ui = 10, ... ) ## S4 method for signature 'Transition,ANY' plot( x, y, labels = c(leftlabel = "Annual Transition Area (km2 or pixels)", rightlabel = "Annual Transition Intensity (percent of category)"), title = NA, labs = c(type = "Categories", ur = "Uniform Intensity"), marginplot = c(lh = 0.5, rh = 0.5), leg_curv = c(x = 0.1, y = 0.1), fontsize_ui = 10, ... )
plot(x, y, ...) ## S4 method for signature 'Interval,ANY' plot( x, y, labels = c(leftlabel = "Interval Change Area (percent of map)", rightlabel = "Annual Change Area (percent of map)"), title = NA, labs = c(type = "Changes", ur = "Uniform Intensity"), marginplot = c(lh = -10, rh = 0), leg_curv = c(x = 0.1, y = 0.1), color_bar = c(fast = "#B22222", slow = "#006400", area = "gray40"), fontsize_ui = 10, ... ) ## S4 method for signature 'Category,ANY' plot( x, y, labels = c(leftlabel = "Annual Change Area (km2 or pixels)", rightlabel = "Annual Change Intensity (percent of category)"), title = NA, labs = c(type = "Categories", ur = "Uniform Intensity"), marginplot = c(lh = 0.5, rh = 0.5), leg_curv = c(x = 0.1, y = 0.1), fontsize_ui = 10, ... ) ## S4 method for signature 'Transition,ANY' plot( x, y, labels = c(leftlabel = "Annual Transition Area (km2 or pixels)", rightlabel = "Annual Transition Intensity (percent of category)"), title = NA, labs = c(type = "Categories", ur = "Uniform Intensity"), marginplot = c(lh = 0.5, rh = 0.5), leg_curv = c(x = 0.1, y = 0.1), fontsize_ui = 10, ... )
x |
An intensity object generated by |
y |
ignored. |
... |
additional arguments for theme parameters from ggplot2, see
|
labels |
character. Left and right axis titles(caption). |
title |
character. Main title. |
labs |
character. The lateral legend. |
marginplot |
numeric. Adjustment of the origins of left and right part of the plots. |
leg_curv |
numeric. x and y values that control the arrow size and position pointing to the Uniform Intensity vertical line. |
color_bar |
character. Colors defined for the fast, slow and area bars
(only for an |
fontsize_ui |
numeric. Fontsize of the uniform intensity percent in the plot. |
Interval |
The class. |
Category |
The class. |
Transition |
The class. |
An intensity graph
A sankey showing the one or multi step LUC transitions during the analysed period.
sankeyLand(dataset, legendtable, iterations = 0)
sankeyLand(dataset, legendtable, iterations = 0)
dataset |
A table of the multi step ( |
legendtable |
A table containing the LUC legend items and their respective
color ( |
iterations |
numeric. Number of iterations in the diagram layout for
computation of the depth (y-position) of each node. See |
A sankey diagram
# editing the category names 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") # onestep sankey sankeyLand(dataset = SL_2002_2014$lulc_Onestep, legendtable = SL_2002_2014$tb_legend) # multistep sankey sankeyLand(dataset = SL_2002_2014$lulc_Multistep, legendtable = SL_2002_2014$tb_legend)
# editing the category names 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") # onestep sankey sankeyLand(dataset = SL_2002_2014$lulc_Onestep, legendtable = SL_2002_2014$tb_legend) # multistep sankey sankeyLand(dataset = SL_2002_2014$lulc_Multistep, legendtable = SL_2002_2014$tb_legend)
A list containing five objects created by the contingencyTable
function with SaoLourencoBasin
as input
(SL_2002_2014 <- contingenceTable(input_raster = SaoLourencoBasin, pixelresolution = 30)
).
data(SL_2002_2014)
data(SL_2002_2014)
A data list with 5 objects:
<tibble>
Contingency table for all analysed
time steps, containing 8 columns:
Period: <chr>
The period [Yt, Yt+1].
From: <int>
numerical code of a LUC category i.
To: <int>
numerical code of a LUC category j.
km2: <dbl>
Area in square kilometers that transited from the
category i
to category j in the period from Yt to Yt+1.
QtPixel: <int>
Pixel count that transited from the categories
i to category j in the period from Yt to Yt+1.
Interval: <int>
Interval of years between the first and
the last year of the period [Yt, Yt+1].
yearFrom: <int>
The year that the change comes from [Yt]
yearTo: <int>
The year that the change goes for [Yt+1]
<tibble>
Contingency table for the entire analysed
period [Yt1, YT], containing
8 columns identical with lulc_Mulstistep
.
<tibble>
A table of the pixel value, his name and
color containing 3 columns:
categoryValue: <int>
the pixel value of the LUC category.
categoryName: <fct>
randomly created string associated with a
given pixel value of a LUC category.
color: <chr>
random color associated with the given pixel value
of a LUC category.
<tibble>
A table with the total area of the study
area containing 2 columns:
area_km2: <dbl>
The total area in square kilometers.
QtPixel: <int>
The total area in pixel counts
.
<int>
Total interval of the analysed time
series in years
.
https://www.embrapa.br/pantanal/bacia-do-alto-paraguai
Listing major characteristics of raster inputs. Those characteristics are the dimensions, the resolution, the extent, the values (min, max) and the coordinate reference system.
summary_dir(path)
summary_dir(path)
path |
The path for the Raster* directory or list of Raster* to be analysed. |
Table with the raster parameters in columns
url <- "https://zenodo.org/record/3685230/files/SaoLourencoBasin.rda?download=1" temp <- tempfile() download.file(url, temp, mode = "wb") # downloading the SaoLourencoBasin dataset load(temp) # the acc_changes() function, with the SaoLourencoBasin dataset summary_dir(raster::unstack(SaoLourencoBasin))
url <- "https://zenodo.org/record/3685230/files/SaoLourencoBasin.rda?download=1" temp <- tempfile() download.file(url, temp, mode = "wb") # downloading the SaoLourencoBasin dataset load(temp) # the acc_changes() function, with the SaoLourencoBasin dataset summary_dir(raster::unstack(SaoLourencoBasin))
This function presents a summary with the pixel quantity of each category present in a categorical raster.
summary_map(path)
summary_map(path)
path |
The path for the raster to be analysed, if path is a multilayer raster only the first RasterLayer will be analysed. |
A table containing in columns the pixel counts for each pixel value
url <- "https://zenodo.org/record/3685230/files/SaoLourencoBasin.rda?download=1" temp <- tempfile() download.file(url, temp, mode = "wb") # downloading the SaoLourencoBasin dataset load(temp) summary_map(SaoLourencoBasin[[1]])
url <- "https://zenodo.org/record/3685230/files/SaoLourencoBasin.rda?download=1" temp <- tempfile() download.file(url, temp, mode = "wb") # downloading the SaoLourencoBasin dataset load(temp) summary_map(SaoLourencoBasin[[1]])
A S4 class for the Transition level result of an Intensity analysis. Can be
plotted with the plot method plot
.
The slots transitionData
and transitionStationarity
can
receive tables for "Gain of category n" or "Loss of category m" in the following
format:
Gain of category n:
transitionData
: <tibble>
. A table with 7 columns:
Period: <fct>
. The period [Yt, Yt+1].
From: <fct>
. A category i.
To: <fct>
. The gaining category in the transition of interest (n).
Interval: <int>
. Duration of the period [Yt, Yt+1].
T_i2n_km2/T_i2n_pixel: <dbl>
. Area with transition from category
i to category n during time interval [Yt, Yt+1] where i
is not equal to
n.
Rtin: <dbl>
. Annual intensity of transition from category i to
category n
during time interval [Yt, Yt+1] where i is not equal to
n.
Wtn: <dbl>
. Value of the uniform intensity of the transition
to category n from all non-n categories at time Yt during time interval [Yt, Yt+1].
transitionStationarity: <tibble>
. A table containing results of
a stationarity test over the gain on category n containing 5 columns:
From: <fct>
. The losing category in the transition of interest
to the category n.
loss: <int>
. Number of times the category had losses to the
category n.
N: <int>
. Total number of transitions to be considered as stationary (T).
Stationarity: <chr>
. targeted by or avoided by
the category n
.
Test: <chr>
. Y for stationarity detected and N
when not.
Loss of category m:
transitionData
: <tibble>
. A table with 7 columns:
Period: <fct>
. The period [Yt, Yt+1].
To: <fct>
. A category j.
From: <fct>
. The losing category in the transition of interest (m).
Interval: <dbl>
. Duration of the period [Yt, Yt+1].
T_m2j_km2/T_m2j_pixel: <dbl>
. Area with transition from category
m to category j during time interval [Yt, Yt+1]
where j is not equal to
m.
Qtmj: <dbl>
. Annual intensity of transition from category m to
category j during time interval [Yt, Yt+1]
where j is not equal to
m.
Vtm: <dbl>
. Value of the uniform intensity of the transition
from category m to all non-m categories at time Yt+1
during time interval [Yt, Yt+1].
transitionStationarity: <tibble>
. A table containing results of
a stationarity test
over the loss of category m containing 5 columns:
To: <fct>
. The gaining category in the transition of interest
from the category m.
gain: <int>
. Number of times the category had gains from the
category m.
N: <int>
. Total number of transitions to be considered as stationary (T).
Stationarity: <chr>
. targeted or avoided the category m
.
Test: <chr>
. Y for stationarity detected and N when not.
lookupcolor
The colors (character vector) associated with the LUC legend items.
transitionData
tibble. A table of Transition level's results (gain n (Rtin & Wtn) or loss m (Qtmj & Vtm) values).
transitionStationarity
tibble. A table containing results of a stationarity test. A change is considered stationary only if the intensities for all time intervals reside on one side of the uniform intensity, i.e are smaller or bigger than the uniform rate over the whole period.