kde_int_comp: Comparison of KDE Maps Across Specified Time Intervals

Description Usage Arguments Value Author(s) Examples

View source: R/kde_int_comp.R

Description

This function calculates and compares the kernel density estimate (heat maps) of crime incident locations from two given intervals. The function returns a net difference raster which illustrates net changes between the spatial crime distributions across the specified intervals.

Usage

1
kde_int_comp(data, start1, end1, start2, end2)

Arguments

data

Data frame of crime or RMS data. See provided Chicago Data Portal example for reference

start1

Beginning date for the first interval of comparison

end1

Final date for the first interval of comparison

start2

Beginning date for the second interval of comparison

end2

Final date for the second interval of comparison

Value

Returns a shiny.tag.list object which contains three leaflet widgets: a widget with the calculated KDE from interval 1, a widget with the calculated KDE from interval 2, and a widget with a raster of the net differences between the KDE (heat maps) of each specified interval.

Author(s)

Jamie Spaulding, Keith Morris

Examples

1
2
3
4
#Using provided dataset from Chicago Data Portal:
data(crimes)
int_out <- kde_int_comp(crimes, start1="1/1/2017", end1="3/1/2017",
                                start2="1/1/2018", end2="3/1/2018")

rcrimeanalysis documentation built on July 8, 2020, 7:34 p.m.