nvsq_counts_year <- nvsq_counts |>
filter(Year <= 2020) |>
group_by(Year) |>
summarize(total = sum(Count))
plot_data <- articles |>
filter(year <= 2020) |>
count(year) |>
left_join(nvsq_counts_year, by = c("year" = "Year")) |>
mutate(pct = n / total)
ggplot(plot_data, aes(x = factor(year), y = pct)) +
geom_col(fill = clrs$Prism[9]) +
labs(
x = NULL,
y = "Percent of NVSQ articles",
title = "Proportion of causally-focused\narticles in NVSQ, 2010–2020",
caption = "Article uses an experiment, difference-in-differences, regression discontinuity,\ninstrumental variables, or other method for statistically identifying a causal mechanism\n\n(Voluntas, NML, PAR, JPART, JPAM, and PMR forthcoming)"
) +
scale_y_continuous(labels = scales::percent_format(accuracy = 1)) +
theme_np() +
theme(panel.grid.major.x = element_blank())