knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
First, you need to load the JournalAnalysis
package in order to load variables and functions.
library(JournalAnalysis) library(dplyr)
Since we are interested in the microbiome in the context of psychiatry, our query is as such.
query3 <- "microbiome AND (psychiatry OR psychology OR neuroscience) AND (rhesus OR macaque or human or stress or monkey) AND (NOT ecology)" pub_data <- get_publication_data(journal_source = "scimago", queries = query3, limit = 30000, min_citations = 5)
The pub_data
objects includes $articles
, $journals
, and $combined
data.
# View the resulting pubmed ids pmids <- pub_data$articles$pmid pmids
get_word_cloud(pubmed_ids = pmids, plot_name = "microbiome_psych_wordcloud.png") knitr::include_graphics('./microbiome_psych_wordcloud.png')
View unique journals based on the articles retrieved with the below command.
pub_data$journals
Now, you can do some further analysis of journals based on SJR
, which is.
# Decide on categorical words to keep cats <- "Multidisciplinary|Neuroscience|Psychology|Psychiatry"
Select "best" journals based on median or any other statistical method. It may be valuable to do some clustering although the journals are ranked into quartiles. We chose the median SJR to look at any journals above the median and qualify them as the upper tier.
# Only keep journals above the median that are journals and include the categories above. best_journals <- filter(pub_data$journals, SJR >= median(pub_data$journals$SJR) & grepl(cats, Categories) & Type == "journal")
After filtering the journal data, you can now select specific columns to view and save your tibble as a csv file.
# Decide on columns to keep best_journals <- best_journals %>% select(Title, Rank, Type, SJR, Country, Categories) best_journals # Save as a csv file save_as_csv(best_journals, filename = "highest_impact_relevant_journals")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.