Skip to contents

plot.spotoroo() is the plot method of the class spotoroo. It is a simple wrapper of plot_spotoroo().

Usage

# S3 method for spotoroo
plot(x, ...)

Arguments

x

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

...

Additional arguments pass to plot_spotoroo()

Value

A ggplot object. The plot of the clustering results.

Examples


# \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)
#> 
#> ──────────────────────────────── SPOTOROO 0.1.4 ────────────────────────────────
#> 
#> ── Calling Core Function : `hotspot_cluster()` ──
#> 
#> ── "1" time index = 1 hour 
#>  Transform observed timetime indexes
#>  970 time indexes found
#> 
#> ── activeTime = 24 time indexes | adjDist = 3000 meters 
#>  Cluster
#>  16 clusters found (including noise)
#> 
#> ── minPts = 4 hot spots | minTime = 3 time indexes 
#>  Handle noise
#>  6 clusters left
#>  noise proportion : 0.935 %
#> 
#> ── ignitionCenter = "mean" 
#>  Compute ignition points for clusters
#>  average hot spots : 176.7
#>  average duration : 131.9 hours
#> 
#> ── Time taken = 0 mins 1 sec for 1070 hot spots 
#>  0.001 secs per hot spot
#> 
#> ────────────────────────────────────────────────────────────────────────────────



  # Different types of plots

  # Default plot
  plot(result, "def", bg = plot_vic_map())


  # Fire movement plot
  plot(result, "mov", cluster = 1:3, step = 3, bg = plot_vic_map())

# }