Skip to content

Instantly share code, notes, and snippets.

@dsquintana
Created December 11, 2019 10:28
Show Gist options
  • Save dsquintana/eb652322bd4f0f2602f143e6e9069750 to your computer and use it in GitHub Desktop.
Save dsquintana/eb652322bd4f0f2602f143e6e9069750 to your computer and use it in GitHub Desktop.
Heart rate variability research trends
install.packages("europepmc")
install.packages("cowplot")
install.packages("tidyverse")
library(europepmc)
library(cowplot)
library(tidyverse)
hrv_trend <- europepmc::epmc_hits_trend(query = "heart rate variability",
period = 1978:2018)
# Plot
p1 <- hrv_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")
p1 + theme(axis.text.x = element_text(angle=90))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment