Skip to content

Instantly share code, notes, and snippets.

@pkiraly
Created July 10, 2023 09:23
Show Gist options
  • Save pkiraly/3454bf8b809746cc689b43609c6cb091 to your computer and use it in GitHub Desktop.
Save pkiraly/3454bf8b809746cc689b43609c6cb091 to your computer and use it in GitHub Desktop.
nobel.R
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")
@pkiraly
Copy link
Author

pkiraly commented Jul 10, 2023

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)

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