hotspots

Hotspots density plot

Identify statistically disproportionate “hot spots” in a set of data values (time or space). The method combines distributional deviance with relative magnitude, so only values that are both extreme and disproportionately large are flagged.

Tutorial here: http://anthony.darrouzet-nardi.net/hotspot_tutorial.html

Install

Stable from CRAN

install.packages("hotspots")

Development from GitHub (latest commits)

# install.packages("remotes")  # if needed
remotes::install_github("anthonydn/hotspots")

Quick start

library(hotspots)

# simulate skewed data
x <- rlnorm(100)

# compute hotspots object (p = 0.99 by default)
h <- hotspots(x)

# visualize cutoff (red line) and flagged hot spots
plot(h)

# summary stats and cutoff (Ch)
summary(h)

# disproportionality (> 1 means hot spot)
sort(disprop(h)$positive)

Notes

Citation

Darrouzet-Nardi A., Bowman W.D. (2011). Hot spots logic described in Ecosystems.
https://doi.org/10.1007/s10021-011-9450-x

Darrouzet-Nardi A. (2013). hotspots: Identify statistically disproportionate hot spots.
CRAN: https://CRAN.R-project.org/package=hotspots