Description Usage Arguments Value Author(s) See Also Examples
This function takes output from the parse.long.form
function and appends two columns with a binary response,
where a 1 indicates that the date for that trip observation occured on a national holiday or a school break
1 | get.holidays(d, hol, sch)
|
d |
expects output from |
hol |
expects data object |
sch |
expects data object |
dataframe
John Giles
Other data synthesis:
calc.prop.tot.trips()
,
calc.route.type()
,
calc.samp.size()
,
get.crossdist()
,
get.distance.class()
,
get.distance.counts()
,
get.distance.matrix()
,
get.district.names.xy()
,
get.district.pop()
,
get.duration.counts()
,
get.sparse.mob.matrix()
,
get.stay.data()
,
get.subsamp()
,
get.xy.counts()
,
mob.data.array()
,
parse.longform()
1 2 3 4 5 6 7 | # Add indicator for trips that occur during national holidays or school breaks
tmp <- get.holidays(
d=read.csv("BeyondCommuting2/trip_lengths/trip_durations_longform.csv"),
hol=read.csv('BeyondCommuting2/data/national_holidays_clean.csv', stringsAsFactors = FALSE),
sch=read.csv('BeyondCommuting2/data/school_terms_clean.csv', stringsAsFactors = FALSE)
)
head(tmp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.