Description Usage Arguments Value Author(s) See Also Examples
This function reduces data array output from the mob.data.array
function to a route-level matrix that contains the mean trip count. The mean trip count
will represent the mean taken across whatever temporal interval was used in the mob.data.array
function.
1 | mob.data.array.route.level(x, variable)
|
x |
An array produced by the |
variable |
The variable in the array (expects either |
A 2-dimensional array when variable = 'distance'
or 'movement'
, and a 3-dimensional array when variable = 'duration'
. Cells give the mean trip count taken across the temporal interval of the input array.
John Giles
Other model processing:
calc.decay.stats()
,
get.param.vals()
,
mob.data.array.pop.level()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # Month-level movement matrix
m <- mob.data.array(orig=df$from,
dest=df$to,
time=df$month,
count=df$count,
name='movement')
str(m)
# Mean-monthly movement for each route
m2 <- mob.data.array.pop.level(m, 'movement')
# Route-level distance matrix
m <- mob.data.array(orig=df$from,
dest=df$to,
count=df$count,
variable=df$distance,
agg.int=10, # count trips per 10km intervals
name='distance')
# Mean trip counts at each 10km distance interval for each origin
m2 <- mob.data.array.route.level(m, 'distance')
# Month-level aggregated duration matrix
m <- mob.data.array(orig=df$from,
dest=df$to,
time=df$month,
count=df$count,
variable=df$duration,
agg.int=3, # aggregated to a generation time of 3 days
name='duration')
str(m)
# Mean monthly trip duration count for each route
m2 <- mob.data.array.route.level(m, 'duration')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.