Title: | A Companion Package for the Book "Discrete Choice Analysis with 'R'" |
Version: | 0.0.1 |
Description: | Templates and data files to support "Discrete Choice Analysis with R", Páez, A. and Boisjoly, G. (2023) <doi:10.1007/978-3-031-20719-8>. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
URL: | https://github.com/paezha/discrtr |
BugReports: | https://github.com/paezha/discrtr/issues |
Depends: | R (≥ 2.10) |
LazyData: | true |
Suggests: | dfidx, readr |
Imports: | magrittr, rmdformats |
NeedsCompilation: | no |
Packaged: | 2023-02-23 14:23:28 UTC; paezha |
Author: | Antonio Paez |
Maintainer: | Antonio Paez <paezha@mcmaster.ca> |
Repository: | CRAN |
Date/Publication: | 2023-02-24 10:30:05 UTC |
discrtr: A Companion Package for the Book "Discrete Choice Analysis with 'R'"
Description
Templates and data files to support "Discrete Choice Analysis with R", Páez, A. and Boisjoly, G. (2023) doi:10.1007/978-3-031-20719-8.
Author(s)
Maintainer: Antonio Paez paezha@mcmaster.ca (ORCID)
Authors:
Genevieve Boisjoly gboisjoly@polymtl.ca (ORCID)
See Also
Useful links:
Pipe operator
Description
See magrittr::%>%
for details.
Usage
lhs %>% rhs
Arguments
lhs |
A value or the magrittr placeholder. |
rhs |
A function call using the magrittr semantics. |
Value
The result of calling rhs(lhs)
.
discrtr template.
Description
Template for creating a computational notebook for use with Discrete Choice Analysis with R
Usage
discrtr_template()
Format
An R Markdown file
McMaster Attitudes Data Set.
Description
A data set containing information about students commuting to McMaster University. Data were collected by means of a travel survey in the fall of 2010. Respondents were asked about their mode of travel to McMaster University, in Hamilton, Canada. They were also asked to respond to a series of attitudinal statements. The data set contains relevant attributes about the respondents. The format of the table is wide, with each row representing an individual respondent. These variables were augmented with information from the 2011 Census of Canada and land use information from local sources.
Usage
data(mc_attitudes)
Format
A data frame with 1230 rows and 39 variables:
- id
Unique identifier for respondents
- choice
Mode of transportation chosen: Car, HSR (local transit), Walk
- LAT
Latitude of the place or residence, geocoded at the nearest major intersection or centroid of 6-digit postal area
- LONG
Longitude of the place or residence, geocoded at the nearest major intersection or centroid of 6-digit postal area
- license
Indicator variable for holding a driver license: Yes/No
- vehicle
Indicator variable for having individual access to a private car (i.e., car not shared with other household members): Yes/No
- gender
Woman/Man
- age
Age in years
- visa
Visa status of student: Domestic
- living_arrangements
Living arrangements DURING THE SCHOOL YEAR are: 1:Living with my family or relatives/By myself off-campus/Shared off-campus accommodations
- level
Level of studies: Undergraduate Year I (UG I)/Undergraduate Year II (UG I)/Undergraduate Year III (UG III)/Undergraduate Year IV (UG IV)/Undergraduate Year V (UG V)/Masters/PhD/Other (Diploma or Certificate)
- Active_Neighborhood
Response to statement "I like to live in a neighborhood where there's a lot going on": Five point likert scale from Strongly Disagree to Strongly Agree, including a neutral point
- Community
Response to statement "There is a sense of community in my neighborhood": Five point likert scale from Strongly Disagree to Strongly Agree, including a neutral point
- Neighbors
Response to statement "I know my neighbors well": Five point likert scale from Strongly Disagree to Strongly Agree, including a neutral point
- Safe_Walk
Response to statement "I feel safe and secure when walking in my neighborhood": Five point likert scale from Strongly Disagree to Strongly Agree, including a neutral point
- Shops_Important
Response to statement "Having shops and services within walking distance of my home is important to me": Five point likert scale from Strongly Disagree to Strongly Agree, including a neutral point
- Travel_Alone
Response to statement "I like traveling alone": Five point likert scale from Strongly Disagree to Strongly Agree, including a neutral point
- DAUID
Unique ID of Dissemination Area of the Census
- Rate_Couple_Child
Proportion of families that are couples with children out of all families in Dissemination Area
- Rate_SW_Child
Proportion of families that are single parent (woman) with children out of all families in Dissemination Area
- Rate_SM_Child
Proportion of families that are single parent (man) with children out of all families in Dissemination Area
- Mean_Children
Average number of children at home per census family in Dissemination Area
- Rate_Non_Canadian
Proportion of non-Canadian residents to total population in Dissemination Area
- Median_HH_Income
Median family income in Dissemination Area in $10,000
- Mean_HH_Income
Mean family income in Dissemination Area in $10,000
- Rate_Unemployment
Unemployment rate in Dissemination Area
- Rate_1yr_Move
Proportion of residents that moved to Dissemination Area in the year previous to the census
- Rate_5yr_Move
Proportion of residents that moved to Dissemination Area in the 5 years previous to the census
- Rate_Public
Proportion of residents in Dissemination Area that used public transportation to commute to work
- Rate_Walk
Proportion of residents in Dissemination Area that walked to work
- Rate_Cycle
Proportion of residents in Dissemination Area that cycled to work
- AREA
Area of Dissemination Area in square kilometers
- LUM
Entropy-based land use mix index in Dissemination Area: lower values mean more homogenous land uses, higher values greater mix of uses
- SIDEWALK_DENSITY
Sidewalk density in Dissemination Area in km/sq.km
- STREET_DENSITY
Street density in Dissemination Area in km/sq.km
- INTERSECTION_DENSITY
Intersection density in Dissemination Area in 1/sq.km
- SF_P_RATIO
Ratio of building footprint to parcel area in Dissemination Area: a measure of density of development
- EMPLOYMENT_DENSITY
Employment density in Dissemination Area in jobs/sq.km
- POPULATION_DENSITY
Population density in Dissemination Area in people/sq.km
Source
P\'aez, A. (2013). Mapping travelers’ attitudes: does space matter?. Journal of Transport Geography, 26, 117-125. (https://doi.org/10.1016/j.jtrangeo.2012.09.002)
Examples
data(mc_attitudes)
summary(mc_attitudes$Community)
McMaster Commuting Data Set (csv file).
Description
A delimited text file containing information about students commuting to McMaster University. Data were collected by means of a travel survey in the fall of 2010. Respondents were asked about their mode of travel to McMaster University, in Hamilton, Canada. They were also asked about the modes available to them. The characteristics of the trips were self-reported or imputed. The data set also contains relevant attributes about the respondents. The format of the table is long, with each row representing a choice situation.
Usage
data(mc_commute_long)
Format
An comma separated text file :
- RespondentID
Unique identifier for respondents
- choice
numeric variable indicating modes of transportation: (1) Cycle, (2) Walk, (3) HSR (local transit), (4) Car
- avcycle
Indicator variable for availability of cycling: (1) Yes, (0) No
- avwalk
Indicator variable for availability of walking: (1) Yes, (0) No
- avhsr
Indicator variable for availability of HSR: (1) Yes, (0) No
- avcar
Indicator variable for availability of car: (1) Yes, (0) No
- timecycle
Travel time by cycling in minutes (when mode not available coded as 100000)
- timewalk
Travel time by walking in minutes (when mode not available coded as 100000)
- accesshsr
Access time to HSR in minutes
- waitingtimehsr
Waiting time when travelling by HSR in minutes
- transfer
Number of transit transfers
- timecar
Travel time by car in minutes (when mode not available coded as 100000)
- parking
Indicator variable for holding a university parking permit: (1) Yes, (0) No
- vehind
Indicator variable for having individual access to a private car (i.e., car not shared with other household members): (1) Yes, (0) No
- owncycle
Indicator variable for owning a bicycle: (1) Yes, (0) No
- gender
Indicator variable for gender: (1) Woman, (0) Man
- age
Age in years
- solo
Indicator variable for living in solo accommodations: (1) Yes, (0) No
- shared
Indicator variable for a student living in a rental property with other students, i.e., shared accommodations: (1) Yes, (0) No
- family
Indicator variable for living in family home: (1) Yes, (0) No
- child
Indicator variable for presence of dependent minors in household: (1) Yes, (0) No
- primary_caregiver
Indicator variable for being the primary caregiver of dependent minors in household: (1) Yes, (0) No, (100000) No dependent minors in household
- LAT
Latitude of the place or residence, geocoded at the nearest major intersection or centroid of 6-digit postal area
- LONG
Longitude of the place or residence, geocoded at the nearest major intersection or centroid of 6-digit postal area
- DAUID
Unique ID of the dissemination area of place of residence according to the 2006 census of Canada
- mhi
Median household income of the dissemination area of place of residence according to the 2006 census of Canada
- dwell_den
Dwelling density in the dissemination area of the place of residence in $1/km^2$
- lum
Entropy of the land use mix
- st_den
Street density in the dissemination area of the place of residence in $km/km^2$
- inter_den
Intersection density in the dissemination area of the place of residence in $1/km^2$
- SF_P_ratio
Ratio of surface of plots to built area
- side_density
Sidewalk density in the dissemination area of the place of residence in $km/km^2$
- Shelters_SD
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Strongly Disagree, 0 otherwise
- Shelters_D
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Disagree, 0 otherwise
- Shelters_A
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Agree, 0 otherwise
- Shelters_SA
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Strongly Agree, 0 otherwise
Source
Whalen, K. E., P\'aez, A., & Carrasco, J. A. (2013). Mode choice of university students commuting to school and the role of active travel. Journal of Transport Geography, 31, 132-142. (https://doi.org/10.1016/j.jtrangeo.2013.06.008)
Examples
library(readr)
mc_commute <- read_csv(system.file("extdata", "mc_commute.csv", package = "discrtr"))
McMaster Commuting Data Set (long format).
Description
A data set containing information about students commuting to McMaster University. Data were collected by means of a travel survey in the fall of 2010. Respondents were asked about their mode of travel to McMaster University, in Hamilton, Canada. They were also asked about the modes available to them. The characteristics of the trips were self-reported or imputed. The data set also contains relevant attributes about the respondents. The format of the table is long, with each row representing a choice situation.
Usage
data(mc_commute_long)
Format
An indexed data frame of class dfidx with 5500 rows and 62 variables:
- id
Unique identifier for respondents
- choice
Mode of transportation chosen: Cycle, Walk, HSR (local transit), Car
- parking
Indicator variable for holding a university parking permit: Yes/No
- vehind
Indicator variable for having individual access to a private car (i.e., car not shared with other household members): Yes/No
- gender
Woman/Man
- age
Age in years
- shared
Indicator variable for Indicator variable for a student living in a rental property with other students, i.e., living in shared accommodations
- family
Indicator variable for living in family home
- child
Indicator variable for presence of dependent minors in household: Yes/No
- street_density
Street density in the dissemination area of the place of residence in $km/km^2$
- sidewalk_density
Sidewalk density in the dissemination area of the place of residence in $km/km^2$
- LAT
Latitude of the place or residence, geocoded at the nearest major intersection or centroid of 6-digit postal area
- LONG
Longitude of the place or residence, geocoded at the nearest major intersection or centroid of 6-digit postal area
- PersonalVehComf_SD
Response to statement "The personal vehicles I usually travel in are comfortable": 1 if Strongly Disagree, 0 otherwise
- PersonalVehComf_D
Response to statement "The personal vehicles I usually travel in are comfortable": 1 if Disagree, 0 otherwise
- PersonalVehComf_A
Response to statement "The personal vehicles I usually travel in are comfortable": 1 if Agree, 0 otherwise
- PersonalVehComf_SA
Response to statement "The personal vehicles I usually travel in are comfortable": 1 if Strongly Agree, 0 otherwise
- Fun_SD
Response to statement "Getting there is half the fun": 1 if Strongly Disagree, 0 otherwise
- Fun_D
Response to statement "Getting there is half the fun": 1 if Disagree, 0 otherwise
- Fun_A
Response to statement "Getting there is half the fun": 1 if Agree, 0 otherwise
- Fun_SA
Response to statement "Getting there is half the fun": 1 if Strongly Agree, 0 otherwise
- ActiveNeigh_SD
Response to statement "I like to live in a neighborhood where there's a lot going on": 1 if Strongly Disagree, 0 otherwise
- ActiveNeigh_D
Response to statement "I like to live in a neighborhood where there's a lot going on": 1 if Disagree, 0 otherwise
- ActiveNeigh_A
Response to statement "I like to live in a neighborhood where there's a lot going on": 1 if Agree, 0 otherwise
- ActiveNeigh_SA
Response to statement "I like to live in a neighborhood where there's a lot going on": 1 if Strongly Agree, 0 otherwise
- UsefulTrans_SD
Response to statement "My commute trip is a useful transition between home and school": 1 if Strongly Disagree, 0 otherwise
- UsefulTrans_D
Response to statement "My commute trip is a useful transition between home and school": 1 if Disagree, 0 otherwise
- UsefulTrans_A
Response to statement "My commute trip is a useful transition between home and school": 1 if Agree, 0 otherwise
- UsefulTrans_SA
Response to statement "My commute trip is a useful transition between home and school": 1 if Strongly Agree, 0 otherwise
- BusComf_SD
Response to statement "The buses I usually travel in are comfortable": 1 if Strongly Disagree, 0 otherwise
- BusComf_D
Response to statement "The buses I usually travel in are comfortable": 1 if Disagree, 0 otherwise
- BusComf_A
Response to statement "The buses I usually travel in are comfortable": 1 if Agree, 0 otherwise
- BusComf_SA
Response to statement "The buses I usually travel in are comfortable": 1 if Strongly Agree, 0 otherwise
- TravelAlone_SD
Response to statement "I like traveling alone": 1 if Strongly Disagree, 0 otherwise
- TravelAlone_D
Response to statement "I like traveling alone": 1 if Disagree, 0 otherwise
- TravelAlone_A
Response to statement "I like traveling alone": 1 if Agree, 0 otherwise
- TravelAlone_SA
Response to statement "I like traveling alone": 1 if Strongly Agree, 0 otherwise
- Shelters_SD
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Strongly Disagree, 0 otherwise
- Shelters_D
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Disagree, 0 otherwise
- Shelters_A
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Agree, 0 otherwise
- Shelters_SA
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Strongly Agree, 0 otherwise
- Community_SD
Response to statement "There is a sense of community in my neighborhood": 1 if Strongly Disagree, 0 otherwise
- Community_D
Response to statement "There is a sense of community in my neighborhood": 1 if Disagree, 0 otherwise
- Community_A
Response to statement "There is a sense of community in my neighborhood": 1 if Agree, 0 otherwise
- Community_SA
Response to statement "There is a sense of community in my neighborhood": 1 if Agree, 0 otherwise
- personal_veh_comfortable
Response to statement "The personal vehicles I usually travel in are comfortable" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- getting_there_fun
Response to statement "Getting there is half the fun" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- like_active_neighborhood
Response to statement "I like to live in a neighborhood where there's a lot going on" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- commute_useful_transition
Response to statement "My commute trip is a useful transition between home and school" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- buses_comfortable
Response to statement "The buses I usually travel in are comfortable" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- prefer_travel_alone
Response to statement "I like traveling alone" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- shelter_good_quality
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- sense_community
Response to statement "There is a sense of community in my neighborhood" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree1 if Strongly Disagree, 0 otherwise
- numna
Total number of available alternatives, e.g., if bus and walk = 2, if all four = 4
- alt
A factor with the alternatives in the choice set
- available
An indicator variable for availability of the alternative
- time.Cycle
Travel time by alternative
- access
Access time to transit in minutes (i.e., reaching a transit stop)
- wait
Waiting time transit (i.e., at a transit stop)
- transfer
Number of transit transfers
- idx
Index for the table: includes chid (identifier for the choice) and alt (the alternative)
Source
Whalen, K. E., P\'aez, A., & Carrasco, J. A. (2013). Mode choice of university students commuting to school and the role of active travel. Journal of Transport Geography, 31, 132-142. (https://doi.org/10.1016/j.jtrangeo.2013.06.008)
Examples
data(mc_commute_long)
library(dfidx)
print(mc_commute_long, n = 12)
McMaster Commuting Data set (wide format).
Description
A data set containing information about students commuting to McMaster University. Data were collected by means of a travel survey in the fall of 2010. Respondents were asked about their mode of travel to McMaster University, in Hamilton, Canada. They were also asked about the modes available to them. The characteristics of the trips were self-reported or imputed. The data set also contains relevant attributes about the respondents. The format of the table is wide, with each individual decision maker in a row.
Usage
data(mc_commute_wide)
Format
A data frame with 1375 rows and 74 variables:
- id
Unique identifier for respondents
- choice
Mode of transportation chosen: Cycle, Walk, HSR (local transit), Car
- available.Cycle
An indicator variable for availability of cycling: Yes/No
- available.Walk
An indicator variable for availability of walking: Yes/No
- available.HSR
An indicator variable for availability of buses: Yes/No
- available.Car
An indicator variable for availability of car: Yes/No
- time.Cycle
Travel time by bicycle to campus in minutes
- time.Walk
Travel time by walking to campus in minutes
- time.HSR
Travel time by bus to campus in minutes
- time.Car
Travel time by car to campus in minutes
- access.Cycle
Access time to mode in minutes (i.e., reaching a transit stop)
- access.Walk
Access time to mode in minutes (i.e., reaching a transit stop)
- access.HSR
Access time to mode in minutes (i.e., reaching a transit stop)
- access.Car
Access time to mode in minutes (i.e., reaching a transit stop)
- wait.Cycle
Waiting time (i.e., at a transit stop)
- wait.Walk
Waiting time (i.e., at a transit stop)
- wait.HSR
Waiting time (i.e., at a transit stop)
- wait.Car
Waiting time (i.e., at a transit stop)
- transfer.Walk
Number of transfers when travelling by transit
- transfer.Cycle
Number of transfers when travelling by transit
- transfer.HSR
Number of transfers when travelling by transit
- transfer.Car
Number of transfers when travelling by transit
- parking
Indicator variable for holding a university parking permit: Yes/No
- vehind
Indicator variable for having individual access to a private car (i.e., car not shared with other household members): Yes/No
- gender
Woman/Man
- age
Age in years
- shared
Indicator variable for a student living in a rental property with other students, i.e., living in shared accommodations
- family
Indicator variable for living in family home
- child
Indicator variable for presence of dependent minors in household: Yes/No
- street_density
Street density in the dissemination area of the place of residence in $km/km^2$
- sidewalk_density
Sidewalk density in the dissemination area of the place of residence in $km/km^2$
- LAT
Latitude of the place or residence, geocoded at the nearest major intersection or centroid of 6-digit postal area
- LONG
Longitude of the place or residence, geocoded at the nearest major intersection or centroid of 6-digit postal area
- PersonalVehComf_SD
Response to statement "The personal vehicles I usually travel in are comfortable": 1 if Strongly Disagree, 0 otherwise
- PersonalVehComf_D
Response to statement "The personal vehicles I usually travel in are comfortable": 1 if Disagree, 0 otherwise
- PersonalVehComf_A
Response to statement "The personal vehicles I usually travel in are comfortable": 1 if Agree, 0 otherwise
- PersonalVehComf_SA
Response to statement "The personal vehicles I usually travel in are comfortable": 1 if Strongly Agree, 0 otherwise
- Fun_SD
Response to statement "Getting there is half the fun": 1 if Strongly Disagree, 0 otherwise
- Fun_D
Response to statement "Getting there is half the fun": 1 if Disagree, 0 otherwise
- Fun_A
Response to statement "Getting there is half the fun": 1 if Agree, 0 otherwise
- Fun_SA
Response to statement "Getting there is half the fun": 1 if Strongly Agree, 0 otherwise
- ActiveNeigh_SD
Response to statement "I like to live in a neighborhood where there's a lot going on": 1 if Strongly Disagree, 0 otherwise
- ActiveNeigh_D
Response to statement "I like to live in a neighborhood where there's a lot going on": 1 if Disagree, 0 otherwise
- ActiveNeigh_A
Response to statement "I like to live in a neighborhood where there's a lot going on": 1 if Agree, 0 otherwise
- ActiveNeigh_SA
Response to statement "I like to live in a neighborhood where there's a lot going on": 1 if Strongly Agree, 0 otherwise
- UsefulTrans_SD
Response to statement "My commute trip is a useful transition between home and school": 1 if Strongly Disagree, 0 otherwise
- UsefulTrans_D
Response to statement "My commute trip is a useful transition between home and school": 1 if Disagree, 0 otherwise
- UsefulTrans_A
Response to statement "My commute trip is a useful transition between home and school": 1 if Agree, 0 otherwise
- UsefulTrans_SA
Response to statement "My commute trip is a useful transition between home and school": 1 if Strongly Agree, 0 otherwise
- BusComf_SD
Response to statement "The buses I usually travel in are comfortable": 1 if Strongly Disagree, 0 otherwise
- BusComf_D
Response to statement "The buses I usually travel in are comfortable": 1 if Disagree, 0 otherwise
- BusComf_A
Response to statement "The buses I usually travel in are comfortable": 1 if Agree, 0 otherwise
- BusComf_SA
Response to statement "The buses I usually travel in are comfortable": 1 if Strongly Agree, 0 otherwise
- TravelAlone_SD
Response to statement "I like traveling alone": 1 if Strongly Disagree, 0 otherwise
- TravelAlone_D
Response to statement "I like traveling alone": 1 if Disagree, 0 otherwise
- TravelAlone_A
Response to statement "I like traveling alone": 1 if Agree, 0 otherwise
- TravelAlone_SA
Response to statement "I like traveling alone": 1 if Strongly Agree, 0 otherwise
- Shelters_SD
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Strongly Disagree, 0 otherwise
- Shelters_D
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Disagree, 0 otherwise
- Shelters_A
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Agree, 0 otherwise
- Shelters_SA
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality": 1 if Strongly Agree, 0 otherwise
- Community_SD
Response to statement "There is a sense of community in my neighborhood": 1 if Strongly Disagree, 0 otherwise
- Community_D
Response to statement "There is a sense of community in my neighborhood": 1 if Disagree, 0 otherwise
- Community_A
Response to statement "There is a sense of community in my neighborhood": 1 if Agree, 0 otherwise
- Community_SA
Response to statement "There is a sense of community in my neighborhood": 1 if Agree, 0 otherwise
- personal_veh_comfortable
Response to statement "The personal vehicles I usually travel in are comfortable" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- getting_there_fun
Response to statement "Getting there is half the fun" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- like_active_neighborhood
Response to statement "I like to live in a neighborhood where there's a lot going on" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- commute_useful_transition
Response to statement "My commute trip is a useful transition between home and school" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- buses_comfortable
Response to statement "The buses I usually travel in are comfortable" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- prefer_travel_alone
Response to statement "I like traveling alone" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- shelter_good_quality
Response to statement "Shelters and other public transportation facilities that I commonly use are of good quality" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree
- sense_community
Response to statement "There is a sense of community in my neighborhood" as factor: SD-Strongly Disagree, D-Disagree, N-Neutral, A-Agree, SA-Strongly Agree1 if Strongly Disagree, 0 otherwise
- numna
Total number of available alternatives, e.g., if bus and walk = 2, if all four = 4
Source
Whalen, K. E., P\'aez, A., & Carrasco, J. A. (2013). Mode choice of university students commuting to school and the role of active travel. Journal of Transport Geography, 31, 132-142. (https://doi.org/10.1016/j.jtrangeo.2013.06.008)
Examples
data(mc_commute_wide)
summary(mc_commute_wide$choice)
McMaster Modality Data Set.
Description
A dataset containing information about students, staff, and faculty commuting to McMaster University. Data were collected by means of a travel survey in the fall of 2010. Respondents were asked about their mode of travel to McMaster University, in Hamilton, Canada. They were also asked about the modes available to them. The data set also contains relevant attributes about the respondents. The format of the table is wide, with each row representing an individual respondent. These variables were augmented with information from the 2011 Census of Canada and land use information from local sources.
Usage
data(mc_modality)
Format
A data frame with 4,146 rows and 37 variables:
- id
Unique identifier for respondents
- choice
Mode of transportation chosen: Active Travel (Cycle/Walk), HSR (local transit), Car, GO (regional transit)
- LAT
Latitude of the place or residence, geocoded at the nearest major intersection or centroid of 6-digit postal area
- LONG
Longitude of the place or residence, geocoded at the nearest major intersection or centroid of 6-digit postal area
- shared_vehicle
Indicator variable for having individual access to a private car (i.e., car shared with other household members): Yes/No
- bicycle
Indicator variable for owning a bicycle: Yes/No
- gender
Woman/Man
- age
Age in years
- status
Indicator variable for status at McMaster: Staff or Faculty/Student
- care_giver
Indicator variable for being primary care giver for any minors in the household: Yes/No
- modality
Indicator variable for number of available modes: One Mode/Two Modes/Three Modes/Four Modes
- Boring
Response to statement "Traveling is boring" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Buses_Comfortable
Response to statement "The buses I usually travel in are comfortable" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Clean_Fuel
Response to statement "To improve the environment, I am willing to pay a little more to use a hybrid, electric or other clean fuel vehicle" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Limit_Driving
Response to statement "I limit my auto travel to help improve congestion and the environment" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Productive_Time
Response to statement "I use my commute time productively" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Safe_Cycle
Response to statement "I feel safe and secure to cycle around town" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Shops_Services
Response to statement "Having shops and services within walking distance of my home is important to me" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Someone_Else
Response to statement "Usually, I'd rather have someone else do the driving" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Stuck_Traffic
Response to statement "Getting stuck in traffic doesn't bother me too much" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Transition
Response to statement "My commute trip is a useful transition between home and school" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Travel_Alone
Response to statement "I like traveling alone" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Travel_Tiring
Response to statement "Traveling is generally tiring for me" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Wasted_Time
Response to statement "Traveling is generally tiring for me" as factor: Strongly Disagree, Disagree, Neutral, Agree, Strongly Agree
- Rate_Immigrant
Proportion of inmigrants to total population in Dissemination Area
- Rate_Non_Canadian
Proportion of non-Canadian residents to total population in Dissemination Area
- Rate_Labor
Proportion of residents in Dissemination Area who are in the labor force
- Rate_Unemployment
Unemployment rate in Dissemination Area
- Rate_Married
Proportion of families headed by a married couple to total population in Dissemination Area
- Mean_Age
Mean age of residents in Dissemination Area in years
- Mean_Children
Mean number of children per family in Dissemination Area
- Median_HH_Income
Median family income in Dissemination Area in $10,000
- LITA
Transit access index – combination of capacity, frequency, and coverage of service (Wiley et al., 2011)
- LUM
Entropy-based land use mix index in Dissemination Area: lower values mean more homogenous land uses, higher values greater mix of uses
- MAC_DISTANCE
Network distance from place of residence to McMaster University in km
- POPULATION_DENSITY
Population density in Dissemination Area in people/sq.km
- SF_P_RATIO
Ratio of building footprint to parcel area in Dissemination Area: a measure of density of development
Source
Lavery, T., P\'aez, A., & Kanaroglou, P.S. (2013). Driving out of choices: An investigation of transport modality in a university sample. Transportation Research Part A: Policy and Practice, 57:37-46 (https://doi.org/10.1016/j.tra.2013.09.010)
Examples
data(mc_modality)
summary(mc_modality)
Hamilton City boundaries and urban types
Description
Classification of regions by type: urban, suburban, and rural. This is based on the rural boundaries of the city, and the planning regions.
Usage
data(urban_types)
Format
An object of class sf
(inherits from tbl_df
, tbl
, data.frame
) with 3 rows and 2 columns.
Details
#' @format A simple features data frame with 2 rows and 2 variables:
- Type
Classification of the region: "Urban", "Suburban", "Rural"
- geometry
Geometry of polygons