Description Usage Arguments Value Author(s) See Also Examples
This function takes output from the parse.long.form
function and appends columns containing distance between origin and destination districts.
This function also adds two columns indicating the commuting classification of the travel:
rcl_same_adm1
= whether trip was within same admin unit
cl_contig
= whether trip was within same, to adjacent, or to non-adjacent admin unit
1 | get.distance.class(a, b)
|
a |
expects output from |
b |
expects data object |
dataframe
John Giles
Other data synthesis:
calc.prop.tot.trips()
,
calc.route.type()
,
calc.samp.size()
,
get.crossdist()
,
get.distance.counts()
,
get.distance.matrix()
,
get.district.names.xy()
,
get.district.pop()
,
get.duration.counts()
,
get.holidays()
,
get.sparse.mob.matrix()
,
get.stay.data()
,
get.subsamp()
,
get.xy.counts()
,
mob.data.array()
,
parse.longform()
1 2 3 4 5 6 | # Add district population sizes and route classifications
tmp <- get.distance.class(
a=read.csv("BeyondCommuting2/trip_lengths/trip_durations_longform.csv"),
b=read.csv("BeyondCommuting2/data/route_classification.csv")
)
head(tmp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.