| stp_learner {stppSim} | R Documentation | 
Learning the spatiotemporal properties of a sample data
Description
Learns both the spatial and the temporal properties of a real sample dataset.
Usage
stp_learner(ppt, start_date = NULL, poly = NULL,
n_origin=50, p_ratio, gridSize = 150, s_range =  150,
tolerance = 0.07,
crsys = NULL, show.plot = FALSE)
Arguments
ppt | 
 A 3-column matrix or list containing
  | 
start_date | 
 the start date of the temporal pattern.
The date should be in the format   | 
poly | 
 (An sf or S4 object) a polygon shapefile defining the extent of the landscape  | 
n_origin | 
 number of locations to serve as
origins for walkers. Default:  | 
p_ratio | 
 (an integer) The smaller of the
two terms of a Pareto ratio.
For example, a value of   | 
gridSize | 
 the size of square grid
to use for discretizing the space.
Default is:   | 
s_range | 
 A value (in metres), not less than 150,
specifying the maximum range of spatial
interaction across the space. For example, for 150m,
the intervals of spatial interactions are created as
  | 
tolerance | 
 Pvalue to use for the extraction of
space-time interaction in the sample data. Default
value:   | 
crsys | 
 (string) the EPSG code of the projection
system of the   | 
show.plot | 
 (TRUE or FALSE) Whether to show some displays.  | 
Details
Returns an object of the class real_spo,
storing details of the spatiotemporal
properties of the sample data learnt.
Value
an object (list) containing specific spatial and temporal properties of a sample dataset.
References
Silverman, B.W., 2018. Density estimation for statistics and data analysis. Routledge.
Examples
## Not run: 
#Goal: To learn the ST properties
#of a sample data, for the purpose of
#simulating the full dataset (see `psim_real`).
data(camden_crimes)
#subset 'theft' crime
theft <- camden_crimes[which(camden_crimes$type ==
"Theft"),1:3]
#specify the proportion of full data to use
sample_size <- 0.3
set.seed(1000)
dat_sample <- theft[sample(1:nrow(theft),
round((sample_size * nrow(theft)), digits=0),
replace=FALSE),]
#plot(dat_sample$x, dat_sample$y) #preview
stp_learner(dat_sample,
start_date = NULL, poly = NULL, n_origin=50,
p_ratio=20, gridSize = 150,
s_range =  150, tolerance = 0.07,
crsys = "EPSG:27700",
show.plot = FALSE)
## End(Not run)