Skip to content

Instantly share code, notes, and snippets.

@dsquintana
Created June 30, 2022 17:34
Show Gist options
  • Save dsquintana/ad42c6cb65e3b4f23da2c8d1d53c0ea3 to your computer and use it in GitHub Desktop.
Save dsquintana/ad42c6cb65e3b4f23da2c8d1d53c0ea3 to your computer and use it in GitHub Desktop.
Interest in sympathovagal balance
install.packages("europepmc")
install.packages("cowplot")
install.packages("tidyverse")
library(europepmc)
library(cowplot)
library(tidyverse)
svb_trend <- europepmc::epmc_hits_trend(query = "sympathovagal balance",
period = 2008:2021)
# Standard plot
svb_trend %>%
ggplot(aes(year, query_hits / all_hits)) +
geom_point() +
geom_line()
# Nicer plot
svb_trend %>%
ggplot(aes(x = factor(year), y = (query_hits / all_hits))) +
geom_col(fill = "#56B4E9", width = 0.6, alpha = 0.9) +
scale_y_continuous(expand = c(0, 0)) +
theme_minimal_hgrid(12) +
labs(x = "Year", y = "Proportion of all published articles") +
ggtitle("Interest in sypathovagal balance")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment