For the following revisions, we use the tidyverse
packages to facilitate data cleaning. This set of packages includes
ggplot2, the primary graphical engine we will be using. We
also use the readxl package to load the Excel file that
contains the data and DT for well-formatted HTML data
tables:
library(tidyverse)
library(readxl)
library(DT)
We load the data:
pbs <- read_excel("PBS+and+Trust+in+America_+National+PBS+Audience+Survey_January+25,+2021_08.08.xlsx")
## New names:
## • `Q41` -> `Q41...19`
## • `Q42` -> `Q42...252`
## • `Q41` -> `Q41...253`
## • `Q42` -> `Q42...254`
The column names are non-intuitive, but labels for these columns are included in row 1. Here are the column names and their labels:
names <- data.frame(`Column Name` = c(colnames(pbs)),
Label = t(pbs[1,]))
datatable(names)
There are 268 columns, so to make the data cleaning easier, we first keep only the following columns:
pbs <- pbs[-1,]
#pbs <- select(pbs, )
Key point: PBS attracts viewers from across the political spectrum (important because government funded and a counter force in a media landscape of Fox and MSNBC that gears to and has viewers of a particular political view, strengthening polarization. PBS has the potential to be a counterforce against such polarization as it reaches folks across the political spectrum (PBS is snot alone in this but its public funding makes it special in this regard as an instrument for policymaking)
pbs <- pbs %>%
mutate(Q12 = fct_relevel(Q12,
"Extremely liberal",
"Moderately liberal",
"Slightly liberal",
"Neither liberal nor conservative",
"Slightly conservative",
"Moderately conservative",
"Extremely conservative"),
Q12 = fct_recode(Q12,
"Extremely\nliberal"="Extremely liberal",
"Moderately\nliberal"="Moderately liberal",
"Slightly\nliberal"="Slightly liberal",
"Neither liberal\nnor conservative"="Neither liberal nor conservative",
"Slightly\nconservative"="Slightly conservative",
"Moderately\nconservative"="Moderately conservative",
"Extremely\nconservative"="Extremely conservative"))
ggplot(pbs, aes(x=Q12)) +
geom_bar(fill="blue") +
geom_text(aes(label = ..count..), stat = "count", vjust = 1.5, colour = "white") +
xlab("When it comes to politics, how would describe yourself?") +
ylab("Frequency") +
theme(text=element_text(family="serif"))
ggsave("figure5_1_1_part1_new.jpg")
## Saving 7 x 5 in image
Key point: PBS attracts viewers from across the political spectrum (important because government funded and a counter force in a media landscape of Fox and MSNBC that gears to and has viewers of a particular political view, strengthening polarization. PBS has the potential to be a counterforce against such polarization as it reaches folks across the political spectrum (PBS is snot alone in this but its public funding makes it special in this regard as an instrument for policymaking)
We’ll skip this one, but maybe for the appendix take a look just at Democrats:
ggplot(filter(pbs, Q11=="Democrat"), aes(x=Q12)) +
geom_bar(fill="blue") +
geom_text(aes(label = ..count..), stat = "count", vjust = 1.5, colour = "white") +
xlab("When it comes to politics, how would describe yourself?") +
ylab("Frequency") +
theme(text=element_text(family="serif"))
Important to see how PBS compares to other main news sources in terms of trust
Just PBS vs Fox News
pbs1 <- data.frame(table(pbs$Q22_1))
pbs1 <- mutate(pbs1, source="Fox News")
pbs2 <- data.frame(table(pbs$Q22_8))
pbs2 <- mutate(pbs2, source="PBS")
pbscompare <- bind_rows(pbs1, pbs2) %>%
filter(Var1 != "5.0") %>%
mutate(Var1 = fct_relevel(Var1, "Not at all", "Not very much", "No opinion", "Fair amount", "A great deal"))
ggplot(pbscompare, aes(x=Var1, y=Freq, fill=source)) +
geom_col(position="dodge") +
geom_text(aes(label = Freq),
position=position_dodge(width=0.9),
vjust=-0.2, size=3) +
xlab("Degree of Trust for Politics and Election News") +
ylab("Frequency") +
theme(text=element_text(family="serif")) +
labs(fill="News Source")
ggsave("figure5_1_2_new.jpg")
## Saving 7 x 5 in image
Again, important to see that across the political spectrum, and especially with more extreme viewers, PBS news is a major source
ggplot(pbs, aes(x=Q12, fill = Q18_8)) +
geom_bar(position = "dodge") +
geom_text(stat="count", aes(label=..count..),
position=position_dodge(width=0.9),
vjust=-0.2, size=3) +
xlab("When it comes to politics, how would describe yourself?") +
ylab("Frequency") +
theme(text=element_text(family="serif")) +
labs(fill="Is PBS a source of news\nand election coverage?")
ggsave("table5_1_1_new.jpg")
## Saving 8 x 4 in image
Important to see how PBS scores in trust compared to other public institutions. One note: although in our theory we state that distrust is not just the opposite of trust, in the likert scalle it was identified as such. Something to think about.
Won’t use it
Here we look at a specific type of programs and see how the trust found in the previous table is distributed according to the political leanings of the respondents.
This is about trust in the institutional characteristics: PBS is considered amongst the best value for public money
pbs25 <- read_excel("PBS+and+Trust+in+America_+National+PBS+Audience+Survey_January+25,+2021_08.08.xlsx") %>%
select(starts_with("Q25"))
## New names:
## • `Q41` -> `Q41...19`
## • `Q42` -> `Q42...252`
## • `Q41` -> `Q41...253`
## • `Q42` -> `Q42...254`
pbs25names <- apply(pbs25[1,], 2, FUN=function(x){trimws(strsplit(as.character(x), "-")[[1]][2])})
pbs25 <- pbs25[-1,]
colnames(pbs25) <- pbs25names
pbs25 <- pivot_longer(pbs25, cols = as.character(pbs25names),
names_to = "institution") %>%
group_by(institution, value) %>%
summarize(frequency = n()) %>%
na.omit() %>%
filter(value != "No opinion") %>%
group_by(institution) %>%
mutate(total = sum(frequency, na.rm=TRUE)) %>%
ungroup() %>%
mutate(percent = round(100*(frequency / total), 2),
value = fct_relevel(as.factor(value), "Very Poor", "Poor", "Fair", "Good", "Excellent"))
## `summarise()` has grouped output by 'institution'. You can override using the
## `.groups` argument.
pbsonly <- filter(pbs25, institution=="PBS")
g <- ggplot(pbs25, aes(x = value, y = percent, group=institution, color=institution)) +
geom_line() +
geom_point() +
geom_line(data = pbsonly, aes(x = value, y = percent), size=3) +
geom_point(data = pbsonly, aes(x = value, y = percent), size=3, color="black") +
xlab("Value for public dollar") +
ylab("Percent of respondents") +
theme(text=element_text(family="serif")) +
labs(color="Institution")
g
ggsave("figure5_1_4_new.jpg")
## Saving 7 x 5 in image
Here we are trying to see what all are aspects of that trust in PBS, to move beyond the typical Pew etc questions that simply ask ‘how much do you trust’. Here it is about the why and these different specific aspects are then translated into one of the three types of trust (institutional, process, characteristic)
pbs32 <- read_excel("PBS+and+Trust+in+America_+National+PBS+Audience+Survey_January+25,+2021_08.08.xlsx") %>%
select(starts_with("Q32"), -Q32_11, -Q32_11_TEXT )
## New names:
## • `Q41` -> `Q41...19`
## • `Q42` -> `Q42...252`
## • `Q41` -> `Q41...253`
## • `Q42` -> `Q42...254`
pbs32names <- apply(pbs32[1,], 2, FUN=function(x){trimws(strsplit(as.character(x), "- | \\(")[[1]][2])})
pbs32 <- pbs32[-1,]
colnames(pbs32) <- pbs32names
pbs32 <- pivot_longer(pbs32, cols = as.character(pbs32names),
names_to = "program") %>%
group_by(program, value) %>%
summarize(frequency = n()) %>%
na.omit() %>%
filter(value != "No opinion") %>%
group_by(program) %>%
mutate(total = sum(frequency, na.rm=TRUE)) %>%
ungroup() %>%
mutate(percent = round(100*(frequency / total), 2),
value = fct_recode(as.factor(value), "Somewhat\ntrust"="Somewhat",
"Trust a lot"="A lot",
"Neither trust\nnor distrust"="Neither trust nor distrust",
"Somewhat\ndistrust"="Somewhat distrust"),
value = fct_relevel(value, "Distrust a lot", "Somewhat\ndistrust",
"Neither trust\nnor distrust", "Somewhat\ntrust", "Trust a lot"))
## `summarise()` has grouped output by 'program'. You can override using the
## `.groups` argument.
g <- ggplot(pbs32, aes(x=value, y=percent, fill=program)) +
geom_col(show.legend=FALSE) +
facet_wrap(~ program, ncol=2) +
xlab("Sense of trust for each aspect of PBS") +
ylab("Percent of respondents") +
theme(text=element_text(family="serif"))
g
ggsave("figure5_1_5_new.jpg")
## Saving 8 x 10 in image
Given the diverse political background of the PBS viewers, it is interesting that such a large part considers PBS a neutral organization (this is not just about news but about all aspects, programs etc of PBS
pbs37 <- select(pbs, Q37) %>%
mutate(`Quality of the news`=grepl('Quality of the news', pbs$Q37))
pbs36 <- pbs %>%
filter(!is.na(Q36)) %>%
mutate(Q36 = fct_relevel(as.factor(Q36), "Totally left","Left leaning","Neutral / All sides","Right leaning","Totally right"))
ggplot(pbs36, aes(x=Q36)) +
geom_bar(fill="blue") +
geom_text(aes(label = ..count..), stat = "count", vjust = 1.5, colour = "white") +
xlab("Perceived bias in PBS as an organization") +
ylab("Frequency") +
theme(text=element_text(family="serif"))
ggsave("figure5_2_1_new.jpg")
## Saving 7 x 5 in image
This is the value for tax money according to political leaning of the viewers - again showing that the trust is across the political spectrum.
cats <- trimws(strsplit(paste(pbs$Q37, collapse=","),",")[[1]])
catdata <- data.frame(category = names(table(cats)),
frequency = as.numeric(table(cats)))
catdata <- filter(catdata, category != "NA", category != "Other:")
catdata <- mutate(catdata, category = fct_recode(category, "Specific programs"="Specific programs:"),
category = fct_reorder(category, frequency))
g <- ggplot(catdata, aes(x=category, y=frequency, fill=category)) +
geom_col(show.legend=FALSE) +
coord_flip() +
geom_text(aes(label = frequency), hjust = 1.5, colour = "white") +
xlab("Elements that contribute to other people's trust in PBS") +
ylab("Frequency") +
theme(text=element_text(family="serif"))
g
ggsave("figure5_2_2_new.jpg")
## Saving 7 x 5 in image
National and local news are at the heart of the (dis)trust in media crisis in the West, so it is interesting to understand what aspects of PBS news contribute to the trust in its news
pbs <- read_excel("PBS+and+Trust+in+America_+National+PBS+Audience+Survey_January+25,+2021_08.08.xlsx")
## New names:
## • `Q41` -> `Q41...19`
## • `Q42` -> `Q42...252`
## • `Q41` -> `Q41...253`
## • `Q42` -> `Q42...254`
pbs33 <- select(pbs, starts_with("Q33"))
pbs33names <- apply(pbs33[1,], 2, FUN=function(x){trimws(strsplit(as.character(x), "- | \\(")[[1]][2])})
colnames(pbs33) <- as.character(pbs33names)
pbs33 <- pbs33[-1,] %>%
pivot_longer(cols = colnames(pbs33), names_to = "mission") %>%
group_by(mission, value) %>%
summarize(frequency = n()) %>%
na.omit() %>%
filter(value != "No opinion") %>%
mutate(value = fct_relevel(value, "Far below average",
"Moderately below average",
"Slightly below average",
"Average",
"Slightly above average",
"Moderately above average",
"Far above average"),
mission = fct_recode(mission, "Informing people about America’s\nethnic and cultural diversity"="Informing people about America’s ethnic and cultural diversity",
"Providing information about\npolitical and social issues"="Providing information about political and social issues",
"Providing programming in\nthe public’s interest"="Providing programming in the public’s interest",
"Promoting a sense of localness\nin your community"="Promoting a sense of localness in your community"))
## `summarise()` has grouped output by 'mission'. You can override using the
## `.groups` argument.
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Providing information about political and social
## issues, Providing programming in the public’s interest, Promoting a sense of
## localness in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing programming in the public’s interest, Promoting a
## sense of localness in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Promoting a sense of localness in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
## Warning: Unknown levels in `f`: Informing people about America’s ethnic and
## cultural diversity, Providing information about political and social issues,
## Providing programming in the public’s interest, Promoting a sense of localness
## in your community
g <- ggplot(pbs33, aes(x = value, y = frequency, fill=mission)) +
geom_col(show.legend=FALSE) +
facet_wrap(~ mission) +
coord_flip() +
xlab("How well does PBS national and local news perform?") +
ylab("Count") +
theme(text=element_text(family="serif")) +
geom_text(aes(label = frequency), hjust = -.25, color = "black") +
ylim(0,700)
g
ggsave("figure5_3_1_1_new.jpg")
## Saving 12 x 12 in image
Interestingly, the news of PBS (often a bone of contention) is considered neutral by even more respondents than PBS in general
pbs39 <- pbs[-1,] %>%
filter(!is.na(Q39)) %>%
mutate(Q39 = fct_relevel(as.factor(Q39), "Totally left","Left leaning","Neutral / All sides","Right leaning","Totally right"))
ggplot(pbs39, aes(x=Q39)) +
geom_bar(fill="blue") +
geom_text(aes(label = ..count..), stat = "count", vjust = 1.5, colour = "white") +
xlab("Perception of bias in PBS News") +
ylab("Frequency") +
theme(text=element_text(family="serif"))
ggsave("figure5_3_1_2_new.jpg")
## Saving 6 x 6 in image
Trust in children’s programs is important for our argument that grown ups trusting PBS (and its news) is often part of having grown up with it. What is more, it is important, again, to see how this holds across the political leanings of viewers - given, e.g., that republicans often go after Sesame Street as being too woke