dq.point: Spatiotemporal data quality of stay points

View source: R/data_quality.R

dq.pointR Documentation

Spatiotemporal data quality of stay points

Description

This function gives the local quality metric of spatiotemporal data points. The metric contains two parts of quality information, ie STATIC and DYNAMIC. The STATIC part comes from the spatial and temporal coverage of each point, which quantifies the uncertainty of user whereabouts caused by the intrinsic limitation of measurement method (eg location coverage). The DYNAMIC part gives the quality from dynamic information like speed, which uses the Iovan's algorithm as addressed in dq.iovan.

Usage

dq.point(stcoords, pc, po, dq.min = 1e-05, na = dq.min)

Arguments

stcoords

the spatiotemporal coordinates, see stcoords

pc

the point coverage, see point.coverage

po

the occurrence of people, see people.occurrence

dq.min

the lower bound of data quality. Values less than this bound will be set by force to this quality (default 1e-5)

na

the replacement of NA (default dq.min)

Value

the original sessions with extra fields: c('dq.s', 'dq.d', 'dq'). 'dq.s' and 'dq.d' give the STATIC and DYNAMIC quality measures respectively, while 'dq' is the Harmonic mean of previous two.

See Also

dq.point2

Examples

u1 <- movement %>% dplyr::filter(id==1)
pc <- point.coverage(movement$lon, movement$lat)
po <- people.occurrence(movement$id, movement$lon, movement$lat)

stc <- stcoords(u1[,c('lon','lat','time')])
head(dq.point(stc, pc, po))

sessions <- gen.sessions(stc$x, stc$y, stc$t)
head(dq.point2(sessions, pc, po))

caesar0301/movr documentation built on June 18, 2022, 2:37 a.m.