Skip to content

Instantly share code, notes, and snippets.

@zjuul
Last active September 26, 2023 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zjuul/14bcbcc259429a52e8f87042d004a34c to your computer and use it in GitHub Desktop.
Save zjuul/14bcbcc259429a52e8f87042d004a34c to your computer and use it in GitHub Desktop.
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")
@zjuul
Copy link
Author

zjuul commented Sep 26, 2023

TT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment