Last active
September 26, 2023 16:16
-
-
Save zjuul/14bcbcc259429a52e8f87042d004a34c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
richmondway <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2023/2023-09-26/richmondway.csv') | |
ggplot( | |
richmondway, | |
aes( | |
x = (max(richmondway$Episode) + 1) * Season + Episode, | |
y = F_count_RK | |
) | |
) + | |
geom_bar( | |
stat = "identity", | |
alpha = .2, | |
width = 1, | |
aes( | |
fill = F_count_total, | |
y = max(richmondway$F_count_RK) + 1 | |
) | |
) + | |
geom_point( | |
stat = "identity", | |
shape = 4, | |
aes( | |
size = Imdb_rating, | |
color = Season | |
) | |
) + | |
scale_size_identity() + | |
scale_color_gradient2( | |
guide = "none", | |
low = "black", | |
mid = "darkblue", | |
high = "black", | |
midpoint = mean(richmondway$Season), | |
) + | |
scale_fill_gradient2( | |
low = "blue", | |
mid = "white", | |
high = "red", | |
midpoint = mean(richmondway$F_count_total) | |
) + | |
theme_void( | |
) + | |
labs( | |
fill="Total F**k\ncount" | |
) + | |
theme( | |
legend.position = "right", | |
axis.title.y = element_text( size = 14 ), | |
axis.title.x = element_text( size = 14 ), | |
legend.title = element_text( size = 12 ), | |
legend.title.align = 0.5, | |
legend.text.align = 0.5, | |
plot.margin = margin(1, 3, 1, 1, "cm"), | |
plot.title = element_text( size = 24, hjust = 0.1) | |
) + | |
ylab("Roy Kent F**k count") + | |
xlab("Seasons and Episodes") + | |
ggtitle("Ted Lasso F* Bombs per Episode") |
Author
zjuul
commented
Sep 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment