The INTErventions, Research, and Action in Cities Team (INTERACT) is a national research collaboration of scientists, urban planners, and engaged citizens uncovering how the design of our cities is shaping the health and wellbeing of Canadians (www.teaminteract.ca). INTERACT is conducting longitudinal, mixed-methods natural experiment studies in four Canadian cities, with the aim of providing evidence on the impacts of urban transformations on people’s physical activity, social connectedness, and wellbeing, and inequalities in these outcomes.
The Saskatoon study evaluates the impacts of a Bus Rapid Transit system (BRT) along three major roadways. Participants who rode the bus at least once in a typical month were eligible to participate. Exclusion criteria across all sites were being younger than 18 years old, not being able to read or write English (or English or French in Montreal) well enough to answer an online survey and any intention to move out of the region in the next two years.
Participants were recruited through social media, news media and partner newsletters. In Saskatoon, 110 returning participants, and 155 new participants completed the Health Questionnaire, for a total of 265 responses. Responses were collected from September 17th, 2020 to February 7th, 2021.
var_name <- w2$sask_bus_pass
w2$var_name_f <- recode_factor(var_name, "1" = "Monthly adult pass",
"2" = "Eco Pass",
"3"= "UPass",
"4" = "Student Pass",
"5" = "Discounted Pass",
"6" = "Low Income Pass",
"7" = "I do not use a Go pass, I use a multi-use pass",
"8" ="I do not use a Go pass, I use cash",
"9" = "I do not currently ride the bus")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteSet) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Monthly adult pass | 21 | 7.92 | |
Eco Pass | 13 | 4.91 | |
UPass | 32 | 12.08 | |
Student Pass | 25 | 9.43 | |
Discounted Pass | 6 | 2.26 | |
Low Income Pass | 11 | 4.15 | |
I do not use a Go pass, I use a multi-use pass | 55 | 20.75 | |
I do not use a Go pass, I use cash | 24 | 9.06 | |
I do not currently ride the bus | 78 | 29.43 |
var_name <- w2$bus_safe
w2$var_name_f <- recode_factor(var_name, "1" = "Very Safe",
"2" = "Somewhat Safe",
"3" = "Somewhat Unsafe",
"4" = "Very Unsafe",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very Safe | 86 | 32.45 | |
Somewhat Safe | 135 | 50.94 | |
Somewhat Unsafe | 34 | 12.83 | |
Very Unsafe | 7 | 2.64 | |
I don’t know | 3 | 1.13 |
var_name <- w2$bus_reliable
w2$var_name_f <- recode_factor(var_name, "1" = "Very Reliable",
"2" = "Somewhat Reliable",
"3" = "Somewhat Unreliable",
"4" = "Very Unreliable",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very Reliable | 42 | 15.85 | |
Somewhat Reliable | 134 | 50.57 | |
Somewhat Unreliable | 65 | 24.53 | |
Very Unreliable | 19 | 7.17 | |
I don’t know | 5 | 1.89 |
var_name <- w2$bus_convenient
w2$var_name_f <- recode_factor(var_name, "1" = "Very convenient",
"2" = "Somewhat convenient",
"3" = "Somewhat inconvenient",
"4" = "Very inconvenient",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very convenient | 21 | 7.92 | |
Somewhat convenient | 113 | 42.64 | |
Somewhat inconvenient | 89 | 33.58 | |
Very inconvenient | 38 | 14.34 | |
I don’t know | 4 | 1.51 |
ggplot(w2, aes(x = bus_freq_a
)) + geom_histogram(na.rm = TRUE,bins = 10, fill = "#E5364D") + xlab("Days in Fall") +
theme(axis.text.x = element_text(angle = 30, hjust = 1))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.00 3.00 26.00 31.11 65.00 91.00
ggplot(w2, aes(x = bus_freq_b
)) + geom_histogram(na.rm = TRUE,bins = 10, fill = "#1596FF") + xlab("Days in Winter") +
theme(axis.text.x = element_text(angle = 30, hjust = 1))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.00 3.00 26.00 33.35 65.00 91.00
var_name <- w2$saskroads_a
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 137 | 51.70 | |
No | 119 | 44.91 | |
I don’t know | 9 | 3.40 |
var_name <- w2$saskroads_b
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 78 | 29.43 | |
No | 171 | 64.53 | |
I don’t know | 16 | 6.04 |
var_name <- w2$saskroads_c
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 152 | 57.36 | |
No | 99 | 37.36 | |
I don’t know | 14 | 5.28 |
var_name <- w2$saskroads_d
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 125 | 47.17 | |
No | 127 | 47.92 | |
I don’t know | 13 | 4.91 |
var_name <- w2$saskroads_e
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 40 | 15.09 | |
No | 205 | 77.36 | |
I don’t know | 20 | 7.55 |
var_name <- w2$saskroads_f
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 37 | 13.96 | |
No | 208 | 78.49 | |
I don’t know | 20 | 7.55 |
var_name <- w2$saskroads_g
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 58 | 21.89 | |
No | 193 | 72.83 | |
I don’t know | 14 | 5.28 |
var_name <- w2$saskroads_h
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 90 | 33.96 | |
No | 157 | 59.25 | |
I don’t know | 18 | 6.79 |
var_name <- w2$saskroads_i
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 122 | 46.04 | |
No | 130 | 49.06 | |
I don’t know | 13 | 4.91 |
var_name <- w2$sask_bus_more
w2$var_name_f <- recode_factor(var_name, "1" = "Strongly agree",
"2" = "Somewhat agree",
"3" = "Somewhat disagree",
"4" = "Strongly disagree",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Strongly agree | 79 | 29.81 | |
Somewhat agree | 107 | 40.38 | |
Somewhat disagree | 39 | 14.72 | |
Strongly disagree | 29 | 10.94 | |
I don’t know | 11 | 4.15 |
var_name <- w2$bus_moti_a
w2$var_name_f <- recode_factor(var_name, "1" = "Much more likely",
"2" = "Somewhat more likely",
"3" = "Not at all more likely",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p<- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshorterfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
#### b. the bus route took you closer to your destination?
var_name <- w2$bus_moti_b
w2$var_name_f <- recode_factor(var_name, "1" = "Much more likely",
"2" = "Somewhat more likely",
"3" = "Not at all more likely",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshorterfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Much more likely | 142 | 53.58 | |
Somewhat more likely | 80 | 30.19 | |
Not at all more likely | 36 | 13.58 | |
I don’t know | 7 | 2.64 |
var_name <- w2$bus_moti_c
w2$var_name_f <- recode_factor(var_name, "1" = "Much more likely",
"2" = "Somewhat more likely",
"3" = "Not at all more likely",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshorterfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Much more likely | 108 | 40.75 | |
Somewhat more likely | 89 | 33.58 | |
Not at all more likely | 58 | 21.89 | |
I don’t know | 10 | 3.77 |
var_name <- w2$bus_moti_d
w2$var_name_f <- recode_factor(var_name, "1" = "Much more likely",
"2" = "Somewhat more likely",
"3" = "Not at all more likely",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshorterfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Much more likely | 179 | 67.55 | |
Somewhat more likely | 58 | 21.89 | |
Not at all more likely | 21 | 7.92 | |
I don’t know | 7 | 2.64 |
var_name <- w2$bus_moti_e
w2$var_name_f <- recode_factor(var_name, "1" = "Much more likely",
"2" = "Somewhat more likely",
"3" = "Not at all more likely",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshorterfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Much more likely | 97 | 36.60 | |
Somewhat more likely | 84 | 31.70 | |
Not at all more likely | 73 | 27.55 | |
I don’t know | 11 | 4.15 |
## [1] "more and more frequent buses available on weekends"
## [2] "If there was no COVID"
## [3] "If there wasn't Covid"
## [4] "More professional Drivers"
## [5] "solar powered heated bus shelters would make the difference"
## [6] "If they were lit , would be great if they had a security guard..."
## [7] "Covid has thrown a wrench in my travel plans."
## [8] "It took less time to take the bus than to walk"
## [9] "More direct routes with less transfers"
## [10] "Covid19 Pandemic is over"
## [11] "If COVID-19 and close contact on buses was not a concern."
## [12] "Travelling by bus is not economic for me as I have my own vehicle I use to get around the city."
## [13] "If I lived along a decent transit line"
## [14] "Bus were safe from risk of COVID-19 infection"
## [15] "If grad.students had bus pass in Summer"
## [16] "Covid ends"
## [17] "evening service to my area after 6 PM was more frequent"
## [18] "Different bus routes that have the same start and end points run at staggered intervals"
## [19] "Mandatory masks were enforced"
## [20] "There wasn't the threat of COVID"
## [21] "Running a bit later"
## [22] "The routes were faster and more efficientcien"
## [23] "If it were safer"
## [24] "With a growing city time on transfers need to be increased"
## [25] "If there wasn't a Covid-19 outbreak in our city"
## [26] "Travel times were shorter"
## [27] "the pandemic was over, and I was physically back in my office"
## [28] "Once COVID is done"
## [29] "I would ride the bus more if it didn't have to go to the central bus terminal before going to my destination (Pacific Heights to Exhibition)."
## [30] "Bus system took into account busier times of day. There have been many times when the bus was too full and it was easier to walk the 30-45 minutes than take the chance that the next bus would have space."
## [31] "During COVID if I were confident that everyone would be wearing a mask."
## [32] "If there were more buses going from my area to the university in a timely or express manner"
## [33] "If it didn’t take so long to get across city"
## [34] "Safer"
## [35] "Better route in Brighton area"
## [36] "there are few bus route options in the city"
## [37] "There was better security (there are a lot of creepy people)"
## [38] "Heated central terminals, it's 2020 ffs"
## [39] "transfers were minimal"
## [40] "Bus had free wifi and winter shelters"
## [1] "each stop having heated seats or protection from wind"
## [2] "If I was vaccinated for COVID"
## [3] "If everyone consistently wore masks properly"
## [4] "right now I will not travel more / at all by bus due to Covid concerns"
## [5] "If they were heated and were more of a shelter from the weather"
## [6] "The bus routes included circle drive routes"
## [7] "Operating earlier and later"
## [8] "Route out to the new Costco area"
## [9] "the bus shelters are not adequate for the winter"
## [10] "Bus hubs or large stops were close to amenities"
1 as least important, 7 as most important #### a. the bus on the main part of your route ran every 10 minutes or less?
var_name <- w2$bus_moti_rank_a
w2$var_name_f <- as.factor(var_name)
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalettecont) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 | 85 | 32.08 | |
2 | 35 | 13.21 | |
3 | 28 | 10.57 | |
4 | 29 | 10.94 | |
5 | 16 | 6.04 | |
6 | 26 | 9.81 | |
7 | 46 | 17.36 |
var_name <- w2$bus_moti_rank_b
w2$var_name_f <- as.factor(var_name)
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalettecont) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 | 38 | 14.34 | |
2 | 53 | 20.00 | |
3 | 43 | 16.23 | |
4 | 37 | 13.96 | |
5 | 32 | 12.08 | |
6 | 27 | 10.19 | |
7 | 35 | 13.21 |
var_name <- w2$bus_moti_rank_c
w2$var_name_f <- as.factor(var_name)
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalettecont) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 | 24 | 9.06 | |
2 | 17 | 6.42 | |
3 | 39 | 14.72 | |
4 | 68 | 25.66 | |
5 | 66 | 24.91 | |
6 | 23 | 8.68 | |
7 | 28 | 10.57 |
var_name <- w2$bus_moti_rank_d
w2$var_name_f <- as.factor(var_name)
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalettecont) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 | 54 | 20.38 | |
2 | 54 | 20.38 | |
3 | 41 | 15.47 | |
4 | 29 | 10.94 | |
5 | 20 | 7.55 | |
6 | 23 | 8.68 | |
7 | 44 | 16.60 |
var_name <- w2$bus_moti_rank_e
w2$var_name_f <- as.factor(var_name)
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalettecont) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 | 41 | 15.47 | |
2 | 27 | 10.19 | |
3 | 37 | 13.96 | |
4 | 57 | 21.51 | |
5 | 53 | 20.00 | |
6 | 19 | 7.17 | |
7 | 31 | 11.70 |
var_name <- w2$sask_bus_now_a
w2$var_name_f <- recode_factor(var_name, "1" = "Very",
"2" = "Moderately",
"3" = "Slightly",
"4" = "Not at all",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very | 28 | 10.57 | |
Moderately | 141 | 53.21 | |
Slightly | 60 | 22.64 | |
Not at all | 26 | 9.81 | |
I don’t know | 10 | 3.77 |
var_name <- w2$sask_bus_now_b
w2$var_name_f <- recode_factor(var_name, "1" = "Very",
"2" = "Moderately",
"3" = "Slightly",
"4" = "Not at all",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very | 43 | 16.23 | |
Moderately | 125 | 47.17 | |
Slightly | 69 | 26.04 | |
Not at all | 15 | 5.66 | |
I don’t know | 13 | 4.91 |
var_name <- w2$sask_bus_now_c
w2$var_name_f <- recode_factor(var_name, "1" = "Very",
"2" = "Moderately",
"3" = "Slightly",
"4" = "Not at all",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very | 75 | 28.30 | |
Moderately | 118 | 44.53 | |
Slightly | 47 | 17.74 | |
Not at all | 14 | 5.28 | |
I don’t know | 11 | 4.15 |
var_name <- w2$sask_bus_now_d
w2$var_name_f <- recode_factor(var_name, "1" = "Very",
"2" = "Moderately",
"3" = "Slightly",
"4" = "Not at all",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very | 18 | 6.79 | |
Moderately | 86 | 32.45 | |
Slightly | 102 | 38.49 | |
Not at all | 50 | 18.87 | |
I don’t know | 9 | 3.40 |
var_name <- w2$sask_bus_now_e
w2$var_name_f <- recode_factor(var_name, "1" = "Very",
"2" = "Moderately",
"3" = "Slightly",
"4" = "Not at all",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very | 30 | 11.32 | |
Moderately | 62 | 23.40 | |
Slightly | 88 | 33.21 | |
Not at all | 60 | 22.64 | |
I don’t know | 25 | 9.43 |
var_name <- w2$sask_bus_now_f
w2$var_name_f <- recode_factor(var_name, "1" = "Very",
"2" = "Moderately",
"3" = "Slightly",
"4" = "Not at all",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very | 3 | 1.13 | |
Moderately | 11 | 4.15 | |
Slightly | 21 | 7.92 | |
Not at all | 199 | 75.09 | |
I don’t know | 31 | 11.70 |
var_name <- w2$sask_bus_now_g
w2$var_name_f <- recode_factor(var_name, "1" = "Very",
"2" = "Moderately",
"3" = "Slightly",
"4" = "Not at all",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very | 52 | 19.62 | |
Moderately | 103 | 38.87 | |
Slightly | 72 | 27.17 | |
Not at all | 19 | 7.17 | |
I don’t know | 19 | 7.17 |
var_name <- w2$sask_bus_now_h
w2$var_name_f <- recode_factor(var_name, "1" = "Very",
"2" = "Moderately",
"3" = "Slightly",
"4" = "Not at all",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very | 48 | 18.11 | |
Moderately | 90 | 33.96 | |
Slightly | 77 | 29.06 | |
Not at all | 19 | 7.17 | |
I don’t know | 31 | 11.70 |
var_name <- w2$brt_familiarity
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 180 | 67.92 | |
No | 85 | 32.08 |
var_name <- w2$brt_idea
w2$var_name_f <- recode_factor(var_name, "1" = "Very good idea",
"2" = "Somewhat good idea",
"3" = "Somewhat bad idea",
"4" = "Very bad idea",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very good idea | 135 | 50.94 | |
Somewhat good idea | 108 | 40.75 | |
Somewhat bad idea | 8 | 3.02 | |
Very bad idea | 6 | 2.26 | |
I don’t know | 8 | 3.02 |
var_name <- w2$brt_good_a
w2$var_name_f <- recode_factor(var_name, "1" = "Very good",
"2" = "Somewhat good",
"3" = "Somewhat bad",
"4" = "Very bad",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very good | 84 | 31.70 | |
Somewhat good | 110 | 41.51 | |
Somewhat bad | 25 | 9.43 | |
Very bad | 7 | 2.64 | |
I don’t know | 39 | 14.72 |
var_name <- w2$brt_good_b
w2$var_name_f <- recode_factor(var_name, "1" = "Very good",
"2" = "Somewhat good",
"3" = "Somewhat bad",
"4" = "Very bad",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very good | 163 | 61.51 | |
Somewhat good | 75 | 28.30 | |
Somewhat bad | 7 | 2.64 | |
Very bad | 4 | 1.51 | |
I don’t know | 16 | 6.04 |
var_name <- w2$brt_good_c
w2$var_name_f <- recode_factor(var_name, "1" = "Very good",
"2" = "Somewhat good",
"3" = "Somewhat bad",
"4" = "Very bad",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very good | 104 | 39.25 | |
Somewhat good | 110 | 41.51 | |
Somewhat bad | 10 | 3.77 | |
Very bad | 6 | 2.26 | |
I don’t know | 35 | 13.21 |
var_name <- w2$brt_good_d
w2$var_name_f <- recode_factor(var_name, "1" = "Very good",
"2" = "Somewhat good",
"3" = "Somewhat bad",
"4" = "Very bad",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very good | 87 | 32.83 | |
Somewhat good | 107 | 40.38 | |
Somewhat bad | 12 | 4.53 | |
Very bad | 6 | 2.26 | |
I don’t know | 53 | 20.00 |
var_name <- w2$brt_good_e
w2$var_name_f <- recode_factor(var_name, "1" = "Very good",
"2" = "Somewhat good",
"3" = "Somewhat bad",
"4" = "Very bad",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very good | 113 | 42.64 | |
Somewhat good | 95 | 35.85 | |
Somewhat bad | 21 | 7.92 | |
Very bad | 10 | 3.77 | |
I don’t know | 26 | 9.81 |
var_name <- w2$brt_good_f
w2$var_name_f <- recode_factor(var_name, "1" = "Very good",
"2" = "Somewhat good",
"3" = "Somewhat bad",
"4" = "Very bad",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very good | 70 | 26.42 | |
Somewhat good | 115 | 43.40 | |
Somewhat bad | 12 | 4.53 | |
Very bad | 5 | 1.89 | |
I don’t know | 63 | 23.77 |
var_name <- w2$brt_good_g
w2$var_name_f <- recode_factor(var_name, "1" = "Very good",
"2" = "Somewhat good",
"3" = "Somewhat bad",
"4" = "Very bad",
"77" = "I don't know")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very good | 104 | 39.25 | |
Somewhat good | 99 | 37.36 | |
Somewhat bad | 13 | 4.91 | |
Very bad | 8 | 3.02 | |
I don’t know | 41 | 15.47 |
var_name <- w2$brt_bus_more
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 206 | 77.74 | |
No | 59 | 22.26 |
var_name <- w2$license
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 213 | 80.38 | |
No | 52 | 19.62 |
var_name <- w2$car_access
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 203 | 76.6 | |
No | 62 | 23.4 |
w2$cars_access_where_1[w2$cars_access_where_1==0] <- 2
w2$cars_access_where_1[w2$cars_access_where_1==-7] <- NA
var_name <- w2$cars_access_where_1
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 187 | 70.57 | |
No | 16 | 6.04 | |
NA | 62 | 23.40 |
w2$cars_access_where_2[w2$cars_access_where_2==0] <- 2
w2$cars_access_where_2[w2$cars_access_where_2==-7] <- NA
var_name <- w2$cars_access_where_2
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 13 | 4.91 | |
No | 190 | 71.70 | |
NA | 62 | 23.40 |
w2$cars_household[w2$cars_household==-7] <- NA
var_name <- w2$cars_household
w2$var_name_f <- as.factor(var_name)
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill= "#1596FF") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 | 93 | 35.09 | |
2 | 67 | 25.28 | |
3 | 16 | 6.04 | |
4 | 7 | 2.64 | |
5 | 3 | 1.13 | |
6 | 1 | 0.38 | |
NA | 78 | 29.43 |
var_name <- w2$preferred_mode_a2
w2$var_name_f <- recode_factor(var_name, "1" = "1 A lot", "2" = "2", "3" = "3", "4" = "4 Not at all", "5" = "Not applicable")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 A lot | 127 | 47.92 | |
2 | 79 | 29.81 | |
3 | 32 | 12.08 | |
4 Not at all | 12 | 4.53 | |
Not applicable | 15 | 5.66 |
var_name <- w2$preferred_mode_b
w2$var_name_f <- recode_factor(var_name, "1" = "1 A lot", "2" = "2", "3" = "3", "4" = "4 Not at all", "5" = "Not applicable")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 A lot | 79 | 29.81 | |
2 | 54 | 20.38 | |
3 | 39 | 14.72 | |
4 Not at all | 47 | 17.74 | |
Not applicable | 46 | 17.36 |
var_name <- w2$preferred_mode_c
w2$var_name_f <- recode_factor(var_name, "1" = "1 A lot","2" = "2", "3" = "3", "4" = "4 Not at all", "5" = "Not applicable")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 A lot | 34 | 12.83 | |
2 | 73 | 27.55 | |
3 | 86 | 32.45 | |
4 Not at all | 54 | 20.38 | |
Not applicable | 18 | 6.79 |
var_name <- w2$preferred_mode_d
w2$var_name_f <- recode_factor(var_name, "1" = "1 A lot","2" = "2", "3" = "3", "4" = "4 Not at all", "5" = "Not applicable")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 A lot | 104 | 39.25 | |
2 | 80 | 30.19 | |
3 | 44 | 16.60 | |
4 Not at all | 15 | 5.66 | |
Not applicable | 22 | 8.30 |
var_name <- w2$preferred_mode_e
w2$var_name_f <- recode_factor(var_name, "1" = "1 A lot", "2" = "2", "3" = "3", "4" = "4 Not at all", "5" = "Not applicable")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 A lot | 3 | 1.13 | |
2 | 5 | 1.89 | |
3 | 9 | 3.40 | |
4 Not at all | 51 | 19.25 | |
Not applicable | 197 | 74.34 |
#preferred_mode_a walking
var_name <- w2$preferred_mode_prior_a2
w2$var_name_f <- recode_factor(var_name, "1" = "1 A lot", "2" = "2", "3" = "3", "4" = "4 Not at all", "5" = "Not applicable")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 A lot | 135 | 50.94 | |
2 | 70 | 26.42 | |
3 | 38 | 14.34 | |
4 Not at all | 8 | 3.02 | |
Not applicable | 14 | 5.28 |
#preferred_mode_b biking
var_name <- w2$preferred_mode_prior_b
w2$var_name_f <- recode_factor(var_name, "1" = "1 A lot", "2" = "2", "3" = "3", "4" = "4 Not at all", "5" = "Not applicable")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 A lot | 79 | 29.81 | |
2 | 51 | 19.25 | |
3 | 46 | 17.36 | |
4 Not at all | 42 | 15.85 | |
Not applicable | 47 | 17.74 |
#preferred_mode_c public transit
var_name <- w2$preferred_mode_prior_c
w2$var_name_f <- recode_factor(var_name, "1" = "1 A lot", "2" = "2", "3" = "3", "4" = "4 Not at all", "5" = "Not applicable")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("")
plot(p)
var_name_f | n | pct |
---|---|---|
1 A lot | 61 | 23.02 |
2 | 83 | 31.32 |
3 | 60 | 22.64 |
4 Not at all | 46 | 17.36 |
Not applicable | 15 | 5.66 |
#preferred_mode_d car
var_name <- w2$preferred_mode_prior_d
w2$var_name_f <- recode_factor(var_name, "1" = "1 A lot","2" = "2", "3" = "3", "4" = "4 Not at all", "5" = "Not applicable")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 A lot | 108 | 40.75 | |
2 | 69 | 26.04 | |
3 | 46 | 17.36 | |
4 Not at all | 22 | 8.30 | |
Not applicable | 20 | 7.55 |
#preferred_mode_e motorcycle or scooter
var_name <- w2$preferred_mode_prior_e
w2$var_name_f <- recode_factor(var_name, "1" = "1 A lot","2" = "2", "3" = "3", "4" = "4 Not at all", "5" = "Not applicable")
var_name_f <- w2$var_name_f
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
dplyr::summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x = var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("") +
ggtitle("") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 A lot | 2 | 0.75 | |
2 | 8 | 3.02 | |
3 | 7 | 2.64 | |
4 Not at all | 41 | 15.47 | |
Not applicable | 207 | 78.11 |
#work_vigpa
ggplot(w2, aes(x = w2$work_vigpa)) + geom_histogram(na.rm = TRUE, fill = "#1596FF") + xlab("N days vigorous job-related physical activity") + facet_wrap(~ compare)
kable(data.frame(Days = 0:7, N = as.numeric(table(w2$work_vigpa)), Percentage = round(as.numeric(prop.table(table(w2$work_vigpa)))*100,2))) %>% kable_styling(bootstrap_options = "striped", full_width = T, position = "left")
Days | N | Percentage |
---|---|---|
0 | 177 | 66.79 |
1 | 12 | 4.53 |
2 | 15 | 5.66 |
3 | 20 | 7.55 |
4 | 11 | 4.15 |
5 | 20 | 7.55 |
6 | 6 | 2.26 |
7 | 4 | 1.51 |
#work_vigpa_freq
w2$work_vigpa_freq[w2$work_vigpa_freq==-7] <- NA
ggplot(w2, aes(x = work_vigpa_freq)) + geom_histogram(na.rm = TRUE, binwidth = 20, fill= "#35AAC2") + xlab("Minutes vigorous job-related physical activity") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.0 30.0 60.0 110.9 180.0 480.0 177
#travel_motor
ggplot(w2, aes(x = w2$travel_motor)) + geom_histogram(na.rm = TRUE, fill="#1596FF") + xlab("N days") + facet_wrap(~ compare)
kable(data.frame(Days = 0:7, N = as.numeric(table(w2$travel_motor)), Percentage = round(as.numeric(prop.table(table(w2$travel_motor)))*100,2))) %>% kable_styling(bootstrap_options = "striped", full_width = T, position = "left")
Days | N | Percentage |
---|---|---|
0 | 16 | 6.04 |
1 | 21 | 7.92 |
2 | 26 | 9.81 |
3 | 36 | 13.58 |
4 | 38 | 14.34 |
5 | 37 | 13.96 |
6 | 34 | 12.83 |
7 | 57 | 21.51 |
#travel_motor_freq
w2$travel_motor_freq[w2$travel_motor_freq==-7] <- NA
ggplot(w2, aes(x = w2$travel_motor_freq)) + geom_histogram(na.rm = TRUE, binwidth = 20, fill= "#35AAC2") + xlab("Minutes travel time") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 1.00 30.00 40.00 60.35 60.00 720.00 16
#travel_bike
ggplot(w2, aes(x = w2$travel_bike)) + geom_histogram(na.rm = TRUE, fill="#1596FF") + xlab("N days")+ facet_wrap(~ compare)
kable(data.frame(Days = 0:7, N = as.numeric(table(w2$travel_bike)), Percentage = round(as.numeric(prop.table(table(w2$travel_bike)))*100,2))) %>% kable_styling(bootstrap_options = "striped", full_width = T, position = "left")
Days | N | Percentage |
---|---|---|
0 | 214 | 80.75 |
1 | 15 | 5.66 |
2 | 7 | 2.64 |
3 | 13 | 4.91 |
4 | 4 | 1.51 |
5 | 6 | 2.26 |
6 | 3 | 1.13 |
7 | 3 | 1.13 |
#travel_bike_freq
w2$travel_bike_freq[w2$travel_bike_freq==-7] <- NA
ggplot(w2, aes(x = w2$travel_bike_freq)) + geom_histogram(na.rm = TRUE, binwidth = 20, fill= "#35AAC2") + xlab("Minutes travel time") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.00 13.50 30.00 45.88 60.00 180.00 214
#travel_walk
ggplot(w2, aes(x = w2$travel_walk)) + geom_histogram(na.rm = TRUE, fill="#1596FF") + xlab("# of days in the last 7 days")+ facet_wrap(~ compare)
kable(data.frame(Days = 0:7, N = as.numeric(table(w2$travel_walk)), Percentage = round(as.numeric(prop.table(table(w2$travel_walk)))*100,2))) %>% kable_styling(bootstrap_options = "striped", full_width = T, position = "left")
Days | N | Percentage |
---|---|---|
0 | 58 | 21.89 |
1 | 33 | 12.45 |
2 | 37 | 13.96 |
3 | 36 | 13.58 |
4 | 27 | 10.19 |
5 | 25 | 9.43 |
6 | 15 | 5.66 |
7 | 34 | 12.83 |
#travel_walk_freq
w2$travel_walk_freq[w2$travel_walk_freq==-7] <- NA
ggplot(w2, aes(x = w2$travel_walk_freq)) + geom_histogram(na.rm = TRUE, binwidth = 20, fill= "#35AAC2") + xlab("Minutes travel time") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.00 20.00 30.00 47.31 60.00 900.00 58
#leisure_walk
ggplot(w2, aes(x = w2$leisure_walk)) + geom_histogram(na.rm = TRUE, fill="#1596FF") + xlab("N days")+ facet_wrap(~ compare)
kable(data.frame(Days = 0:7, N = as.numeric(table(w2$leisure_walk)), Percentage = round(as.numeric(prop.table(table(w2$leisure_walk))*100,2)))) %>% kable_styling(bootstrap_options = "striped", full_width = T, position = "left")
Days | N | Percentage |
---|---|---|
0 | 66 | 25 |
1 | 31 | 12 |
2 | 40 | 15 |
3 | 29 | 11 |
4 | 28 | 11 |
5 | 31 | 12 |
6 | 8 | 3 |
7 | 32 | 12 |
#leisure_walk_freq
w2$leisure_walk_freq[w2$leisure_walk_freq==-7] <- NA
ggplot(w2, aes(x = w2$leisure_walk_freq)) + geom_histogram(na.rm = TRUE, binwidth = 20, fill= "#35AAC2") + xlab("Minutes leisure time") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.00 25.00 30.00 46.05 60.00 900.00 66
#leisure_vigpa
ggplot(w2, aes(x = leisure_vigpa)) + geom_histogram(na.rm = TRUE, fill="#1596FF") + xlab("N days")+ facet_wrap(~ compare)
kable(data.frame(Days = 0:7, N = as.numeric(table(w2$leisure_vigpa)), Percentage = round(as.numeric(prop.table(table(w2$leisure_vigpa))*100,2)))) %>% kable_styling(bootstrap_options = "striped", full_width = T, position = "left")
Days | N | Percentage |
---|---|---|
0 | 145 | 55 |
1 | 19 | 7 |
2 | 22 | 8 |
3 | 31 | 12 |
4 | 22 | 8 |
5 | 12 | 5 |
6 | 9 | 3 |
7 | 5 | 2 |
#leisure_vigpa_freq
w2$leisure_vigpa_freq[w2$leisure_vigpa_freq==-7] <- NA
ggplot(w2, aes(x = leisure_vigpa_freq)) + geom_histogram(na.rm = TRUE, binwidth = 20, fill= "#35AAC2") + xlab("Minutes leisure time")
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.00 30.00 45.00 49.81 60.00 120.00 145
#leisure_modpa
ggplot(w2, aes(x = leisure_modpa)) + geom_histogram(na.rm = TRUE, fill="#1596FF") + xlab("N days")+ facet_wrap(~ compare)
kable(data.frame(Days = 0:7, N = as.numeric(table(w2$leisure_modpa)), Percentage = round(as.numeric(prop.table(table(w2$leisure_modpa))*100,2)))) %>% kable_styling(bootstrap_options = "striped", full_width = T, position = "left")
Days | N | Percentage |
---|---|---|
0 | 187 | 71 |
1 | 26 | 10 |
2 | 14 | 5 |
3 | 16 | 6 |
4 | 10 | 4 |
5 | 6 | 2 |
6 | 2 | 1 |
7 | 4 | 2 |
#leisure_modpa_freq
w2$leisure_modpa_freq[w2$leisure_modpa_freq==-7] <- NA
ggplot(w2, aes(x = w2$leisure_modpa_freq)) + geom_histogram(na.rm = TRUE, binwidth = 20, fill= "#35AAC2") + xlab("Minutes leisure time") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 3.00 30.00 30.00 49.32 60.00 180.00 187
#sit_weekday
ggplot(w2, aes(x = w2$sit_weekday/60)) + geom_histogram(na.rm = TRUE, binwidth = 1, fill= "#35AAC2") + xlab("Hours sitting, weekday") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 45.0 240.0 420.0 427.7 600.0 960.0
#sit_weekend
ggplot(w2, aes(x = w2$sit_weekend/60)) + geom_histogram(na.rm = TRUE, binwidth = 1, fill= "#35AAC2") + xlab("Hours sitting, weekend") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 60.0 240.0 360.0 382.1 480.0 960.0
#height
#exclude outliers?
ggplot(w2, aes(x = w2$height)) + geom_histogram(na.rm = TRUE, binwidth = 2, fill="#76D24A") + xlab("Height (cm)") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 147 163 168 169 173 206
#weight
ggplot(w2, aes(x = w2$weight)) + geom_histogram(na.rm = TRUE, binwidth = 2, fill="#76D24A") + xlab("Weight (kg)") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 44.00 63.00 73.00 78.34 91.00 169.00
#sf1
var_name <- w2$sf1
w2$var_name_f <- recode_factor(var_name, "1" = "Excellent", "2" = "Very good", "3" = "Good", "4" = "Fair", "5" = "Poor")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Excellent | 35 | 13.21 | |
Very good | 101 | 38.11 | |
Good | 94 | 35.47 | |
Fair | 29 | 10.94 | |
Poor | 6 | 2.26 |
var_name <- w2$sf2
w2$var_name_f <- recode_factor(var_name, "1" = "Yes, limited a lot", "2" = "Yes, limited a little", "3" = "No, not at all")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes, limited a lot | 9 | 3.40 | |
Yes, limited a little | 31 | 11.70 | |
No, not at all | 225 | 84.91 |
var_name <- w2$sf3
w2$var_name_f <- recode_factor(var_name, "1" = "Yes, limited a lot", "2" = "Yes, limited a little", "3" = "No, not at all")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes, limited a lot | 18 | 6.79 | |
Yes, limited a little | 54 | 20.38 | |
No, not at all | 193 | 72.83 |
#sf4
var_name <- w2$sf4
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 62 | 23.4 | |
No | 203 | 76.6 |
var_name <- w2$sf5
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 57 | 21.51 | |
No | 208 | 78.49 |
var_name <- w2$sf6
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 112 | 42.26 | |
No | 153 | 57.74 |
var_name <- w2$sf7
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 70 | 26.42 | |
No | 195 | 73.58 |
var_name <- w2$sf8
w2$var_name_f <- recode_factor(var_name, "1" = "Not at all", "2" = "Slightly", "3" = "Moderately", "4" = "Quite a bit", "5" = "Extremely")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Not at all | 127 | 47.92 | |
Slightly | 81 | 30.57 | |
Moderately | 35 | 13.21 | |
Quite a bit | 19 | 7.17 | |
Extremely | 3 | 1.13 |
var_name <- w2$sf9
w2$var_name_f <- recode_factor(var_name, "1" = "All of the time", "2" = "Most of the time", "3" = "A good bit of the time", "4" = "Some of the time", "5" = "A little of the time", "6" = "None of the time")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
All of the time | 15 | 5.66 | |
Most of the time | 67 | 25.28 | |
A good bit of the time | 92 | 34.72 | |
Some of the time | 53 | 20.00 | |
A little of the time | 33 | 12.45 | |
None of the time | 5 | 1.89 |
var_name <- w2$sf10
w2$var_name_f <- recode_factor(var_name, "1" = "All of the time", "2" = "Most of the time", "3" = "A good bit of the time", "4" = "Some of the time", "5" = "A little of the time", "6" = "None of the time")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
All of the time | 14 | 5.28 | |
Most of the time | 62 | 23.40 | |
A good bit of the time | 80 | 30.19 | |
Some of the time | 69 | 26.04 | |
A little of the time | 33 | 12.45 | |
None of the time | 7 | 2.64 |
var_name <- w2$sf11
w2$var_name_f <- recode_factor(var_name, "1" = "All of the time", "2" = "Most of the time", "3" = "A good bit of the time", "4" = "Some of the time", "5" = "A little of the time", "6" = "None of the time")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
All of the time | 8 | 3.02 | |
Most of the time | 21 | 7.92 | |
A good bit of the time | 44 | 16.60 | |
Some of the time | 72 | 27.17 | |
A little of the time | 93 | 35.09 | |
None of the time | 27 | 10.19 |
t_1 <- select(w2, compare, pwb_a, pwb_b, pwb_c, pwb_d, pwb_e, pwb_f, pwb_g, pwb_h, pwb_i)
t_1 <- pivot_longer(t_1,
cols = starts_with("pwb_"),
names_to = "perception",
names_prefix = "pwb_",
values_to = "values",
values_drop_na = TRUE)
## rename
t_1$perception[t_1$perception== "a"] <- "a. With your life as a whole?"
t_1$perception[t_1$perception== "b"] <- "b. With your standard of living?"
t_1$perception[t_1$perception== "c"] <- "c. With your health?"
t_1$perception[t_1$perception== "d"] <- "d. With what you are achieving in life?"
t_1$perception[t_1$perception== "e"] <- "e. With your personal relationships?"
t_1$perception[t_1$perception== "f"] <- "f. With how safe you feel?"
t_1$perception[t_1$perception== "g"] <- "g. With feeling part of your community?"
t_1$perception[t_1$perception== "h"] <- "h. With your future security?"
t_1$perception[t_1$perception== "i"] <- "i. With your spirituality or religion?"
## recode
t_1$values <- recode_factor(t_1$values, "10" = "10- Completely satisfied", "9" = "9","8" = "8","7" = "7", "6" = "6", "5" = "5", "4" = "4", "3" = "3", "2" = "2", "1" = "1","0" = "0-Completely dissatisfied")
##### Table
t_1<- t_1 %>%
group_by(compare, perception, values) %>%
dplyr::summarise(n = n()) %>%
dplyr:: mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x= perception, y= pct, fill= values)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat= "identity") +
coord_flip() +
scale_fill_manual(values = INTERACTPalettecont11) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
#gwb_a
var_name <- w2$gwb_a
w2$var_name_f <- recode_factor(var_name, "1" = "1- Not a very happy person", "2" = "2", "3" = "", "4" = "4", "5" = "5", "6" = "6", "7" = "7- A very happy person")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1- Not a very happy person | 5 | 1.89 | |
2 | 6 | 2.26 | |
12 | 4.53 | ||
4 | 25 | 9.43 | |
5 | 86 | 32.45 | |
6 | 80 | 30.19 | |
7- A very happy person | 51 | 19.25 |
#gwb_b
var_name <- w2$gwb_b
w2$var_name_f <- recode_factor(var_name, "1" = "1- Less happy","2" = "2", "3" = "", "4" = "4", "5" = "5", "6" = "6", "7" = "7- More happy")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1- Less happy | 9 | 3.40 | |
2 | 9 | 3.40 | |
21 | 7.92 | ||
4 | 47 | 17.74 | |
5 | 80 | 30.19 | |
6 | 48 | 18.11 | |
7- More happy | 51 | 19.25 |
#gwb_c
var_name <- w2$gwb_c
w2$var_name_f <- recode_factor(var_name, "1" = "1- Not at all", "2" = "2", "3" = "", "4" = "4", "5" = "5", "6" = "6", "7" = "7- A great deal")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1- Not at all | 8 | 3.02 | |
2 | 24 | 9.06 | |
23 | 8.68 | ||
4 | 44 | 16.60 | |
5 | 76 | 28.68 | |
6 | 56 | 21.13 | |
7- A great deal | 34 | 12.83 |
#gwb_d
var_name <- w2$gwb_d
w2$var_name_f <- recode_factor(var_name, "1" = "1- Not at all", "2" = "2", "3" = "", "4" = "4", "5" = "5", "6" = "6", "7" = "7- A great deal")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1- Not at all | 62 | 23.40 | |
2 | 64 | 24.15 | |
39 | 14.72 | ||
4 | 30 | 11.32 | |
5 | 39 | 14.72 | |
6 | 19 | 7.17 | |
7- A great deal | 12 | 4.53 |
t_1 <- select(w2, compare, loneliness_a, loneliness_b, loneliness_c)
t_1 <- pivot_longer(t_1,
cols = starts_with("loneliness_"),
names_to = "perception",
names_prefix = "loneliness_",
values_to = "values",
values_drop_na = TRUE)
## rename
t_1$perception[t_1$perception== "a"] <- "a. How often do you feel that you lack companionship?"
t_1$perception[t_1$perception== "b"] <- "b. How often do you feel left out?"
t_1$perception[t_1$perception== "c"] <- "c. How often do you feel isolated from others?"
## recode
t_1$values <- recode_factor(t_1$values, "1" = "Hardly ever", "2" = "Some of the time", "3" = "Often")
##### Table
t_1<- t_1 %>%
group_by(compare, perception, values) %>%
dplyr::summarise(n = n()) %>%
dplyr:: mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x= perception, y= pct, fill= values)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat= "identity") +
coord_flip() +
scale_fill_manual(values = rev(INTERACTshorterfade3)) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
#neigh_pref_a
var_name <- w2$neigh_pref_a
w2$var_name_f <- recode_factor(var_name, "1" = "Very important", "2" = "Somewhat important", "3" = "Not very important", "4" = "Not important at all", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very important | 129 | 48.68 | |
Somewhat important | 75 | 28.30 | |
Not very important | 28 | 10.57 | |
Not important at all | 24 | 9.06 | |
I don’t know | 9 | 3.40 |
var_name <- w2$neigh_pref_b
w2$var_name_f <- recode_factor(var_name, "1" = "Very important", "2" = "Somewhat important", "3" = "Not very important", "4" = "Not important at all", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very important | 136 | 51.32 | |
Somewhat important | 95 | 35.85 | |
Not very important | 23 | 8.68 | |
Not important at all | 5 | 1.89 | |
I don’t know | 6 | 2.26 |
#neigh_pref_c
var_name <- w2$neigh_pref_c
w2$var_name_f <- recode_factor(var_name, "1" = "Very important", "2" = "Somewhat important", "3" = "Not very important", "4" = "Not important at all", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very important | 114 | 43.02 | |
Somewhat important | 110 | 41.51 | |
Not very important | 30 | 11.32 | |
Not important at all | 5 | 1.89 | |
I don’t know | 6 | 2.26 |
var_name <- w2$neigh_pref_d
w2$var_name_f <- recode_factor(var_name, "1" = "Very important", "2" = "Somewhat important", "3" = "Not very important", "4" = "Not important at all", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very important | 70 | 26.42 | |
Somewhat important | 90 | 33.96 | |
Not very important | 80 | 30.19 | |
Not important at all | 18 | 6.79 | |
I don’t know | 7 | 2.64 |
var_name <- w2$neigh_pref_e
w2$var_name_f <- recode_factor(var_name, "1" = "Very important", "2" = "Somewhat important", "3" = "Not very important", "4" = "Not important at all", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very important | 58 | 21.89 | |
Somewhat important | 116 | 43.77 | |
Not very important | 64 | 24.15 | |
Not important at all | 15 | 5.66 | |
I don’t know | 12 | 4.53 |
#neigh_pref_f
var_name <- w2$neigh_pref_f
w2$var_name_f <- recode_factor(var_name, "1" = "Very important", "2" = "Somewhat important", "3" = "Not very important", "4" = "Not important at all", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very important | 43 | 16.23 | |
Somewhat important | 67 | 25.28 | |
Not very important | 80 | 30.19 | |
Not important at all | 66 | 24.91 | |
I don’t know | 9 | 3.40 |
#neigh_pref_g
var_name <- w2$neigh_pref_g
w2$var_name_f <- recode_factor(var_name, "1" = "Very important", "2" = "Somewhat important", "3" = "Not very important", "4" = "Not important at all", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very important | 139 | 52.45 | |
Somewhat important | 93 | 35.09 | |
Not very important | 21 | 7.92 | |
Not important at all | 7 | 2.64 | |
I don’t know | 5 | 1.89 |
#neigh_pref_h
var_name <- w2$neigh_pref_h
w2$var_name_f <- recode_factor(var_name, "1" = "Very important", "2" = "Somewhat important", "3" = "Not very important", "4" = "Not important at all", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very important | 68 | 25.66 | |
Somewhat important | 84 | 31.70 | |
Not very important | 50 | 18.87 | |
Not important at all | 52 | 19.62 | |
I don’t know | 11 | 4.15 |
#neigh_pref_i
var_name <- w2$neigh_pref_i
w2$var_name_f <- recode_factor(var_name, "1" = "Very important", "2" = "Somewhat important", "3" = "Not very important", "4" = "Not important at all", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very important | 72 | 27.17 | |
Somewhat important | 51 | 19.25 | |
Not very important | 47 | 17.74 | |
Not important at all | 78 | 29.43 | |
I don’t know | 17 | 6.42 |
The following questions are about your activities and how you felt during the most closed phase of the COVID-19 lockdown.
excluded outliers where more than 100 trips a week
#cov_con_trips_pre
w2$cov_con_trips_pre[w2$cov_con_trips_pre>=100] <- NA
ggplot(w2, aes(x= cov_con_trips_pre)) + geom_bar(na.rm = TRUE,fill="#76D24A", binwidth = 1) + xlab("Number of trips per week") + facet_wrap( ~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.00 5.50 10.00 11.76 15.00 60.00 2
excluded outliers where more than 100 trips a week
#cov_con_trips
w2$cov_con_trips[w2$cov_con_trips>=100] <- NA
ggplot(w2, aes(x= cov_con_trips)) + geom_bar(na.rm = TRUE,fill="#76D24A", binwidth = 1) + xlab("Number of trips per week") + facet_wrap( ~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.00 0.00 2.00 3.28 4.00 30.00 1
t_1 <- select(w2, compare, cov_con_triptype_a, cov_con_triptype_b, cov_con_triptype_c, cov_con_triptype_d, cov_con_triptype_e, cov_con_triptype_f)
t_1 <- pivot_longer(t_1,
cols = starts_with("cov_con_triptype_"),
names_to = "perception",
names_prefix = "cov_con_triptype_",
values_to = "values",
values_drop_na = TRUE)
## rename
t_1$perception[t_1$perception== "a"] <- "Work"
t_1$perception[t_1$perception== "b"] <- "School"
t_1$perception[t_1$perception== "c"] <- "Groceries"
t_1$perception[t_1$perception== "d"] <- "Medical trips"
t_1$perception[t_1$perception== "e"] <- "Care-taking"
t_1$perception[t_1$perception== "f"] <- "Social, entertainment, eating out"
t_1$perception[t_1$perception== "g"] <- "Recreation / exercise"
## recode
t_1$values <- recode_factor(t_1$values, "1" = "Yes", "2" = "No")
##### Table
t_1<- t_1 %>%
group_by(compare, perception, values) %>%
dplyr::summarise(n = n()) %>%
dplyr:: mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x= perception, y= pct, fill= values)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat= "identity") +
coord_flip() +
scale_fill_manual(values = INTERACTPaletteYN) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | perception | values | n | pct |
---|---|---|---|---|
Care-taking | Yes | 21 | 7.92 | |
Care-taking | No | 244 | 92.08 | |
Groceries | Yes | 226 | 85.28 | |
Groceries | No | 39 | 14.72 | |
Medical trips | Yes | 89 | 33.58 | |
Medical trips | No | 176 | 66.42 | |
School | Yes | 17 | 6.42 | |
School | No | 248 | 93.58 | |
Social, entertainment, eating out | Yes | 50 | 18.87 | |
Social, entertainment, eating out | No | 215 | 81.13 | |
Work | Yes | 89 | 33.58 | |
Work | No | 176 | 66.42 |
t_1 <- select(w2, compare, cov_con_mode_a, cov_con_mode_b, cov_con_mode_c, cov_con_mode_d)
t_1 <- pivot_longer(t_1,
cols = starts_with("cov_con_mode_"),
names_to = "perception",
names_prefix = "cov_con_mode_",
values_to = "values",
values_drop_na = TRUE)
## rename
t_1$perception[t_1$perception== "a"] <- "Driving"
t_1$perception[t_1$perception== "b"] <- "Cycling"
t_1$perception[t_1$perception== "c"] <- "Walking"
t_1$perception[t_1$perception== "d"] <- "Public Transit"
## recode
t_1$values <- recode_factor(t_1$values, "1" = "Less", "2" = "Same as before COVID-19", "3" = "More")
##### Table
t_1<- t_1 %>%
group_by(compare, perception, values) %>%
dplyr::summarise(n = n()) %>%
dplyr:: mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x= perception, y= pct, fill= values)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat= "identity") +
coord_flip() +
scale_fill_manual(values = rev(INTERACTshorterfade3)) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | perception | values | n | pct |
---|---|---|---|---|
Cycling | Less | 101 | 38.11 | |
Cycling | Same as before COVID-19 | 113 | 42.64 | |
Cycling | More | 51 | 19.25 | |
Driving | Less | 132 | 49.81 | |
Driving | Same as before COVID-19 | 69 | 26.04 | |
Driving | More | 64 | 24.15 | |
Public Transit | Less | 189 | 71.32 | |
Public Transit | Same as before COVID-19 | 71 | 26.79 | |
Public Transit | More | 5 | 1.89 | |
Walking | Less | 61 | 23.02 | |
Walking | Same as before COVID-19 | 92 | 34.72 | |
Walking | More | 112 | 42.26 |
#cov_con_brt_more_a
w2$cov_con_brt_more_a[w2$cov_con_brt_more_a==-7] <- NA
w2$cov_con_brt_more_b[w2$cov_con_brt_more_b==-7] <- NA
w2$cov_con_brt_more_c[w2$cov_con_brt_more_c==-7] <- NA
w2$cov_con_brt_more_d[w2$cov_con_brt_more_d==-7] <- NA
w2$cov_con_brt_more_e[w2$cov_con_brt_more_e==-7] <- NA
var_name <- w2$cov_con_brt_more_a
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill= "76D24A") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Needed a place to spend time") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
2 | 0.75 | |
|
3 | 1.13 | |
NA | 260 | 98.11 |
#cov_con_brt_more_b
var_name <- w2$cov_con_brt_more_b
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill= "76D24A") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Public spaces were closed") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
1 | 0.38 | |
|
4 | 1.51 | |
NA | 260 | 98.11 |
#cov_con_brt_more_c
var_name <- w2$cov_con_brt_more_c
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill= "76D24A") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Free transit meant I could access more places") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
2 | 0.75 | |
2 | 1 | 0.38 | |
3 | 1 | 0.38 | |
|
1 | 0.38 | |
NA | 260 | 98.11 |
#cov_con_brt_more_d
var_name <- w2$cov_con_brt_more_d
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill= "76D24A") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Preferred using transit over another mode of transportation") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
2 | 0.75 | |
2 | 1 | 0.38 | |
|
2 | 0.75 | |
NA | 260 | 98.11 |
#cov_con_brt_more_e
var_name <- w2$cov_con_brt_more_e
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill= "76D24A") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Less risk of COVID transmission compared to other modes") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
1 | 0.38 | |
3 | 1 | 0.38 | |
4 | 1 | 0.38 | |
|
2 | 0.75 | |
NA | 260 | 98.11 |
w2$cov_con_brt_less_a[w2$cov_con_brt_less_a==-7] <- NA
w2$cov_con_brt_less_b[w2$cov_con_brt_less_b==-7] <- NA
w2$cov_con_brt_less_c[w2$cov_con_brt_less_c==-7] <- NA
w2$cov_con_brt_less_d[w2$cov_con_brt_less_d==-7] <- NA
w2$cov_con_brt_less_e[w2$cov_con_brt_less_e==-7] <- NA
w2$cov_con_brt_less_f[w2$cov_con_brt_less_f==-7] <- NA
w2$cov_con_brt_less_f[w2$cov_con_brt_less_g==-7] <- NA
#cov_con_brt_less_a
var_name <- w2$cov_con_brt_less_a
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", " 7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Didn’t feel safe from contracting COVID-19")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
105 | 39.62 | |
2 | 20 | 7.55 | |
3 | 22 | 8.30 | |
4 | 12 | 4.53 | |
5 | 7 | 2.64 | |
6 | 5 | 1.89 | |
|
18 | 6.79 | |
NA | 76 | 28.68 |
#cov_con_brt_less_b
var_name <- w2$cov_con_brt_less_b
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", " 7" = "7. Least important")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Change in schedule made it not feasible")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
33 | 12.45 | |
2 | 21 | 7.92 | |
3 | 16 | 6.04 | |
4 | 23 | 8.68 | |
5 | 11 | 4.15 | |
6 | 24 | 9.06 | |
|
61 | 23.02 | |
NA | 76 | 28.68 |
#cov_con_brt_less_c
var_name <- w2$cov_con_brt_less_c
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", " 7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Change in route made it not feasible")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
18 | 6.79 | |
2 | 11 | 4.15 | |
3 | 16 | 6.04 | |
4 | 25 | 9.43 | |
5 | 15 | 5.66 | |
6 | 26 | 9.81 | |
|
78 | 29.43 | |
NA | 76 | 28.68 |
#cov_con_brt_less_d
var_name <- w2$cov_con_brt_less_d
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", " 7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Used active transportation instead (walking, cycling, etc.)" )+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
37 | 13.96 | |
2 | 35 | 13.21 | |
3 | 21 | 7.92 | |
4 | 23 | 8.68 | |
5 | 12 | 4.53 | |
6 | 15 | 5.66 | |
|
46 | 17.36 | |
NA | 76 | 28.68 |
#cov_con_brt_less_e
var_name <- w2$cov_con_brt_less_e
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", " 7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Used a car instead ")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
73 | 27.55 | |
2 | 26 | 9.81 | |
3 | 25 | 9.43 | |
4 | 14 | 5.28 | |
5 | 10 | 3.77 | |
6 | 4 | 1.51 | |
|
37 | 13.96 | |
NA | 76 | 28.68 |
#cov_con_brt_less_f
var_name <- w2$cov_con_brt_less_f
w2$var_name_f <- recode_factor(var_name,"1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", " 7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("My destinations were out of reach of transit ")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
18 | 6.79 | |
2 | 14 | 5.28 | |
3 | 13 | 4.91 | |
4 | 16 | 6.04 | |
5 | 22 | 8.30 | |
6 | 27 | 10.19 | |
|
79 | 29.81 | |
NA | 76 | 28.68 |
#cov_con_brt_less_g
var_name <- w2$cov_con_brt_less_g
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", " 7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("I did not need transit to access my destinations")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
61 | 23.02 | |
2 | 31 | 11.70 | |
3 | 13 | 4.91 | |
4 | 20 | 7.55 | |
5 | 9 | 3.40 | |
6 | 9 | 3.40 | |
|
46 | 17.36 | |
NA | 76 | 28.68 |
var_name <- w2$cov_con_pa
w2$var_name_f <- recode_factor(var_name, "1" = "Very satisfied",
"2" = "Somewhat satisfied",
"3" = "Neutral",
"4" = "Somewhat dissatisfied",
"5" = "Very dissatisfied")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very satisfied | 32 | 12.08 | |
Somewhat satisfied | 79 | 29.81 | |
Neutral | 37 | 13.96 | |
Somewhat dissatisfied | 75 | 28.30 | |
Very dissatisfied | 42 | 15.85 |
var_name <- w2$cov_con_social
w2$var_name_f <- recode_factor(var_name, "1" = "Very satisfied",
"2" = "Somewhat satisfied",
"3" = "Neutral",
"4" = "Somewhat dissatisfied",
"5" = "Very dissatisfied")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very satisfied | 18 | 6.79 | |
Somewhat satisfied | 57 | 21.51 | |
Neutral | 55 | 20.75 | |
Somewhat dissatisfied | 77 | 29.06 | |
Very dissatisfied | 58 | 21.89 |
var_name <- w2$cov_con_wb
w2$var_name_f <- recode_factor(var_name, "0" = "0. As bad as it could be",
"1" = "1",
"2" = "2",
"3" = "3",
"4" = "4",
"5" = "5",
"6" = "6",
"7" = "7",
"8" = "8",
"9" = "9",
"10" = "10. As good as it could be")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = rev(INTERACTfade)) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
7 | 2.64 | |
1 | 2 | 0.75 | |
2 | 16 | 6.04 | |
3 | 29 | 10.94 | |
4 | 32 | 12.08 | |
5 | 33 | 12.45 | |
6 | 38 | 14.34 | |
7 | 44 | 16.60 | |
8 | 24 | 9.06 | |
9 | 15 | 5.66 | |
|
25 | 9.43 |
var_name <- w2$cov_sati_resp
w2$var_name_f <- recode_factor(var_name, "1" = "Very satisfied",
"2" = "Somewhat satisfied",
"3" = "Neutral",
"4" = "Somewhat dissatisfied",
"5" = "Very dissatisfied")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very satisfied | 51 | 19.25 | |
Somewhat satisfied | 76 | 28.68 | |
Neutral | 105 | 39.62 | |
Somewhat dissatisfied | 27 | 10.19 | |
Very dissatisfied | 6 | 2.26 |
var_name <- w2$cov_mob_rank_a
w2$var_name_f <- recode_factor(var_name, "1" = "Most effective", "2" = "2",
"3" = "3",
"4" = "4", "5" = "Least effective")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Most effective | 134 | 50.57 | |
2 | 65 | 24.53 | |
3 | 44 | 16.60 | |
4 | 15 | 5.66 | |
Least effective | 7 | 2.64 |
var_name <- w2$cov_mob_rank_b
w2$var_name_f <- recode_factor(var_name, "1" = "Most effective", "2" = "2",
"3" = "3",
"4" = "4", "5" = "Least effective")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Most effective | 120 | 45.28 | |
2 | 71 | 26.79 | |
3 | 54 | 20.38 | |
4 | 8 | 3.02 | |
Least effective | 12 | 4.53 |
var_name <- w2$cov_mob_rank_c
w2$var_name_f <- recode_factor(var_name, "1" = "Most effective", "2" = "2",
"3" = "3",
"4" = "4", "5" = "Least effective")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Most effective | 20 | 7.55 | |
2 | 28 | 10.57 | |
3 | 85 | 32.08 | |
4 | 59 | 22.26 | |
Least effective | 73 | 27.55 |
var_name <- w2$cov_mob_rank_d
w2$var_name_f <- recode_factor(var_name, "1" = "Most effective", "2" = "2",
"3" = "3",
"4" = "4", "5" = "Least effective")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Most effective | 91 | 34.34 | |
2 | 62 | 23.40 | |
3 | 69 | 26.04 | |
4 | 29 | 10.94 | |
Least effective | 14 | 5.28 |
var_name <- w2$cov_mob_rank_e
w2$var_name_f <- recode_factor(var_name, "1" = "Most effective","2" = "2",
"3" = "3",
"4" = "4", "5" = "Least effective")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Most effective | 98 | 36.98 | |
2 | 39 | 14.72 | |
3 | 38 | 14.34 | |
4 | 31 | 11.70 | |
Least effective | 59 | 22.26 |
var_name <- w2$cov_safety_a
w2$var_name_f <- recode_factor(var_name, "1" = "Safest", "2" = "2",
"3" = "3",
"4" = "4", "5" = "Least safe")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Safest | 24 | 9.06 | |
2 | 34 | 12.83 | |
3 | 73 | 27.55 | |
4 | 65 | 24.53 | |
Least safe | 69 | 26.04 |
var_name <- w2$cov_safety_b
w2$var_name_f <- recode_factor(var_name, "1" = "Safest", "2" = "2",
"3" = "3",
"4" = "4", "5" = "Least safe")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Safest | 20 | 7.55 | |
2 | 36 | 13.58 | |
3 | 61 | 23.02 | |
4 | 69 | 26.04 | |
Least safe | 79 | 29.81 |
var_name <- w2$cov_safety_c
w2$var_name_f <- recode_factor(var_name, "1" = "Safest", "2" = "2",
"3" = "3",
"4" = "4", "5" = "Least safe")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Safest | 22 | 8.30 | |
2 | 59 | 22.26 | |
3 | 83 | 31.32 | |
4 | 61 | 23.02 | |
Least safe | 40 | 15.09 |
var_name <- w2$cov_safety_d
w2$var_name_f <- recode_factor(var_name, "1" = "Safest", "2" = "2",
"3" = "3",
"4" = "4", "5" = "Least safe")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Safest | 39 | 14.72 | |
2 | 77 | 29.06 | |
3 | 76 | 28.68 | |
4 | 43 | 16.23 | |
Least safe | 30 | 11.32 |
var_name <- w2$cov_safety_e
w2$var_name_f <- recode_factor(var_name, "1" = "Safest", "2" = "2",
"3" = "3",
"4" = "4", "5" = "Least safe")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Safest | 108 | 40.75 | |
2 | 51 | 19.25 | |
3 | 47 | 17.74 | |
4 | 26 | 9.81 | |
Least safe | 33 | 12.45 |
var_name <- w2$cov_reasonuse
w2$var_name_f <- recode_factor(var_name, "1" = "I used the bus for essential trips only", "2" = "I used the bus for mainly essential trips but also some trips for leisure", "3" = "I used the bus for leisure trips only", "4" = "I used the bus for mainly leisure trips but also some trips for essential", "5" = "I did not use the bus during the height of the COVID-19 lockdown")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
I used the bus for essential trips only | 66 | 24.91 | |
I used the bus for mainly essential trips but also some trips for leisure | 16 | 6.04 | |
I used the bus for leisure trips only | 3 | 1.13 | |
I used the bus for mainly leisure trips but also some trips for essential | 3 | 1.13 | |
I did not use the bus during the height of the COVID-19 lockdown | 177 | 66.79 |
The following questions are about your activities and how you feel now in the current context.
#cov_decon_trips
ggplot(w2, aes(x= cov_decon_trips)) + geom_bar(na.rm = TRUE,fill="#76D24A", binwidth = 1) + xlab("Number of trips per week") + facet_wrap( ~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.00 2.00 6.00 7.66 12.00 40.00
t_1 <- select(w2, compare, cov_decon_triptype_a, cov_decon_triptype_b, cov_decon_triptype_c, cov_decon_triptype_d, cov_decon_triptype_e, cov_decon_triptype_f)
t_1 <- pivot_longer(t_1,
cols = starts_with("cov_decon_triptype_"),
names_to = "perception",
names_prefix = "cov_decon_triptype_",
values_to = "values",
values_drop_na = TRUE)
## rename
t_1$perception[t_1$perception== "a"] <- "Work"
t_1$perception[t_1$perception== "b"] <- "School"
t_1$perception[t_1$perception== "c"] <- "Groceries"
t_1$perception[t_1$perception== "d"] <- "Medical trips"
t_1$perception[t_1$perception== "e"] <- "Care-taking"
t_1$perception[t_1$perception== "f"] <- "Social, entertainment, eating out"
t_1$perception[t_1$perception== "g"] <- "Recreation / exercise"
## recode
t_1$values <- recode_factor(t_1$values, "1" = "Yes", "2" = "No")
##### Table
t_1<- t_1 %>%
group_by(compare, perception, values) %>%
dplyr::summarise(n = n()) %>%
dplyr:: mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x= perception, y= pct, fill= values)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat= "identity") +
coord_flip() +
scale_fill_manual(values = INTERACTPaletteYN) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | perception | values | n | pct |
---|---|---|---|---|
Care-taking | Yes | 25 | 9.43 | |
Care-taking | No | 240 | 90.57 | |
Groceries | Yes | 227 | 85.66 | |
Groceries | No | 38 | 14.34 | |
Medical trips | Yes | 146 | 55.09 | |
Medical trips | No | 119 | 44.91 | |
School | Yes | 38 | 14.34 | |
School | No | 227 | 85.66 | |
Social, entertainment, eating out | Yes | 103 | 38.87 | |
Social, entertainment, eating out | No | 162 | 61.13 | |
Work | Yes | 130 | 49.06 | |
Work | No | 135 | 50.94 |
t_1 <- select(w2, compare, cov_decon_mode_a, cov_decon_mode_b, cov_decon_mode_c, cov_decon_mode_d)
t_1 <- pivot_longer(t_1,
cols = starts_with("cov_decon_mode_"),
names_to = "perception",
names_prefix = "cov_decon_mode_",
values_to = "values",
values_drop_na = TRUE)
## rename
t_1$perception[t_1$perception== "a"] <- "Driving"
t_1$perception[t_1$perception== "b"] <- "Cycling"
t_1$perception[t_1$perception== "c"] <- "Walking"
t_1$perception[t_1$perception== "d"] <- "Public Transit"
## recode
t_1$values <- recode_factor(t_1$values, "1" = "Less", "2" = "Same as before COVID-19", "3" = "More")
##### Table
t_1<- t_1 %>%
group_by(compare, perception, values) %>%
dplyr::summarise(n = n()) %>%
dplyr:: mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x= perception, y= pct, fill= values)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat= "identity") +
coord_flip() +
scale_fill_manual(values = rev(INTERACTshorterfade3)) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | perception | values | n | pct |
---|---|---|---|---|
Cycling | Less | 78 | 29.43 | |
Cycling | Same as before COVID-19 | 152 | 57.36 | |
Cycling | More | 35 | 13.21 | |
Driving | Less | 84 | 31.70 | |
Driving | Same as before COVID-19 | 104 | 39.25 | |
Driving | More | 77 | 29.06 | |
Public Transit | Less | 152 | 57.36 | |
Public Transit | Same as before COVID-19 | 90 | 33.96 | |
Public Transit | More | 23 | 8.68 | |
Walking | Less | 52 | 19.62 | |
Walking | Same as before COVID-19 | 116 | 43.77 | |
Walking | More | 97 | 36.60 |
#cov_decon_brt_more
w2$cov_decon_brt_more_a[w2$cov_decon_brt_more_a==-7] <- NA
w2$cov_decon_brt_more_b[w2$cov_decon_brt_more_b==-7] <- NA
w2$cov_decon_brt_more_d[w2$cov_decon_brt_more_d==-7] <- NA
w2$cov_decon_brt_more_e[w2$cov_decon_brt_more_e==-7] <- NA
var_name <- w2$cov_decon_brt_more_a
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2",
"3" = "3", "4" = "4. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill= "76D24A") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Needed a place to spend time") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
2 | 0.75 | |
2 | 2 | 0.75 | |
3 | 3 | 1.13 | |
|
16 | 6.04 | |
NA | 242 | 91.32 |
#cov_decon_brt_more_b
var_name <- w2$cov_decon_brt_more_b
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2",
"3" = "3", "4" = "4. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill= "76D24A") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Public spaces were closed") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
4 | 1.51 | |
2 | 6 | 2.26 | |
3 | 4 | 1.51 | |
|
9 | 3.40 | |
NA | 242 | 91.32 |
#cov_decon_brt_more_d
var_name <- w2$cov_decon_brt_more_d
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2",
"3" = "3", "4" = "4. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill= "76D24A") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Preferred using transit over another mode of transportation") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
15 | 5.66 | |
2 | 1 | 0.38 | |
3 | 3 | 1.13 | |
|
4 | 1.51 | |
NA | 242 | 91.32 |
#cov_decon_brt_more_e
var_name <- w2$cov_decon_brt_more_e
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2",
"3" = "3", "4" = "4. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill= "76D24A") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Less risk of COVID transmission compared to other modes") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
2 | 0.75 | |
2 | 7 | 2.64 | |
3 | 5 | 1.89 | |
|
9 | 3.40 | |
NA | 242 | 91.32 |
w2$cov_decon_brt_less_a[w2$cov_decon_brt_less_a==-7] <- NA
w2$cov_decon_brt_less_b[w2$cov_decon_brt_less_b==-7] <- NA
w2$cov_decon_brt_less_c[w2$cov_decon_brt_less_c==-7] <- NA
w2$cov_decon_brt_less_d[w2$cov_decon_brt_less_d==-7] <- NA
w2$cov_decon_brt_less_e[w2$cov_decon_brt_less_e==-7] <- NA
w2$cov_decon_brt_less_f[w2$cov_decon_brt_less_f==-7] <- NA
w2$cov_decon_brt_less_g[w2$cov_decon_brt_less_g==-7] <- NA
#cov_decon_brt_less_a
var_name <- w2$cov_decon_brt_less_a
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", "7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Didn’t feel safe from contracting COVID-19")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
84 | 31.70 | |
2 | 13 | 4.91 | |
3 | 25 | 9.43 | |
4 | 14 | 5.28 | |
5 | 4 | 1.51 | |
6 | 3 | 1.13 | |
|
9 | 3.40 | |
NA | 113 | 42.64 |
#cov_decon_brt_less_b
var_name <- w2$cov_decon_brt_less_b
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6","7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Change in schedule made it not feasible")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
21 | 7.92 | |
2 | 13 | 4.91 | |
3 | 12 | 4.53 | |
4 | 23 | 8.68 | |
5 | 19 | 7.17 | |
6 | 22 | 8.30 | |
|
42 | 15.85 | |
NA | 113 | 42.64 |
#cov_decon_brt_less_c
var_name <- w2$cov_decon_brt_less_c
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", "7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Change in route made it not feasible")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
8 | 3.02 | |
2 | 13 | 4.91 | |
3 | 13 | 4.91 | |
4 | 26 | 9.81 | |
5 | 17 | 6.42 | |
6 | 25 | 9.43 | |
|
50 | 18.87 | |
NA | 113 | 42.64 |
#cov_decon_brt_less_d
var_name <- w2$cov_decon_brt_less_d
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", "7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Used active transportation instead (walking, cycling, etc.)" )+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
26 | 9.81 | |
2 | 25 | 9.43 | |
3 | 19 | 7.17 | |
4 | 32 | 12.08 | |
5 | 11 | 4.15 | |
6 | 12 | 4.53 | |
|
27 | 10.19 | |
NA | 113 | 42.64 |
#cov_decon_brt_less_e
var_name <- w2$cov_decon_brt_less_e
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", "7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("Used a car instead ")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
61 | 23.02 | |
2 | 28 | 10.57 | |
3 | 23 | 8.68 | |
4 | 9 | 3.40 | |
5 | 8 | 3.02 | |
6 | 2 | 0.75 | |
|
21 | 7.92 | |
NA | 113 | 42.64 |
#cov_decon_brt_less_f
var_name <- w2$cov_decon_brt_less_f
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6", "7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("My destinations were out of reach of transit ")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
11 | 4.15 | |
2 | 4 | 1.51 | |
3 | 15 | 5.66 | |
4 | 28 | 10.57 | |
5 | 18 | 6.79 | |
6 | 23 | 8.68 | |
|
53 | 20.00 | |
NA | 113 | 42.64 |
#cov_decon_brt_less_g
var_name <- w2$cov_decon_brt_less_g
w2$var_name_f <- recode_factor(var_name, "1" = "1. Most important", "2" = "2", "3" = "3", "4" = "4", "5" = "5", "6" = "6","7" = "7. Least important ")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
ggtitle("I did not need transit to access my destinations")+
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
|
55 | 20.75 | |
2 | 18 | 6.79 | |
3 | 13 | 4.91 | |
4 | 18 | 6.79 | |
5 | 10 | 3.77 | |
6 | 9 | 3.40 | |
|
29 | 10.94 | |
NA | 113 | 42.64 |
var_name <- w2$cov_decon_pa
w2$var_name_f <- recode_factor(var_name, "1" = "Very satisfied",
"2" = "Somewhat satisfied",
"3" = "Neutral",
"4" = "Somewhat dissatisfied",
"5" = "Very dissatisfied")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very satisfied | 33 | 12.45 | |
Somewhat satisfied | 91 | 34.34 | |
Neutral | 49 | 18.49 | |
Somewhat dissatisfied | 65 | 24.53 | |
Very dissatisfied | 27 | 10.19 |
var_name <- w2$cov_decon_social
w2$var_name_f <- recode_factor(var_name, "1" = "Very satisfied",
"2" = "Somewhat satisfied",
"3" = "Neutral",
"4" = "Somewhat dissatisfied",
"5" = "Very dissatisfied")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalette3) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very satisfied | 19 | 7.17 | |
Somewhat satisfied | 112 | 42.26 | |
Neutral | 45 | 16.98 | |
Somewhat dissatisfied | 59 | 22.26 | |
Very dissatisfied | 30 | 11.32 |
var_name <- w2$cov_decon_wb
w2$var_name_f <- recode_factor(var_name, "0" = "0. As bad as it could be",
"1" = "1",
"2" = "2",
"3" = "3",
"4" = "4",
"5" = "5",
"6" = "6",
"7" = "7",
"8" = "8",
"9" = "9",
"10" = "10. As good as it could be")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
1 | 1 | 0.38 | |
2 | 6 | 2.26 | |
3 | 18 | 6.79 | |
4 | 21 | 7.92 | |
5 | 35 | 13.21 | |
6 | 31 | 11.70 | |
7 | 64 | 24.15 | |
8 | 43 | 16.23 | |
9 | 26 | 9.81 | |
|
20 | 7.55 |
#gender
var_name <- w2$gender
w2$var_name_f <- recode_factor(var_name, "1"="Man",
"2"="Woman",
"3"="Trans man",
"4"="Trans woman",
"5"="Genderqueer/Gender non-conforming",
"6"="Different identity")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteSet) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Man | 76 | 28.68 | |
Woman | 182 | 68.68 | |
Trans man | 2 | 0.75 | |
Genderqueer/Gender non-conforming | 5 | 1.89 |
*Asked only to new participants
# Sex
var_name <- w2$sex
w2$var_name_f <- recode_factor(var_name, "1"="Male",
"2"="Female",
"3"="Other")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteSet) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Male | 75 | 28.30 | |
Female | 182 | 68.68 | |
Other | 1 | 0.38 | |
NA | 7 | 2.64 |
#marital_status
var_name <- w2$marital_status
w2$var_name_f <- recode_factor(var_name, "1" = "Single", "2" = "Married/commonlaw", "3" = "Separated/divorced", "4" = "Widowed")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteSet) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Single | 120 | 45.28 | |
Married/commonlaw | 130 | 49.06 | |
Separated/divorced | 13 | 4.91 | |
Widowed | 2 | 0.75 |
#children
var_name <- w2$children
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 88 | 33.21 | |
No | 177 | 66.79 |
#living_children
w2$living_children[w2$living_children==-7] <- NA
ggplot(w2, aes(x= living_children)) + geom_bar(na.rm = TRUE,fill="#76D24A", binwidth = 1) + xlab("Number of children") + facet_grid(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 1.000 1.000 2.000 1.932 2.000 4.000 177
Participants could choose multiple answers
#living_arrange
w2$living_arrange_1[w2$living_arrange_1==-7] <- NA
var_name <- w2$living_arrange_1
w2$var_name_f <- recode_factor(var_name, "1" = "Alone", "0" = "With other people")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Alone | 54 | 20.38 | |
With other people | 211 | 79.62 |
# Create a vector with variable names
response = paste0("living_arrange_", 2:7)
# Empty vector to stor output
living_arrange_prop <- c()
# Calculate univariate proportions
for(i in response){
living_arrange_prop[i] <- sum(w2[,i]) / nrow(w2)
}
# Transform
living_arrange_prop <- as.data.frame(living_arrange_prop)
living_arrange_prop$Response <- c("With a spouse (or partner)","With children","With grandchildren","With relatives or siblings?", "With friends", "With other people")
living_arrange_prop$plot<- factor(living_arrange_prop$Response, living_arrange_prop$Response)
ggplot(living_arrange_prop, aes(x = plot, y = living_arrange_prop)) + geom_bar(stat = "identity", fill = "#76D24A") + xlab("") + ylab("Percentage of participants who selected this answer") + theme(axis.text.x = element_text(size=12, angle=0, vjust=.6)) + scale_x_discrete(labels = function(plot) str_wrap(plot, width = 10))
living_arrange_prop$living_arrange_prop <- round(living_arrange_prop$living_arrange_prop*100,2)
colnames(living_arrange_prop) <- c("Response", "Percentage of participants who selected this answer")
living_arrange_prop <- living_arrange_prop[-c(3)]
kable(living_arrange_prop) %>% kable_styling(bootstrap_options = "striped", full_width = T, position = "left")
Response | Percentage of participants who selected this answer | |
---|---|---|
living_arrange_2 | 50.94 | With a spouse (or partner) |
living_arrange_3 | 22.26 | With children |
living_arrange_4 | 0.38 | With grandchildren |
living_arrange_5 | 13.21 | With relatives or siblings? |
living_arrange_6 | 6.79 | With friends |
living_arrange_7 | 6.42 | With other people |
#children_household
p <- ggplot(w2, aes(x = children_household)) +
geom_bar(na.rm = TRUE,fill="#76D24A", binwidth = 1) +
xlab("Number of children under 16 in household") +
facet_wrap(~ compare)
plot(p)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0000 0.0000 0.0000 0.3509 0.0000 4.0000
ggplot(w2, aes(x= adults_household)) + geom_bar(na.rm = TRUE,fill="#76D24A", binwidth = 1) + xlab("Number of adults in household") + facet_wrap(~ compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.000 2.000 2.000 2.155 2.000 11.000
#house_tenure
w2$house_tenure[w2$house_tenure==-7] <- NA
var_name <- w2$house_tenure
w2$var_name_f <- recode_factor(var_name, "1" = "An owner", "2" = "A tenant", "3" = "Resident in a relative or friend's home", "4" = "Resident other than in a relative or friend's home", "5" = "Other", "77" = "I don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteSet) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_grid(~compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
An owner | 118 | 44.53 | |
A tenant | 105 | 39.62 | |
Resident in a relative or friend’s home | 30 | 11.32 | |
Resident other than in a relative or friend’s home | 2 | 0.75 | |
Other | 2 | 0.75 | |
I don’t know | 8 | 3.02 |
#dwelling_type
w2$dwelling_type[w2$dwelling_type==-7] <- NA
var_name <- w2$dwelling_type
w2$var_name_f <- recode_factor(var_name, "1" = "Single detached house", "2" = "Semi-detached house", "3" = "Row house", "4" = "An apartment (or condo) in a duplex or triplex", "5" = "Apartment (or condo) in building with fewer than 5 storeys", "6" = "Apartment (or condo) in building with more than 5 storeys", "7" = "Mobile home/movable dwelling", "8" = "Senior's home", "9" = "Other", "77" = "Don't know")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteSet) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response")+
facet_grid(~compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Single detached house | 126 | 47.55 | |
Semi-detached house | 9 | 3.40 | |
Row house | 18 | 6.79 | |
An apartment (or condo) in a duplex or triplex | 18 | 6.79 | |
Apartment (or condo) in building with fewer than 5 storeys | 60 | 22.64 | |
Apartment (or condo) in building with more than 5 storeys | 14 | 5.28 | |
Mobile home/movable dwelling | 1 | 0.38 | |
Other | 7 | 2.64 | |
Don’t know | 7 | 2.64 | |
NA | 5 | 1.89 |
*Note: Question only asked to new (n=106) and moved participants (n=17) at w2, reporting w1 data for returning participants
#residence
w2$residence[w2$residence==""] <- NA
residence <- as.integer(format(as.Date(w2$residence),"%Y"))
time <- 2021 - residence
ggplot(w2, aes(x = time)) + geom_histogram(na.rm=TRUE, binwidth = 1, fill="#76D24A") + xlab("Years since moving to current residence") + facet_grid(~compare)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.000 2.000 4.000 7.454 9.250 44.000 5
*Note: Question only asked to new participants at w2 (n=155), reporting w1 data for returning participants
#born_can
var_name <- w2$born_can
w2$var_name_f <- recode_factor(var_name, "1" = "Yes", "2" = "No")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteYN) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Yes | 202 | 76.23 | |
No | 56 | 21.13 | |
NA | 7 | 2.64 |
*Note: Question only asked to new participants at w2 or(n=155), reporting w1 data for returning participants Question asked only to new participants not born in Canada (n=38)
#move_can
w2$move_can[w2$move_can==-7] <- NA
ggplot(w2, aes(x = w2$move_can)) + geom_histogram (na.rm=TRUE, binwidth = 1, fill="#76D24A") + xlab("Year of move to Canada")
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 1961 2011 2017 2012 2019 2021 209
var_name <- w2$group
w2$var_name_f <- as.factor(var_name)
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, hjust = 1, vjust = .6)) +
geom_bar(stat="identity", fill = "76d24a") +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Indigenous or Aboriginal | 7 | 2.64 | |
White | 173 | 65.28 | |
South Asian | 18 | 6.79 | |
Chinese | 7 | 2.64 | |
Black | 2 | 0.75 | |
Filipino | 9 | 3.40 | |
Latin American | 4 | 1.51 | |
Arab | 2 | 0.75 | |
Southeast Asian | 4 | 1.51 | |
West Asian | 3 | 1.13 | |
Other | 2 | 0.75 | |
Mixed identity | 6 | 2.26 | |
I don’t know/ prefer not to answer | 5 | 1.89 | |
NA | 23 | 8.68 |
#w2$income[w2$income==-7] <- NA
var_name <- w2$income
w2$var_name_f <- recode_factor(var_name, "1" = "No income", "2" = "$1 to $9,999", "3" = "$10,000 to $14,999", "4" = "$15,000 to $19,999", "5" = "$20,000 to $29,999", "6" = "$30,000 to $39,999", "7" = "$40,000 to $49,999", "8" = "$50,000 to $99,999", "9" = "$100,000 to $149,999", "10" = " $150,000 to $199,999", "11" = "$200,000 or more", "77" = "Don't know/prefer no answer", "-7" = "NA")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, hjust = 1, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = rev(INTERACTfade)) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
No income | 2 | 0.75 | |
$1 to $9,999 | 8 | 3.02 | |
$10,000 to $14,999 | 17 | 6.42 | |
$15,000 to $19,999 | 15 | 5.66 | |
$20,000 to $29,999 | 23 | 8.68 | |
$30,000 to $39,999 | 24 | 9.06 | |
$40,000 to $49,999 | 20 | 7.55 | |
$50,000 to $99,999 | 60 | 22.64 | |
$100,000 to $149,999 | 36 | 13.58 | |
$150,000 to $199,999 | 14 | 5.28 | |
$200,000 or more | 13 | 4.91 | |
Don’t know/prefer no answer | 33 | 12.45 |
#income_needs
var_name <- w2$income_needs
w2$var_name_f <- recode_factor(var_name, "1" = "Very well", "2" = "Well", "3" = "Not so well", "4" = "Not at all", "77" = "Don't know/prefer no answer")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTshortfade) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Very well | 75 | 28.30 | |
Well | 112 | 42.26 | |
Not so well | 55 | 20.75 | |
Not at all | 12 | 4.53 | |
Don’t know/prefer no answer | 11 | 4.15 |
This includes rent payments, mortgage payments, property taxes, condominium fees, and utility payments, like heating, water and electricity. If you live with roommates, please only include your share of the housing costs.
#housing costs
w2$housing_cost[w2$housing_cost==-7] <- NA
# ggplot(w2, aes(x = housing_cost)) + geom_histogram (na.rm =TRUE, binwidth = 1, fill="#76D24A") + xlab ("Monthly housing costs") + facet_wrap(~ compare)
summary(w2$housing_cost)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0 750 1300 1420 2000 4000 83
#education
var_name <- w2$education
w2$var_name_f <- recode_factor(var_name, "1" = "Primary/Elementary school", "2" = "Secondary school", "3" = "Trade/Technical school or college diploma", "4" = "University degree", "5" = "Graduate degree", "77" ="I don't know/Prefer not to answer")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, hjust =1, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteSet) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Primary/Elementary school | 2 | 0.75 | |
Secondary school | 38 | 14.34 | |
Trade/Technical school or college diploma | 39 | 14.72 | |
University degree | 109 | 41.13 | |
Graduate degree | 71 | 26.79 | |
I don’t know/Prefer not to answer | 6 | 2.26 |
#employment
var_name <- w2$employment
w2$var_name_f <- recode_factor(var_name, "1" = "Retired and not working", "2" = "Employed full-time", "3" = "Employed part-time", "4" = "Unemployed and looking for work", "5" = "Unemployed and not looking for work", "6" ="Other" )
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, hjust=1, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPaletteSet) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
Retired and not working | 16 | 6.04 | |
Employed full-time | 125 | 47.17 | |
Employed part-time | 47 | 17.74 | |
Unemployed and looking for work | 26 | 9.81 | |
Unemployed and not looking for work | 17 | 6.42 | |
Other | 34 | 12.83 |
w2$employment_covid_1[w2$employment_covid_1==0] <- 2
w2$employment_covid_2[w2$employment_covid_2==0] <- 2
w2$employment_covid_3[w2$employment_covid_3==0] <- 2
w2$employment_covid_4[w2$employment_covid_4==0] <- 2
w2$employment_covid_5[w2$employment_covid_5==0] <- 2
w2$employment_covid_6[w2$employment_covid_6==0] <- 2
w2$employment_covid_7[w2$employment_covid_7==0] <- 2
w2$employment_covid_8[w2$employment_covid_8==0] <- 2
w2$employment_covid_9[w2$employment_covid_9==0] <- 2
w2$employment_covid_10[w2$employment_covid_10==0] <- 2
w2$employment_covid_99[w2$employment_covid_99==0] <- 2
t_1 <- select(w2, compare, employment_covid_1,employment_covid_2, employment_covid_3, employment_covid_4, employment_covid_5, employment_covid_6, employment_covid_7, employment_covid_8, employment_covid_9, employment_covid_10)
t_1 <- pivot_longer(t_1,
cols = starts_with("employment_covid_"),
names_to = "feature",
names_prefix = "employment_covid_",
values_to = "values",
values_drop_na = TRUE)
t_1$values <- recode_factor(t_1$values, "1" = "Yes", "2" = "No", "77" = "I don't know")
## rename
t_1$feature[t_1$feature== "1"] <- "I work from home."
t_1$feature[t_1$feature== "2"] <- "I work partly from home, partly at my normal workplace"
t_1$feature[t_1$feature== "3"] <- "I continue to work at my normal place of work."
t_1$feature[t_1$feature== "4"] <- "My paid work #hours have been reduced."
t_1$feature[t_1$feature== "5"] <- "My hourly rate has been reduced"
t_1$feature[t_1$feature== "6"] <- "My paid work hours have increased"
t_1$feature[t_1$feature== "7"] <- "My hourly rate has increased."
t_1$feature[t_1$feature== "8"] <- "My job has been deemed essential by the government."
t_1$feature[t_1$feature== "9"] <- "I lost my job"
t_1$feature[t_1$feature== "10"] <-"I have started a new job"
t_1 <- t_1 %>%
group_by(compare, feature, values) %>%
dplyr::summarise(n = n()) %>%
dplyr:: mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(x= feature, y= pct, fill= values)) + theme(axis.text.x = element_text(angle=0, vjust = .6)) +
geom_bar(stat= "identity") +
coord_flip() +
scale_fill_manual(values = INTERACTPaletteYN) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare) +
scale_x_discrete(labels = function(feature) str_wrap(feature, width = 30))
plot(p)
compare | feature | values | n | pct |
---|---|---|---|---|
I continue to work at my normal place of work. | Yes | 75 | 28.30 | |
I continue to work at my normal place of work. | No | 190 | 71.70 | |
I have started a new job | Yes | 14 | 5.28 | |
I have started a new job | No | 251 | 94.72 | |
I lost my job | Yes | 24 | 9.06 | |
I lost my job | No | 241 | 90.94 | |
I work from home. | Yes | 72 | 27.17 | |
I work from home. | No | 193 | 72.83 | |
I work partly from home, partly at my normal workplace | Yes | 33 | 12.45 | |
I work partly from home, partly at my normal workplace | No | 232 | 87.55 | |
My hourly rate has been reduced | Yes | 9 | 3.40 | |
My hourly rate has been reduced | No | 256 | 96.60 | |
My hourly rate has increased. | Yes | 6 | 2.26 | |
My hourly rate has increased. | No | 259 | 97.74 | |
My job has been deemed essential by the government. | Yes | 22 | 8.30 | |
My job has been deemed essential by the government. | No | 243 | 91.70 | |
My paid work #hours have been reduced. | Yes | 16 | 6.04 | |
My paid work #hours have been reduced. | No | 249 | 93.96 | |
My paid work hours have increased | Yes | 8 | 3.02 | |
My paid work hours have increased | No | 257 | 96.98 |
#shift
w2$shift[w2$shift==-7] <- NA
var_name <- w2$shift
w2$var_name_f <- recode_factor(var_name, "1" = "A regular daytime schedule or shift.", "2" = "A regular evening shift ", "3" = "A regular night shift", "4" = "A rotating shift, a split shift, or an irregular schedule", "5" = "On call or casual", "6" ="Other")
var_name_f <- w2$var_name_f
##### Table
t_1 <- w2 %>%
group_by(compare, var_name_f) %>%
summarise(n = n()) %>%
mutate(pct = round(100*n/sum(n),2))
##### Figure
p <- ggplot(t_1, aes(var_name_f, y = pct, fill = var_name_f)) + theme(axis.text.x = element_text(angle=90, hjust=1, vjust = .6)) +
geom_bar(stat="identity") +
scale_fill_manual(values = INTERACTPalettecont) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | var_name_f | n | pct |
---|---|---|---|
A regular daytime schedule or shift. | 126 | 47.55 | |
A regular evening shift | 10 | 3.77 | |
A regular night shift | 1 | 0.38 | |
A rotating shift, a split shift, or an irregular schedule | 22 | 8.30 | |
On call or casual | 9 | 3.40 | |
Other | 4 | 1.51 | |
NA | 93 | 35.09 |
# Categorize age variable
## reviens-y
w2$age_cat <- NA
w2$age_cat[w2$age %in% c(18:24)] <- "18-24"
w2$age_cat[w2$age %in% c(25:34)] <- "25-34"
w2$age_cat[w2$age %in% c(35:44)] <- "35-44"
w2$age_cat[w2$age %in% c(45:54)] <- "45-54"
w2$age_cat[w2$age %in% c(55:64)] <- "55-64"
w2$age_cat[w2$age %in% c(65:74)] <- "65-74"
w2$age_cat[w2$age %in% c(75:100)] <- "75+"
##### Table
t_1 <- w2 %>%
group_by(compare, age_cat) %>%
dplyr::summarise(n = n()) %>%
dplyr:: mutate(pct = round(100*n/sum(n),2))
p <- ggplot(t_1, aes(age_cat, y = pct, fill = age_cat)) + theme(axis.text.x = element_text(angle=90, vjust = .6)) +
geom_bar(stat= "identity") +
scale_fill_manual(values = INTERACTPalettecont) +
guides(fill=FALSE) +
ylab("Percent") +
xlab("Response") +
facet_wrap(~ compare)
plot(p)
compare | age_cat | n | pct |
---|---|---|---|
18-24 | 55 | 20.75 | |
25-34 | 85 | 32.08 | |
35-44 | 57 | 21.51 | |
45-54 | 33 | 12.45 | |
55-64 | 24 | 9.06 | |
65-74 | 10 | 3.77 | |
NA | 1 | 0.38 |