Created
July 10, 2023 09:23
-
-
Save pkiraly/3454bf8b809746cc689b43609c6cb091 to your computer and use it in GitHub Desktop.
nobel.R
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) | |
df <- read_csv('nobel.csv') | |
dfyear <- read_csv('nobel-years.csv') | |
df %>% | |
left_join(dfyear) %>% | |
mutate( | |
is_nobel_year = year == prize_year, | |
label = sprintf("%d: %s", prize_year, name) | |
) %>% | |
ggplot(aes(x = year, y = reorder(label, desc(label)))) + | |
geom_point(aes(size = editions, color=is_nobel_year), alpha=0.6) + | |
theme_bw() + | |
labs( | |
title='Nobel prize winners (1990-2022) in German translations', | |
subtitle = 'based on the North German K10plus union catalogue. For each name we checked all name variants, \nwe did not filter out duplicated records. Colour blue denotes the year of winning the prize.' | |
) + | |
ylab('author') + | |
xlab('publication year') + | |
guides(color = "none") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nobel.csv
contains 3 columns:name
(the name of the author),year
(the year),editions
(the number of publications on that year)nobel-years.csv
contains 2 columns:name
(the name of the author),prize_year
(the name when the author received the prize)