near_repeat_analysis: Near Repeat Analysis of Crime Incidents with Crime Linkage Output
Description
This function performs near repeat analysis for a set of incident
locations. The user specifies distance and time thresholds which are utilized
to search all other incidents and find other near repeat incidents. From this
an adjacency matrix is created for incidents which are related under the
thresholds. The adjacency matrix is then used to create an igraph graph which
illustrates potentially related or linked incidents (under the near repeat
thresholds).
Returns a list of all near repeat series identified within the input
data as igraph graph objects. This list can be used to generate plots
of each series and to discern the near repeat linkages between the crime
incidents.
Arguments
data
Data frame of crime or RMS data. See provided Chicago Data Portal
example for reference
epsg
The EPSG Geodetic Parameter code for the area being considered.
The EPSG code is used for identifying projections and performing coordinate
transformations. If needed, the EPSG for an area can be found at
https://spatialreference.org.
dist_thresh
The spatial distance (in meters) which defines a near repeat
incident. By default this value is set to 1000 meters.
time_thresh
The temporal distance (in days) which defines a near repeat
incident. By default this value is set to 7 days.
data(crimes)
nr_data <- head(crimes, n = 1000) #truncate dataset for near repeat analysisout <- near_repeat_analysis(data=nr_data,tz="America/Chicago",epsg="32616")