California Transit Payments
Setting up R Packages
Introduction
This dataset is the result of a research study on payment options for people using public transit in California.
The dataset is available on Dataset Dryad:
Pike, Susan (2022). Transit payment preferences of unbanked passengers. Dataset Dryad. https://doi.org/10.25338/B8R04T
and a brief 2-pager on the research methodology is here.
Read the Data
Inspect and Clean the Data
Data Dictionary
Quantitative Variables
Write in.
Qualitative Variables
Write in.
Observations
Write in.
Analyse the Data
Rows: 204
Columns: 96
$ ID <dbl> 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, …
$ trip.frequency <chr> NA, "Five days a week", "Two days a week",…
$ payment.options <chr> NA, "Other (please write in)", "Other (ple…
$ payment.options_text <chr> NA, "Aggie ID", "Student ID", NA, NA, NA, …
$ prepaid.transit_value <chr> NA, NA, NA, "Credit card at card kiosks or…
$ prepaid.transit_other <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ discount.eligible <chr> NA, "Yes, student discount", "Yes, student…
$ discount.other <chr> NA, NA, NA, NA, NA, NA, NA, NA, "DHA", NA,…
$ discount.senior <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ discount.veteran <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ discount.student <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ discount.other_recieve <chr> NA, NA, NA, NA, NA, NA, NA, NA, "Definitel…
$ Q3.4_4_TEXT <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ discount.ineligible <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ discount.idk <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ financial.checking <chr> NA, "Yes", "Yes", "No", "Yes", "Yes", "No"…
$ financial.savings <chr> NA, "Yes", "Yes", "No", "Yes", "Yes", "No"…
$ financial.prepaid <chr> NA, "Yes", "Yes", "No", "Yes", "No", "No",…
$ financial.credit <chr> NA, "No", "Yes", "Yes", "Yes", "Yes", "No"…
$ financial.checkcashing <chr> NA, "No", "No", "No", "No", "No", "No", "N…
$ financial.loan <chr> NA, "No", "No", "No", "No", "No", "No", "N…
$ financial.peer <chr> NA, "Yes", "No", "No", "Yes", "Yes", "No",…
$ financial.wire <chr> NA, "Yes", "No", "No", "No", "No", "No", "…
$ financial.mobile <chr> NA, "Yes", "No", "No", "Yes", "Yes", "No",…
$ financial.other <chr> NA, "No", NA, "No", "No", "No", NA, NA, NA…
$ financial.other_text <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ bank.interest <chr> NA, NA, NA, "Somewhat interested", NA, NA,…
$ bank.hours <chr> NA, NA, NA, "Yes", NA, NA, "No", "No", NA,…
$ bank.location <chr> NA, NA, NA, NA, NA, NA, "No", "No", NA, NA…
$ bank.fees_high <chr> NA, NA, NA, NA, NA, NA, "Yes", "No", NA, N…
$ bank.fees_unpredictable <chr> NA, NA, NA, NA, NA, NA, "Yes", "No", NA, N…
$ bank.useless <chr> NA, NA, NA, NA, NA, NA, "Yes", "No", NA, N…
$ bank.distrust <chr> NA, NA, NA, NA, NA, NA, "No", "No", NA, NA…
$ bank.minbalance <chr> NA, NA, NA, NA, NA, NA, "Yes", "Yes", NA, …
$ bank.privacy <chr> NA, NA, NA, "No", NA, NA, "Yes", "No", NA,…
$ bank.identification <chr> NA, NA, NA, NA, NA, NA, "No", NA, NA, NA, …
$ bank.other <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ bank.other_text <chr> NA, NA, NA, NA, NA, NA, "Homeless, not inv…
$ prepaid.card_from <chr> NA, "From a family member, friend, or othe…
$ prepaid.card_other <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ preference.credit <chr> NA, "Would not use", "Would like to use", …
$ preference.phone <chr> NA, "Would not use", "Would like to use", …
$ preference.prepaid_debit <chr> NA, "Would not use", "Would like to use", …
$ preference.debit <chr> NA, "Already use", "Would not use", "Would…
$ preference.prepaid_gov <chr> NA, "Would like to use", "Would like to us…
$ challenge.phone <chr> NA, "Monthly fees,Knowing the balance", "N…
$ challenge.phone_other <chr> NA, NA, NA, NA, NA, NA, "Privacy and monop…
$ challenge.prepaid_gov <chr> NA, "Places to get it,Monthly fees,Knowing…
$ challenge.prepaid_gov_other <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ gender <chr> NA, "Female", "Female", NA, "Female", "Fem…
$ income <chr> NA, "Less than $25,000", "$50,000 or more"…
$ benefits <chr> NA, "CalFresh or SNAP,WIC,Medi-Cal", NA, N…
$ benefits.other <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ employment <chr> NA, "Education (K-12)", "Education (K-12)"…
$ employment.other <chr> NA, NA, "Swim Instructor (Private Business…
$ section1 <dbl> 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
$ section3 <dbl> 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
$ section4 <dbl> 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
$ section5 <dbl> 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, …
$ section6 <dbl> 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, …
$ complete <dbl> 0, 5, 4, 4, 3, 5, 4, 4, 3, 5, 4, 4, 4, 5, …
$ payment.other <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, …
$ payment.cash <chr> NA, "No", "No", "No", "Yes", "No", "No", "…
$ payment.prepaid <chr> NA, "No", "No", "Prepaid card from transit…
$ payment.mobile <chr> NA, "No", "No", "No", "No", "Mobile phone"…
$ payment.card <chr> NA, "No", "No", "No", "No", "No", "No", "N…
$ phone.wifi <dbl> 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, …
$ phone.money <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, …
$ phone.identity <dbl> 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, …
$ phone.fees <dbl> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
$ phone.balance <dbl> 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, …
$ prepaid.places <dbl> 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, …
$ prepaid.money <dbl> 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, …
$ prepaid.sharing <dbl> 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, …
$ prepaid.identity <dbl> 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, …
$ prepaid.fees <dbl> 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, …
$ prepaid.balance <dbl> 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, …
$ calfresh <dbl> 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, …
$ wic <dbl> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
$ medical <dbl> 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, …
$ healthyfam <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
$ calworks <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, …
$ housing <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, …
$ female <chr> "No", "Yes", "Yes", "No", "Yes", "Yes", "N…
$ male <chr> "No", "No", "No", "No", "No", "No", "Yes",…
$ other <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
$ inc.less25 <chr> NA, "Yes", "No", NA, "No", "Yes", "Yes", "…
$ inc.25 <chr> NA, "No", "No", NA, "No", "No", "No", "No"…
$ inc.50plus <chr> NA, "No", "Yes", NA, "Yes", "No", "No", "N…
$ financial.count <dbl> 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
$ unbanked <chr> NA, "No", "No", "Yes", "No", "No", "Yes", …
$ checking.only <chr> NA, "No", "No", "No", "No", "No", "No", "N…
$ savings.only <chr> NA, "No", "No", "No", "No", "No", "No", "N…
$ both.accounts <chr> NA, "Yes", "Yes", "No", "Yes", "Yes", "No"…
$ some.banking <chr> NA, "Yes", "Yes", NA, "Yes", "Yes", NA, NA…
$ prefer.none <dbl> NA, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,…
Select and transform the data variables of interest:
Rows: 204
Columns: 5
$ phone.wifi <dbl> 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1…
$ phone.money <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1…
$ phone.identity <dbl> 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1…
$ phone.fees <dbl> 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
$ phone.balance <dbl> 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1…
tibble [204 × 5] (S3: tbl_df/tbl/data.frame)
$ phone.wifi : num [1:204] 1 1 2 1 1 2 1 1 1 2 ...
..- attr(*, "label")= Named chr "Wi_Fi access?"
.. ..- attr(*, "names")= chr "phone.wifi"
..- attr(*, "labels")= Named num [1:2] 1 2
.. ..- attr(*, "names")= chr [1:2] "No" "Yes"
$ phone.money : num [1:204] 1 1 1 1 1 1 1 1 1 2 ...
..- attr(*, "label")= Named chr "Ways to add money?"
.. ..- attr(*, "names")= chr "phone.money"
..- attr(*, "labels")= Named num [1:2] 1 2
.. ..- attr(*, "names")= chr [1:2] "No" "Yes"
$ phone.identity: num [1:204] 1 1 2 2 1 1 2 1 1 2 ...
..- attr(*, "label")= Named chr "Identity Concerns?"
.. ..- attr(*, "names")= chr "phone.identity"
..- attr(*, "labels")= Named num [1:2] 1 2
.. ..- attr(*, "names")= chr [1:2] "No" "Yes"
$ phone.fees : num [1:204] 1 2 1 1 1 1 1 1 1 1 ...
..- attr(*, "label")= Named chr "Monthly Fees?"
.. ..- attr(*, "names")= chr "phone.fees"
..- attr(*, "labels")= Named num [1:2] 1 2
.. ..- attr(*, "names")= chr [1:2] "No" "Yes"
$ phone.balance : num [1:204] 1 2 1 1 1 1 1 2 1 2 ...
..- attr(*, "label")= Named chr "Knowing the balance?"
.. ..- attr(*, "names")= chr "phone.balance"
..- attr(*, "labels")= Named num [1:2] 1 2
.. ..- attr(*, "names")= chr [1:2] "No" "Yes"
Task and Discussion
Complete the Data Dictionary. Select and Transform the variables as shown. Create the graph shown below and discuss the following questions:
- Identify the type of charts
- Identify the variables used for various geometrical aspects (x, y, fill…). Name the variables appropriately.
- What activity might have been carried out to obtain the data graphed here? Provide some details.
- What would be your recommendation to the Transport Company?
- To the Phone Companies?