Description Usage Arguments Value Author(s) See Also Examples
This function reduces data array output from the mob.data.array
function to the population-level by taking the mean trip count all routes and temporal intervals.
1 | mob.data.array.pop.level(x, variable)
|
x |
Array output from the |
variable |
The variable in the data object (expects either |
vector
John Giles
Other model processing:
calc.decay.stats()
,
get.param.vals()
,
mob.data.array.route.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.