Brianna Heggeseth
This week in MSCS
Class Masking Policy (Starting Today)
Taking Care of Each Other
This is the last formal day of visualizations before moving on to data wrangling.
What aspects are you getting stuck on?
To practice self-assessment and self-reflection, I would like you to complete a monthly self-reflection about your learning in this class:
Open the template file.
I’ll create individual versions of this document and share them with you. You can add your reflections in your individual document. This will only be shared between you and me.
For each function, tell me what it does and what types of input arguments it takes.
ggplot()
geom_point()
aes()
scale_color_manual()
ggmap()
geom_histogram()
geom_density()
labs()
yvalues <- newbechdel %>%
group_by(yearCat) %>%
count(pass = clean_test %in% c('dubious','ok')) %>%
mutate(prop = n/sum(n)) %>% filter( pass == TRUE) %>% pull(prop)
bars2 <- data.frame(bars = c(sapply(yvalues, function(x) c(NA,x,rep(NA,3)))) ,yearCat = rep(levels(newbechdel$yearCat),each=5), clean_test = rep(levels(newbechdel$clean_test), 9))
ggplot(newbechdel,
aes(
x = yearCat,
fill = clean_test)) +
geom_bar(
position = "fill",
width = .98) +
scale_fill_manual(
values = c("red","salmon","pink","steelblue1","steelblue4"),
guide = 'none') +
labs(
caption = 'SOURCE: BECHDELTEST.COM',
title='Bechdel Test Over Time',
subtitle = 'How women are represented in movies') +
scale_y_continuous(
name = '',
breaks = seq(0,1,by=.25),
labels = scales::percent) +
scale_x_discrete(
name = '',
labels = c("1970-\n'74","","1980-\n'84","","1990-\n'94","","2000-\n'05","","2010-\n'13")) +
geom_errorbar(
data = bars2,
mapping = aes(y=bars,ymin=bars,ymax=bars),
color = "black",
size = 2) +
annotate(
'text',
x = 9.6,
y = rev(c(0.25,.5,.6,.8,.97)),
label = c('Fewer than\n two women',"Women don't\n talk to each\n other", 'Women only\n talk about men','Dubious','Passes\n Bechdel\n Test'),
hjust = 0) +
annotate(
'text',
x = c(5,5),
y = c(.25,.75),
label=c('PASS','FAIL'),
hjust = .5,
size=20) +
coord_cartesian(
xlim=c(1,10),
clip="off") +
theme_classic()
Steps:
Creativity is highly encouraged and increased complexity (that increases the effectiveness of the visual) is expected.
Choose your work: