| Title: | Generates Aoristic Probability Distributions |
|---|---|
| Description: | It can sometimes be difficult to ascertain when some events (such as property crime) occur because the victim is not present when the crime happens. As a result, police databases often record a 'start' (or 'from') date and time, and an 'end' (or 'to') date and time. The time span between these date/times can be minutes, hours, or sometimes days, hence the term 'Aoristic'. Aoristic is one of the past tenses in Greek and represents an uncertain occurrence in time. For events with a location described by either a latitude/longitude or X/Y coordinate pair, and a start and end date/time, this package generates an aoristic data frame with aoristic weighted probability values for each hour of the week, for each observation. The coordinates are not necessary for the program to calculate aoristic weights; however, they are part of this package because a spatial component has been integral to aoristic analysis from the start. Dummy coordinates can be introduced if the user only has temporal data. Outputs include an aoristic data frame, as well as summary graphs and displays. For more information see: Ratcliffe, JH (2002) Aoristic signatures and the temporal analysis of high volume crime patterns, Journal of Quantitative Criminology. 18 (1): 23-43. Note: This package replaces an original 'aoristic' package (version 0.6) by George Kikuchi that has been discontinued with his permission. |
| Authors: | Jerry Ratcliffe [aut, cre] |
| Maintainer: | Jerry Ratcliffe <[email protected]> |
| License: | GPL-3 |
| Version: | 2.0.0 |
| Built: | 2026-10-11 15:10:23 UTC |
| Source: | https://github.com/jerry-ratcliffe/aoristic |
Flags missing End/To values with '1' and End/To values before Start/From with '2'. The function also reports missing or zero coordinates.
aoristic.datacheck(data1, Xcoord, Ycoord, DateTimeFrom, DateTimeTo)aoristic.datacheck(data1, Xcoord, Ycoord, DateTimeFrom, DateTimeTo)
data1 |
Data frame containing coordinates and date-time columns. |
Xcoord |
Name of the numeric X coordinate or latitude column. |
Ycoord |
Name of the numeric Y coordinate or longitude column. |
DateTimeFrom |
Name of the Start/From POSIXct column. |
DateTimeTo |
Name of the End/To POSIXct column. |
A data frame containing the checked fields, elapsed duration, and an 'aoristic_datacheck' flag.
Ratcliffe, J. H. (2002). Aoristic signatures and the spatio-temporal analysis of high volume crime patterns. Journal of Quantitative Criminology, 18(1), 23-43.
datacheck.df <- aoristic.datacheck( dcburglaries, "X", "Y", "StartDateTime", "EndDateTime" )datacheck.df <- aoristic.datacheck( dcburglaries, "X", "Y", "StartDateTime", "EndDateTime" )
Calculates aoristic proportional weights across 168 units representing each hour of the week (24 hours x 7 days). It is designed for situations when an event time is not known but could be spread across numerous hours or days, represented by Start/From and End/To date-times.
aoristic.df(data1, Xcoord, Ycoord, DateTimeFrom, DateTimeTo)aoristic.df(data1, Xcoord, Ycoord, DateTimeFrom, DateTimeTo)
data1 |
Data frame containing coordinates and date-time columns. |
Xcoord |
Name of the numeric X coordinate or latitude column. |
Ycoord |
Name of the numeric Y coordinate or longitude column. |
DateTimeFrom |
Name of the Start/From POSIXct column. |
DateTimeTo |
Name of the End/To POSIXct column. |
If an observation is missing the End/To date-time, or its End/To precedes its Start/From, the entire weight is assigned to the hour containing the Start/From date-time. Durations of at least one week receive a uniform probability of '1/168' in every hour.
A data frame with source fields, duration in whole elapsed minutes, and aoristic probabilities for every hour of the week.
Ratcliffe, J. H. (2002). Aoristic signatures and the spatio-temporal analysis of high volume crime patterns. Journal of Quantitative Criminology, 18(1), 23-43.
df <- aoristic.df(dcburglaries, "X", "Y", "StartDateTime", "EndDateTime")df <- aoristic.df(dcburglaries, "X", "Y", "StartDateTime", "EndDateTime")
Takes the output from the aoristic.summary() function and converts that data frame into a series of eight charts for each day of the week (and a total chart) based on the aggregate aoristic distribution of the events. Option (marks = TRUE) adds small tick marks showing the (y-axis adjusted) overall weekly distribution for comparison to the daily value.
aoristic.graph(data1, marks = FALSE)aoristic.graph(data1, marks = FALSE)
data1 |
a data frame output from the aoristic2.df function |
marks |
marks=FALSE. TRUE shows tick marks for week distribution. Default is FALSE. |
Ratcliffe, J. H. (2002). Aoristic signatures and the spatio-temporal analysis of high volume crime patterns. Journal of Quantitative Criminology, 18(1), 23-43.
aoristic.graph(dcburgsum) aoristic.graph(dcburgsum, TRUE)aoristic.graph(dcburgsum) aoristic.graph(dcburgsum, TRUE)
Creates a plot showing aoristic probability values for one hour of the week. The X, Y coordinate pair (or latitude and longitude) are used to create a plot that shows each event that could have occured in the user- selected hour. Each event is color coded to represent the aoristic weight, range >0 to 1. Events with weight 1 definitely occurred during that hour, while events with values at the lower end of the range could have occured at one of many hours. For guidance on which day/hour is represented by a number, use aoristic.ref()
aoristic.map(data1, AorHour = "1")aoristic.map(data1, AorHour = "1")
data1 |
a data frame output from the aoristic.df function |
AorHour |
user-selected number for an hour in the week (range 1-168) |
A ggplot object
Ratcliffe, J. H. (2002). Aoristic signatures and the spatio-temporal analysis of high volume crime patterns. Journal of Quantitative Criminology, 18(1), 23-43.
## Not run: aor.plot <- aoristic.map(aor.df, 25) ## End(Not run)## Not run: aor.plot <- aoristic.map(aor.df, 25) ## End(Not run)
Summarizes the sum of aoristic weights for each hour of the week, based on output from an aoristic data frame (created by aoristic.df). This function returns a ggplot object.
NOTE: Be aware that the distribution of values is NOT the same as the aoristic.ref() output, because the summary charts and graphs move Sunday to the end of the week to keep the weekend together.
aoristic.plot(data1)aoristic.plot(data1)
data1 |
a data frame output from the aoristic.df function |
ggplot object
Ratcliffe, J. H. (2002). Aoristic signatures and the spatio-temporal analysis of high volume crime patterns. Journal of Quantitative Criminology, 18(1), 23-43.
## Not run: aoristic.plot(aor.df) p <- aoristic.plot(aor.df) ## End(Not run)## Not run: aoristic.plot(aor.df) p <- aoristic.plot(aor.df) ## End(Not run)
Creates and views a simple data frame with reference hour of the week. This is a reference for the aoristic.map function that requires a user-selected hour in order to map spatial distribution for the requested one hour time period.
aoristic.ref()aoristic.ref()
NOTE: The jpg from aoristic.summary does not use the same day/hour layout. Sunday is moved to the end of the layout to make the weekend period clearer to the user.
A data frame
Ratcliffe, J. H. (2002). Aoristic signatures and the spatio-temporal analysis of high volume crime patterns. Journal of Quantitative Criminology, 18(1), 23-43.
Summarizes the sum of aoristic weights for each hour of the week, based on output from an aoristic data frame (created by aoristic.df). The function returns a data frame, with optional outputs. Option 'xlsx' sends the data frame to an Excel spreadsheet in the current working directory. Filenames increment to prevent overwriting previous analyses. Using option 'jpg' creates a color coded summary table in jpg format in the working directory. The filename is aoristic_distribution.jpg, adding incremental numbers as necessary to the filename.
NOTE: Be aware that the distribution of values is NOT the same as the aoristic.ref() output, because the summary charts and graphs move Sunday to the end of the week to keep the weekend together.
aoristic.summary(data1, output = "")aoristic.summary(data1, output = "")
data1 |
a data frame output from the aoristic.df function |
output |
output ='xlsx' for an Excel format output #' output ='jpg' for JPG grid, blank otherwise |
A data frame with aoristic values summed for each hour of the week
Ratcliffe, J. H. (2002). Aoristic signatures and the spatio-temporal analysis of high volume crime patterns. Journal of Quantitative Criminology, 18(1), 23-43.
## Not run: aor.summary <- aoristic.summary(aor.df) aor.summary <- aoristic.summary(aor.df, 'xlsx') aor.summary <- aoristic.summary(aor.df, 'jpg') ## End(Not run)## Not run: aor.summary <- aoristic.summary(aor.df) aor.summary <- aoristic.summary(aor.df, 'xlsx') aor.summary <- aoristic.summary(aor.df, 'jpg') ## End(Not run)
A dataset containing the X and Y coordinates of burglaries, with the start and end date and times of the crimes. Sourced from Open Data Washington DC with start date in the first six months 2016. X, Y geometry for Washington DC is from FIPS 1900 (crs 7058).
dcburglariesdcburglaries
A data frame with 1025 rows and 4 variables:
X coordinate of burglary location
Y coordinate of burglary location
Start date and time of the burglary in POSIXct format
End date and time of the burglary in POSIXct format
A dataset containing the summarized output generated by aoristic.summary() on the data frame produced by the aoristic function aoristic.df(dcburglaries, ...).
dcburgsumdcburgsum
A data frame with 24 observations and 8 variables:
The hour represented by the column, in 24 hour format
Sum of aoristic values for Mondays by hour
Sum of aoristic values for Tuesdays by hour
Sum of aoristic values for Wednesdays by hour
Sum of aoristic values for Thursdays by hour
Sum of aoristic values for Fridays by hour
Sum of aoristic values for Saturdays by hour
Sum of aoristic values for Sundays by hour
A dataset with a residential burglaries in the Borough of Manhattan, New York City, NY for 2019. Data include start and end date-times, and coordinates.
NYburgNYburg
A data frame with 1233 rows and 6 variables:
Crime from date in Date format
Crime from time in number format
Crime to date in Date format
Crime to time in number format
X coordinate of crime event in state plane format
Y coordinate of crime event in state plane format
https://data.cityofnewyork.us/Public-Safety/NYPD-Complaint-Data-Current-Year-To-Date-/5uac-w243/data