plot_fire_mov: Plotting the fire movement

View source: R/plot_fire_mov.R

plot_fire_movR Documentation

Plotting the fire movement

Description

This function plots the fire movement. The fire movement is calculated from get_fire_mov().

Usage

plot_fire_mov(
  result,
  cluster = "all",
  hotspot = TRUE,
  from = NULL,
  to = NULL,
  step = 1,
  bg = NULL
)

Arguments

result

spotoroo object. A result of a call to hotspot_cluster().

cluster

Character/Integer. If "all", plot all clusters. If an integer vector is given, plot corresponding clusters.

hotspot

Logical. If TRUE, plot the hot spots.

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.

bg

OPTIONAL. ggplot object. If specified, plot onto this object.

Value

A ggplot object. The plot of the fire movements.

Examples



  # Time consuming functions (>5 seconds)


  # Get clustering results
  result <- hotspot_cluster(hotspots,
                          lon = "lon",
                          lat = "lat",
                          obsTime = "obsTime",
                          activeTime = 24,
                          adjDist = 3000,
                          minPts = 4,
                          minTime = 3,
                          ignitionCenter = "mean",
                          timeUnit = "h",
                          timeStep = 1)

  # Plot cluster 1 to 4
  plot_fire_mov(result, cluster = 1:4)

  # Plot cluster 1 to 4, set step = 6
  plot_fire_mov(result, cluster = 1:4, step = 6)



TengMCing/hotspotcluster documentation built on Aug. 23, 2023, 12:47 p.m.