Skip to content

Instantly share code, notes, and snippets.

@adisarid
Created March 19, 2020 13:46
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 adisarid/28f430829c4ff537b9fbe2d54bf31d2c to your computer and use it in GitHub Desktop.
Save adisarid/28f430829c4ff537b9fbe2d54bf31d2c to your computer and use it in GitHub Desktop.
library(tidyverse)
tbl <- tribble(~main_cat, ~success, ~projects,
"Dancer", 63, 4,
"Theater", 60, 11,
"Comics", 55, 11,
"Music", 47, 52,
"Art", 42, 28,
"Film & Video", 38, 63,
"Games", 36, 30,
"Design", 36, 30,
"Publishing", 32, 40,
"Photography", 31, 11,
"Fashion", 26, 23,
"Food", 25, 24,
"Crafts", 25, 9,
"Journalism", 22, 5,
"Technology", 21, 32)
ggplot(tbl,
aes(x = success, y = projects)) +
geom_point() +
saridr::theme_sarid() +
geom_hline(yintercept = 25) +
geom_vline(xintercept = 37) +
ggrepel::geom_label_repel(aes(label = main_cat)) +
xlab("Success rate (%)") +
ylab("Number of Projects (K)") +
ggtitle("Project versus Success rate", subtitle = "Solid lines indicate averages")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment