Title: | Creating PubMed Data Visualization Dashboards |
---|---|
Description: | Package to facilitate the creation of data visualization dashboards through the flexdashboard and easyPubMed packages. This package is now deprecated in favour of the pubDashboard package. |
Authors: | Rémi Thériault [aut, cre] |
Maintainer: | Rémi Thériault <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.0.3 |
Built: | 2024-10-27 04:51:24 UTC |
Source: | https://github.com/rempsyc/pubmedDashboard |
Add affiliations to pubmedDashboard dataframe
add_affiliation(data)
add_affiliation(data)
data |
The dataframe on which to add affiliations (department and university). |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ) d.fls <- batch_pubmed_download2( pubmed_query_string = pubmed_query_string, year_low = 2023, year_high = 2023 ) articles.df <- all_articles_to_df(d.fls) articles.df2 <- add_affiliation(articles.df) articles.df2[5, ] ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ) d.fls <- batch_pubmed_download2( pubmed_query_string = pubmed_query_string, year_low = 2023, year_high = 2023 ) articles.df <- all_articles_to_df(d.fls) articles.df2 <- add_affiliation(articles.df) articles.df2[5, ] ## End(Not run)
Add regions to pubmedDashboard dataframe
add_region(data)
add_region(data)
data |
The dataframe on which to add region. |
## Not run: d.fls <- batch_pubmed_download2( pubmed_query_string = paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ), year_low = 2023, year_high = 2023 ) articles.df <- all_articles_to_df(d.fls) articles.df2 <- add_affiliation(articles.df) articles.df3 <- match_university(articles.df2) articles.df4 <- add_region(articles.df3) articles.df4[2, ] ## End(Not run)
## Not run: d.fls <- batch_pubmed_download2( pubmed_query_string = paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ), year_low = 2023, year_high = 2023 ) articles.df <- all_articles_to_df(d.fls) articles.df2 <- add_affiliation(articles.df) articles.df3 <- match_university(articles.df2) articles.df4 <- add_region(articles.df3) articles.df4[2, ] ## End(Not run)
Convert list of PubMed XLM files to dataframe
all_articles_to_df(d.fls)
all_articles_to_df(d.fls)
d.fls |
The list of XLM PubMed data. |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ) d.fls <- batch_pubmed_download2( pubmed_query_string = pubmed_query_string, year_low = 2023, year_high = 2023 ) articles.df <- all_articles_to_df(d.fls) articles.df[5, ] ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ) d.fls <- batch_pubmed_download2( pubmed_query_string = pubmed_query_string, year_low = 2023, year_high = 2023 ) articles.df <- all_articles_to_df(d.fls) articles.df[5, ] ## End(Not run)
Convert PubMed XLM files to dataframe
article_to_df2( pubmedArticle, autofill = FALSE, max_chars = 500, getKeywords = FALSE, getAuthors = TRUE )
article_to_df2( pubmedArticle, autofill = FALSE, max_chars = 500, getKeywords = FALSE, getAuthors = TRUE )
pubmedArticle |
The PubMed data, in XLM form. |
autofill |
Autofill the affiliation address when missing. |
max_chars |
Maximum number of characters for the address. |
getKeywords |
Whether to extract keywords as well. |
getAuthors |
Whether to extract the author information. |
## Not run: dami_query <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ) dami_on_pubmed <- easyPubMed::get_pubmed_ids(dami_query) dami_abstracts_xml <- easyPubMed::fetch_pubmed_data(dami_on_pubmed) dami_abstracts_list <- easyPubMed::articles_to_list(dami_abstracts_xml) article_to_df2(pubmedArticle = dami_abstracts_list[[2]], autofill = FALSE)[1, ] ## End(Not run)
## Not run: dami_query <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ) dami_on_pubmed <- easyPubMed::get_pubmed_ids(dami_query) dami_abstracts_xml <- easyPubMed::fetch_pubmed_data(dami_on_pubmed) dami_abstracts_list <- easyPubMed::articles_to_list(dami_abstracts_xml) article_to_df2(pubmedArticle = dami_abstracts_list[[2]], autofill = FALSE)[1, ] ## End(Not run)
Download PubMed data with query string
batch_pubmed_download2( pubmed_query_string, year_low = 2023, year_high = 2030, data_folder = "data", batch_size = 5000, api_key = NULL )
batch_pubmed_download2( pubmed_query_string, year_low = 2023, year_high = 2030, data_folder = "data", batch_size = 5000, api_key = NULL )
pubmed_query_string |
The PubMed query string. |
year_low |
The year the data should start. |
year_high |
The year the data should end. |
data_folder |
Where to save the data. |
batch_size |
The download batch size. |
api_key |
The api key for faster processing (optional). |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) batch_pubmed_download2( pubmed_query_string, year_low = 2023, year_high = 2023 ) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) batch_pubmed_download2( pubmed_query_string, year_low = 2023, year_high = 2023 ) ## End(Not run)
Check whether the PubMed API token is of the correct length and valid
check_pubmed_api_token(API_TOKEN_PUBMED)
check_pubmed_api_token(API_TOKEN_PUBMED)
API_TOKEN_PUBMED |
The PubMed API token |
API_TOKEN_PUBMED <- c( "GNZuCGNZuCGNZuCGNZuCGNZuCtwed3twed32" ) check_pubmed_api_token(API_TOKEN_PUBMED)
API_TOKEN_PUBMED <- c( "GNZuCGNZuCGNZuCGNZuCGNZuCtwed3twed32" ) check_pubmed_api_token(API_TOKEN_PUBMED)
Clean dataframe, for names of journals and continents
clean_journals_continents(data)
clean_journals_continents(data)
data |
The processed dataframe of data |
Convert a Hex string to regular text
convert_hex_to_char(hex_string)
convert_hex_to_char(hex_string)
hex_string |
The address containg hex characters to convert. |
address <- c( "Département de Psychologie, Université du Québec à Montréal", "Department of Behavioural and Cognitive Sciences, University of Luxembourg" ) convert_hex_to_char(address)
address <- c( "Département de Psychologie, Université du Québec à Montréal", "Department of Behavioural and Cognitive Sciences, University of Luxembourg" ) convert_hex_to_char(address)
countrycode
List of countries taken from the package countrycode
countries
countries
A vector of class character containing country names.
Detect missing journals
detect_missing_journals(data)
detect_missing_journals(data)
data |
The processed dataframe of data |
Generate a dygraph of journal paper percentages, by country and year
dygraph_year(data, level = "continent")
dygraph_year(data, level = "continent")
data |
The processed dataframe of data |
level |
Level of analysis, either country or continent |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2021, year_high = 2023 ) data <- read_bind_all_data() dygraph_year(data) dygraph_year(data, "country") ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2021, year_high = 2023 ) data <- read_bind_all_data() dygraph_year(data) dygraph_year(data, "country") ## End(Not run)
Extracts correct component from a splitted affiliation address
extract_split_address(splitted.address, string)
extract_split_address(splitted.address, string)
splitted.address |
The address splitted with stringr::str_split. |
string |
The keyword to determine which string component to keep. |
address <- c( "Department of Psychology", " Cornell University", " Ithaca", " New York 14853-7601." ) extract_split_address(address, "University") extract_split_address(address, "Department")
address <- c( "Department of Psychology", " Cornell University", " Ithaca", " New York 14853-7601." ) extract_split_address(address, "University") extract_split_address(address, "Department")
Get affiliations
get_affiliation(address, info = "university")
get_affiliation(address, info = "university")
address |
The address to parse. |
info |
The information to extract, one of c("university", "department"). |
address <- c( "Department of Psychology, Cornell University, Ithaca, New York 14853-7601.", "Dipartimento di Psicologia Generale, Università di Padova, Italy.", "Universität Mannheim, Federal Republic of Germany.", "Département de psychologie, Université du Québec à Montréal, Canada." ) get_affiliation(address, "department") get_affiliation(address, "university")
address <- c( "Department of Psychology, Cornell University, Ithaca, New York 14853-7601.", "Dipartimento di Psicologia Generale, Università di Padova, Italy.", "Universität Mannheim, Federal Republic of Germany.", "Département de psychologie, Université du Québec à Montréal, Canada." ) get_affiliation(address, "department") get_affiliation(address, "university")
Get country
get_country(address)
get_country(address)
address |
The address to parse. |
## Not run: d.fls <- batch_pubmed_download2( pubmed_query_string = paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ), year_low = 2023, year_high = 2023 ) articles.df <- all_articles_to_df(d.fls) articles.df2 <- add_affiliation(articles.df) articles.df3 <- match_university(articles.df2) get_country(articles.df3$address) ## End(Not run)
## Not run: d.fls <- batch_pubmed_download2( pubmed_query_string = paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ), year_low = 2023, year_high = 2023 ) articles.df <- all_articles_to_df(d.fls) articles.df2 <- add_affiliation(articles.df) articles.df3 <- match_university(articles.df2) get_country(articles.df3$address) ## End(Not run)
List of academic journals and corresponding fields
journal_field
journal_field
A data frame with 25 rows and 3 variables:
academic journal
short name for the journal
the field of research
Whether it is part of one of the six original journals
...
Match list of universities to countries in a dataframe
match_university(data)
match_university(data)
data |
The dataframe to use for matching. |
## Not run: d.fls <- batch_pubmed_download2( pubmed_query_string = paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ) ) articles.df <- all_articles_to_df(d.fls) articles.df2 <- add_affiliation(articles.df) articles.df3 <- match_university(articles.df2) articles.df3[5, ] ## End(Not run)
## Not run: d.fls <- batch_pubmed_download2( pubmed_query_string = paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]", "AND ('2023/01/01' [Date - Publication] : '2023/12/31' [Date - Publication])" ) ) articles.df <- all_articles_to_df(d.fls) articles.df2 <- add_affiliation(articles.df) articles.df3 <- match_university(articles.df2) articles.df3[5, ] ## End(Not run)
Like Excel vlookup/grep, both both ways
partial_vlookup(pattern, lookup_vector)
partial_vlookup(pattern, lookup_vector)
pattern |
The pattern to compare. |
lookup_vector |
The dictionnary in which to look for the pattern. |
address <- c( "Department of Psychology, Cornell University, Ithaca, New York 14853-7601.", "Dipartimento di Psicologia Generale, Università di Padova, Italy.", "Universität Mannheim, Federal Republic of Germany.", "Département de psychologie, Université du Québec à Montréal, Canada." ) partial_vlookup(address, universities$university) uni <- c( "Cornell University", "Università di Padova", "Universität Mannheim", "Université du Québec à Montréal" ) partial_vlookup(uni, universities$university)
address <- c( "Department of Psychology, Cornell University, Ithaca, New York 14853-7601.", "Dipartimento di Psicologia Generale, Università di Padova, Italy.", "Universität Mannheim, Federal Republic of Germany.", "Département de psychologie, Université du Québec à Montréal, Canada." ) partial_vlookup(address, universities$university) uni <- c( "Cornell University", "Università di Padova", "Universität Mannheim", "Université du Québec à Montréal" ) partial_vlookup(uni, universities$university)
Read local pubmedDashboard data files and bind them in a single dataframe
read_bind_all_data(data_folder = "data")
read_bind_all_data(data_folder = "data")
data_folder |
The folder in which the data lives |
Render complete pubmedDashboard dashboard
render_dashboard( file_name = "dashboard", title = "title", author = "author", pubmed_query_string = "", journal = NULL, year_low = 2023, year_high = 2023, month_low = "01", month_high = 12, day_low = "01", day_high = 31, data_folder = "data", batch_size = 5000, api_key = NULL, verbose = TRUE, query_pubmed = FALSE, tab_continent = TRUE, tab_continent_year = TRUE, tab_continent_journal = TRUE, tab_country = TRUE, tab_country_journal = TRUE, tab_psychology = FALSE, tab_economics = FALSE, tab_general = FALSE, tab_figure1 = FALSE, tab_missing = TRUE )
render_dashboard( file_name = "dashboard", title = "title", author = "author", pubmed_query_string = "", journal = NULL, year_low = 2023, year_high = 2023, month_low = "01", month_high = 12, day_low = "01", day_high = 31, data_folder = "data", batch_size = 5000, api_key = NULL, verbose = TRUE, query_pubmed = FALSE, tab_continent = TRUE, tab_continent_year = TRUE, tab_continent_journal = TRUE, tab_country = TRUE, tab_country_journal = TRUE, tab_psychology = FALSE, tab_economics = FALSE, tab_general = FALSE, tab_figure1 = FALSE, tab_missing = TRUE )
file_name |
Desired file name. |
title |
Desired dashboard title. |
author |
Desired displayed dashboard author. |
pubmed_query_string |
The PubMed query string. |
journal |
The list of desired journals. |
year_low |
The year the data should start. |
year_high |
The year the data should end. |
month_low |
The year the data should start. |
month_high |
The year the data should end. |
day_low |
The year the data should start. |
day_high |
The year the data should end. |
data_folder |
Where to save the data. |
batch_size |
The download batch size. |
api_key |
The api key for faster processing (optional). |
verbose |
Whether to include progress messages. |
query_pubmed |
Whether to query pubmed. This must be set to TRUE explicitely to avoid long operations. When the data is already downloaded and available in the data folder, this step is unnecessary. |
tab_continent |
Whether to render the "Continent" tab. |
tab_continent_year |
Whether to render the "Continent by year" tab. |
tab_continent_journal |
Whether to render the "Continent by journal" tab. |
tab_country |
Whether to render the "Country" tab. |
tab_country_journal |
Whether to render the "Country by journal" tab. |
tab_psychology |
Whether to render the "Psychology" tab. |
tab_economics |
Whether to render the "Economics" tab. |
tab_general |
Whether to render the "General" tab. |
tab_figure1 |
Whether to render the "Figure 1" tab. |
tab_missing |
Whether to render the "Missing" tab. |
## Not run: render_dashboard( file_name = "my_dashboard", title = "Wonderful Dashboard", author = "Rémi Thériault", pubmed_query_string = "passion [Title/Abstract]", journal = c("Journal of Personality and Social Psychology", "Health Psychology"), year_low = 2023, year_high = 2023, query_pubmed = TRUE, tab_figure1 = TRUE ) ## End(Not run)
## Not run: render_dashboard( file_name = "my_dashboard", title = "Wonderful Dashboard", author = "Rémi Thériault", pubmed_query_string = "passion [Title/Abstract]", journal = c("Journal of Personality and Social Psychology", "Health Psychology"), year_low = 2023, year_high = 2023, query_pubmed = TRUE, tab_figure1 = TRUE ) ## End(Not run)
Mega function to process and save PubMed data
save_process_pubmed_batch( pubmed_query_string = "", journal = NULL, year_low = 2024, year_high = 2024, month_low = "01", month_high = 12, day_low = "01", day_high = 31, data_folder = "data", suffix = "", batch_size = 5000, api_key = NULL, verbose = TRUE )
save_process_pubmed_batch( pubmed_query_string = "", journal = NULL, year_low = 2024, year_high = 2024, month_low = "01", month_high = 12, day_low = "01", day_high = 31, data_folder = "data", suffix = "", batch_size = 5000, api_key = NULL, verbose = TRUE )
pubmed_query_string |
The PubMed query string. |
journal |
The list of desired journals. |
year_low |
The year the data should start. |
year_high |
The year the data should end. |
month_low |
The year the data should start. |
month_high |
The year the data should end. |
day_low |
The year the data should start. |
day_high |
The year the data should end. |
data_folder |
Where to save the data. |
suffix |
What suffix to add to the name file. |
batch_size |
The download batch size. |
api_key |
The api key for faster processing (optional). |
verbose |
Whether to include progress messages. |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) ## End(Not run)
Generate table of journal paper percentages, by continent and year
scatter_continent_year( data, method = "lm", plotly = TRUE, citation = NULL, citation_size = 15, ... )
scatter_continent_year( data, method = "lm", plotly = TRUE, citation = NULL, citation_size = 15, ... )
data |
The processed dataframe of data |
method |
Which method to use for the regression line, either "lm" (default) or "loess". |
plotly |
Logical, whether to use plotly for dynamic data visualization. |
citation |
Optionally, a citation to add as a footer. |
citation_size |
Font size of the citation. |
... |
Further arguments passed to rempsyc::nice_scatter |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2022, year_high = 2023 ) data <- read_bind_all_data() suppressWarnings(scatter_continent_year(data)) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2022, year_high = 2023 ) data <- read_bind_all_data() suppressWarnings(scatter_continent_year(data)) ## End(Not run)
Generate table of journal paper percentages, by continent and year
scatter_country_year( data, method = "lm", plotly = TRUE, citation = NULL, citation_size = 15, ... )
scatter_country_year( data, method = "lm", plotly = TRUE, citation = NULL, citation_size = 15, ... )
data |
The processed dataframe of data |
method |
Which method to use for the regression line, either "lm" (default) or "loess". |
plotly |
Logical, whether to use plotly for dynamic data visualization. |
citation |
Optionally, a citation to add as a footer. |
citation_size |
Font size of the citation. |
... |
Further arguments passed to rempsyc::nice_scatter |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2018, year_high = 2020 ) data <- read_bind_all_data() suppressWarnings(scatter_country_year(data)) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2018, year_high = 2020 ) data <- read_bind_all_data() suppressWarnings(scatter_country_year(data)) ## End(Not run)
Generate table of journal paper percentages, by continent and year
scatter_figure1(data, method = "lm", original = TRUE, plotly = TRUE, ...)
scatter_figure1(data, method = "lm", original = TRUE, plotly = TRUE, ...)
data |
The processed dataframe of data |
method |
Which method to use for the regression line, either "lm" (default) or "loess". |
original |
Logical; if |
plotly |
Logical, whether to use plotly for dynamic data visualization. |
... |
Further arguments passed to rempsyc::nice_scatter |
## Not run: pubmed_query_string <- paste( "Developmental Psychology [Journal]", "OR Journal of Personality and Social Psychology [Journal]", "OR Journal of Abnormal Psychology [Journal]", "OR Journal of Family Psychology [Journal]", "OR Health Psychology [Journal]", "OR Journal of Educational Psychology [Journal]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() scatter_figure1(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "Developmental Psychology [Journal]", "OR Journal of Personality and Social Psychology [Journal]", "OR Journal of Abnormal Psychology [Journal]", "OR Journal of Family Psychology [Journal]", "OR Health Psychology [Journal]", "OR Journal of Educational Psychology [Journal]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() scatter_figure1(data) ## End(Not run)
Generate table of journal paper percentages, by continent
table_continent(data, datatable = TRUE)
table_continent(data, datatable = TRUE)
data |
The processed dataframe of data |
datatable |
Whether to output a DT::datatable HTML table widget instead of a regular dataframe (defaults to TRUE). |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() table_continent(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() table_continent(data) ## End(Not run)
Generate table of journal paper percentages, by continent and journals
table_continent_journal(data, datatable = TRUE)
table_continent_journal(data, datatable = TRUE)
data |
The processed dataframe of data |
datatable |
Whether to output a DT::datatable HTML table widget instead of a regular dataframe (defaults to TRUE). |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() table_continent_journal(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() table_continent_journal(data) ## End(Not run)
Generate table of journal paper percentages, by continent and year
table_continent_year(data, datatable = TRUE)
table_continent_year(data, datatable = TRUE)
data |
The processed dataframe of data |
datatable |
Whether to output a DT::datatable HTML table widget instead of a regular dataframe (defaults to TRUE). |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2022, year_high = 2023 ) data <- read_bind_all_data() table_continent_year(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2022, year_high = 2023 ) data <- read_bind_all_data() table_continent_year(data) ## End(Not run)
Generate table of journal paper percentages, by country
table_country(data, datatable = TRUE)
table_country(data, datatable = TRUE)
data |
The processed dataframe of data |
datatable |
Whether to output a DT::datatable HTML table widget instead of a regular dataframe (defaults to TRUE). |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() table_country(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() table_country(data) ## End(Not run)
Generate table of journal paper percentages, by continent and year
table_country_journal(data, datatable = TRUE)
table_country_journal(data, datatable = TRUE)
data |
The processed dataframe of data |
datatable |
Whether to output a DT::datatable HTML table widget instead of a regular dataframe (defaults to TRUE). |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() table_country_journal(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() table_country_journal(data) ## End(Not run)
Generate table of journal paper percentages, by country and year
table_country_year(data, datatable = TRUE)
table_country_year(data, datatable = TRUE)
data |
The processed dataframe of data |
datatable |
Whether to output a DT::datatable HTML table widget instead of a regular dataframe (defaults to TRUE). |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() table_country_year(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() table_country_year(data) ## End(Not run)
Count number of papers per journal, with year range
table_journal_count(data, datatable = TRUE)
table_journal_count(data, datatable = TRUE)
data |
The processed dataframe of data |
datatable |
Whether to output a DT::datatable HTML table widget instead of a regular dataframe (defaults to TRUE). |
Generate table of journal paper percentages, by country
table_missing_country(data, datatable = TRUE)
table_missing_country(data, datatable = TRUE)
data |
The processed dataframe of data |
datatable |
Whether to output a DT::datatable HTML table widget instead of a regular dataframe (defaults to TRUE). |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() data[1, c(4, 6)] <- NA table_missing_country(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() data[1, c(4, 6)] <- NA table_missing_country(data) ## End(Not run)
Obtained from GitHub, and then modified with minor improvements and more universities.
universities
universities
A data frame with 9420 rows and 2 variables:
the country code
the university
...
https://raw.githubusercontent.com/endSly/world-universities-csv/master/world-universities.csv
countrycode
List of US states taken from the package countrycode
us_states
us_states
A data frame with 50 rows and 3 variables:
the name of the state
the name of the abbreviation
the regex for that state
...
Generate a waffle chart of journal paper percentages, by continent (each square = 1% of data)
waffle_continent(data, citation = NULL, citation_size = NULL)
waffle_continent(data, citation = NULL, citation_size = NULL)
data |
The processed dataframe of data |
citation |
Optionally, a citation to add as a footer. |
citation_size |
Font size of the citation. |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() waffle_continent(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() waffle_continent(data) ## End(Not run)
Generate a waffle chart of journal paper percentages, by continent (each square = 1% of data)
waffle_continent_journal( data, citation, citation_size = NULL, journal_abbreviation = TRUE )
waffle_continent_journal( data, citation, citation_size = NULL, journal_abbreviation = TRUE )
data |
The processed dataframe of data |
citation |
Optionally, a citation to add as a footer. |
citation_size |
Font size of the citation. |
journal_abbreviation |
Logical, whether to use the journal abbreviation to fit the entire plot, otherwise some journal names can be quite long and accordingly be cropped. |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() waffle_continent_journal(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() waffle_continent_journal(data) ## End(Not run)
Generate a waffle plot made of country flags
waffle_country(data, citation, citation_size = NULL)
waffle_country(data, citation, citation_size = NULL)
data |
The processed dataframe of data |
citation |
Optionally, a citation to add as a footer. |
citation_size |
Font size of the citation. |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() waffle_country(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() waffle_country(data) ## End(Not run)
Generate a waffle chart of journal paper percentages, by continent (each square = 1% of data)
waffle_country_journal( data, citation, citation_size = NULL, journal_abbreviation = TRUE )
waffle_country_journal( data, citation, citation_size = NULL, journal_abbreviation = TRUE )
data |
The processed dataframe of data |
citation |
Optionally, a citation to add as a footer. |
citation_size |
Font size of the citation. |
journal_abbreviation |
Logical, whether to use the journal abbreviation to fit the entire plot, otherwise some journal names can be quite long and accordingly be cropped. |
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() waffle_country_journal(data) ## End(Not run)
## Not run: pubmed_query_string <- paste( "passion [Title/Abstract]", "AND Dualistic Model of Passion [Text Word]" ) save_process_pubmed_batch( pubmed_query_string, year_low = 2023, year_high = 2023 ) data <- read_bind_all_data() waffle_country_journal(data) ## End(Not run)
maps
List of world capitals taken from the package maps
world_capitals
world_capitals
A data frame with 259 rows and 6 variables:
the name of the capital
the country of the capital
population of the capital
latitude of the capital
longitude of the capital
whether it is a capital
...