Description Usage Arguments Value Note
View source: R/find_stop_locations.R
Returns a spatial data frame containing stop locations in lat/long, min and max time, from a spatial frame with lat/long (must have crs set to 4326, lat/long).
1 2 3 4 5 6 7 | find_stop_locations(
sdf,
columnsToKeep = "",
use_centroid = T,
max_distance_mt = 30,
min_elements_in_cluster = 2
)
|
sdf |
containing lat/long (crs = 4326) |
columnsToKeep |
chr vector containing the columns to keep for other purposes |
use_centroid |
wether to use the centroid or the last point for distance computation |
max_distance_mt |
the maximum distance moved before the algorithm stops clustering |
min_elements_in_cluster |
min close points that contribute to forming a cluster |
Returns a spatial data frame containing the summary for the clusters
Possible extensions: - accuracy that gets lower when entering a building, allowing for clusters made by just one element - previous point computation based on a small movement from the centroid - could use speed information: whenever the speed is higher than walking speed, stop clustering
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.