Skip to contents

Analysing hotspots

Tools for analysing hotspots.

hotspot_count()
Count points in cells in a two-dimensional grid
hotspot_change()
Identify change in hotspots over time
hotspot_kde()
Estimate two-dimensional kernel density of points
hotspot_dual_kde()
Estimate the relationship between the kernel density of two layers of points
hotspot_gistar()
Identify significant spatial clusters of points
hotspot_classify()
Classify hot-spots
hotspot_classify_params()
Control the parameters used to classify hotspots

Data wrangling

Tools for working with data that is used to identify hotspots. Most data wrangling is done automatically by the analysis functions listed above, but you can use the functions below to control in more detail how this is done.

hotspot_clip()
Extract points inside polygon
hotspot_grid()
Create either a rectangular or hexagonal two-dimensional grid
st_transform_auto()
Toggle between lon/lat and UTM co-ordinates

Plotting results

These methods for the autoplot() function automatically produce charts that are tailored to displaying the results produced by one of the hotspot_*() family of functions.

autoplot(<hspt_c>)
Plot map of hotspot classifications
autoplot(<hspt_d>) autolayer(<hspt_d>)
Plot map of changes in grid counts
autoplot(<hspt_k>) autolayer(<hspt_k>)
Plot map of kernel-density values
autoplot(<hspt_n>) autolayer(<hspt_n>)
Plot map of grid counts

Sample data

Sample data that can be used with the functions in this package.

memphis_population
Populations of census blocks in Memphis in 2020
memphis_precincts
Memphis Police Department Precincts
memphis_robberies
Personal robberies in Memphis in 2019
memphis_robberies_jan
Personal robberies in Memphis in January 2019