extract_fire {spotoroo}R Documentation

Extracting fires from the spatiotemporal clustering results

Description

This function takes a spotoroo object to produce a data frame which contains information about the fire.

Usage

extract_fire(result, cluster = "all", noise = FALSE)

Arguments

result

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

cluster

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

noise

Logical. Whether or not to include noise.

Value

A data.frame. The fire information

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)


  # Extract all fires
  all_fires <- extract_fire(result)
  head(all_fires, 3)

  # Extract cluster 4
  fire_4 <- extract_fire(result, 4)
  head(fire_4, 3)



[Package spotoroo version 0.1.4 Index]