View source: R/plot_spotoroo.R
plot_spotoroo | R Documentation |
This function takes a spotoroo
object to produce a plot of the
clustering results. It can be called by plot.spotoroo()
.
plot_spotoroo(
result,
type = "def",
cluster = "all",
hotspot = TRUE,
noise = FALSE,
ignition = TRUE,
from = NULL,
to = NULL,
step = 1,
mainBreak = NULL,
minorBreak = NULL,
dateLabel = NULL,
bg = NULL
)
result |
|
type |
Character. Type of the plot. One of "def" (default), "timeline" (timeline) and "mov" (fire movement). |
cluster |
Character/Integer. If "all", plot all clusters. If an integer
vector is given, plot corresponding clusters. Unavailable in
|
hotspot |
Logical. If |
noise |
Logical. If |
ignition |
Logical. If |
from |
OPTIONAL. Date/Datetime/Numeric. Start time. The data type needs to be the same as the provided observed time. |
to |
OPTIONAL. Date/Datetime/Numeric. End time. The data type needs to be the same as the provided observed time. |
step |
Integer (>=0). Step size used in the calculation of the
fire movement. Only used in |
mainBreak |
OPTIONAL. Character/Numeric. A string/value giving the
difference between major breaks. If the
observed time is in date/datetime
format,
this value will be passed to
|
minorBreak |
OPTIONAL. Character/Numeric. A string/value giving the
difference between minor breaks. If the
observed time is in date/datetime
format,
this value will be passed to
|
dateLabel |
OPTIONAL. Character. A string giving the formatting
specification for the labels. If the
observed
time is in date/datetime format,
this value will be passed to
|
bg |
OPTIONAL. |
if type
is "def", the clustering results will be plotted spatially.
See also plot_def()
. Available arguments:
result
type
cluster
ignition
hotspot
noise
from
(OPTIONAL)
to
(OPTIONAL)
bg
(OPTIONAL)
if type
is "mov", plot of the fire movement will be made.
See also plot_fire_mov()
. Available arguments:
result
type
cluster
hotspot
from
(OPTIONAL)
to
(OPTIONAL)
step
bg
(OPTIONAL)
if type
is "timeline", plot of the timeline will be made.
See also plot_timeline()
. Available arguments:
result
type
from
(OPTIONAL)
to
(OPTIONAL)
mainBreak
(OPTIONAL)
minorBreak
(OPTIONAL)
dateLabel
(OPTIONAL)
A ggplot
object. The plot of the clustering results.
# Time consuming functions (>5 seconds)
# Get clustering result
result <- hotspot_cluster(hotspots,
lon = "lon",
lat = "lat",
obsTime = "obsTime",
activeTime = 24,
adjDist = 3000,
minPts = 4,
minTime = 3,
ignitionCenter = "mean",
timeUnit = "h",
timeStep = 1)
# Different types of plots
# Default plot
plot_spotoroo(result, "def", bg = plot_vic_map())
# Fire movement plot
plot_spotoroo(result, "mov", cluster = 1:3, step = 3,
bg = plot_vic_map())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.