Learn R Programming

spotoroo (version 0.1.4)

get_fire_mov: 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")

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.

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.

Examples

Run this code

# \donttest{

  # 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
# }


Run the code above in your browser using DataLab