Created
December 11, 2019 10:28
-
-
Save dsquintana/eb652322bd4f0f2602f143e6e9069750 to your computer and use it in GitHub Desktop.
Heart rate variability research trends
This file contains hidden or 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
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