flowmap: Generate flowmap from movement data

View source: R/flowmap.R

flowmapR Documentation

Generate flowmap from movement data

Description

Use historical movement data to generate flowmap, which records mobility statistics between two locations 'from' and 'to'.

Usage

flowmap(uid, loc, time, gap = 8 * 3600)

Arguments

uid

a vector to record user identities

loc

a 1D vector to record locations of movement history

time

the timestamp (SECONDS) vector of movement history

gap

the maximum dwelling time to consider a valid move between locations.

Value

a data frame with four columns: from, to, total, unique (users)

See Also

gen.sessions, flowmap2, flow.stat, plot_flowmap

Examples

data(movement)

res <- with(movement, flowmap(id, loc, time))
head(res)

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