get_fire_mov: Calculation of the fire movement

View source: R/get_fire_mov.R

get_fire_movR Documentation

Calculation of the fire movement

Description

This function calculates the movement of a single fire per step time indexes. It collects hot spots per step time indexes, then takes the mean or median of the longitude and latitude as the centre of the fire.

Usage

get_fire_mov(result, cluster, step = 1, method = "mean")

Arguments

result

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

cluster

Integer. The membership label of the cluster.

step

Integer (>0). Step size used in the calculation of the fire movement.

method

Character. Either "mean" or "median", method of the calculation of the centre of the fire.

Value

A data.frame. The fire movement.

  • membership : Membership labels.

  • lon : Longitude of the centre of the fire.

  • lat : Latitude of the centre of the fire.

  • timeID : Time indexes.

  • obsTime : Observed time (approximated).

  • ignition : Whether or not it is a ignition point.

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)

  # Get fire movement of the first cluster
  mov1 <- get_fire_mov(result, cluster = 1, step = 3, method = "mean")
  mov1

  # Get fire movement of the second cluster
  mov2 <- get_fire_mov(result, cluster = 2, step = 6, method = "median")
  mov2




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