Rows: 51246 Columns: 6
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): TierID, TierName
dbl (3): CollarID, E, N
dttm (1): DatetimeUTC
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
library(sf)
Linking to GEOS 3.13.0, GDAL 3.8.5, PROJ 9.5.1; sf_use_s2() is TRUE
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
#only get the data from sabi between 1 and 3 July 2015sabi <-filter(wildschwein_sf, TierName =="Sabi", DatetimeUTC >"2015-07-01", DatetimeUTC <"2015-07-03")#visualize the resultlibrary(ggplot2)ggplot(sabi) +geom_sf() +geom_path(aes(E,N))
Step a) Specify temporal window w
v is 60 minuts, our samling interval is 15 minutes pos[n-2] to pos[n] pos[n-1] to pos[n] pos[n] to pos[n+1] pos[n] to pos[n+2]
# first, specify a threshold for a simple approach, we'll use the mean value as a threshold to differentiate between stops and movethreshold <-mean(sabi$stepMean, na.rm =TRUE)sabi <- sabi |>mutate(static = stepMean <mean(stepMean, na.rm =TRUE))ggplot(sabi)+geom_path(aes(E,N))+geom_sf(aes(color = static))