extract_fire: Extracting fires from the spatiotemporal clustering results

Description Usage Arguments Value Examples

View source: R/extract_fire.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  # 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)

spotoroo documentation built on Nov. 10, 2021, 9:08 a.m.