kde_int_comp | R Documentation |
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.
kde_int_comp(data, start1, end1, start2, end2)
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 |
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.
Jamie Spaulding, Keith Morris
#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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.