Representativity of First Authors in Psychology
A large proportion of first authors in psychology are located in North America or Europe, mostly in the US (Thalmayer et al., 2021, Arnett, 2008). In this dashboard, I present some aggregated data by continent, country, and year (for first authors only), for the topic of PASSION, using the following PubMed search query term:
passion [Title/Abstract]
OR Dualistic Model of Passion [Text Word]
AND ('1980/01/01'[Date - Publication] : '3000/12/31'[Date - Publication])
This dashboard was created with the pubmedDashboard
package in R: https://rempsyc.github.io/pubmedDashboard/.
* Percentages are calculated after excluding missing values. The Missing column shows the real percentage of missing values.
The data from this report include information about publications on
the topic of passion for years 1980 to 2023. They include information
about the articles (e.g., title, abstract) as well as on the authors,
such as university of affiliation. I have obtained these data from
PubMed using the PubMed API through the easyPubMed
package.
I have determined the country of the first author of each paper based on
the affiliation address by matching the university name with a world
university names database obtained from GitHub.
* Percentages are calculated after excluding missing values. The Missing column shows the real percentage of missing values.
Some of the papers were missing address information; in many cases, the PubMed API provided only the department and no university. It was not possible to identify the country in these cases (one would need to look at the actual papers one by one to make manual corrections). Furthermore, some university names from the data did not match the university name database obtained from GitHub. In some cases, I have brought manual corrections to university names in an attempt to reduce the number of missing values.
* Percentages are calculated after excluding missing values. The Missing column shows the real percentage of missing values.
Possible future steps include: (a) obtaining a better, more current university name database (that includes country of university), (b) making manual corrections for other research institutes not included in the university database, (c) host DT tables on a server to speed up the website and allow the inclusion of a DT table for exploring the raw data, and (d) find a way to use country flags for the countries-by-journal figure.
* Percentages are calculated after excluding missing values. The Missing column shows the real percentage of missing values.
* Percentages are calculated after excluding missing values. The Missing column shows the real percentage of missing values.
* Percentages are calculated after excluding missing values. The Missing column shows the real percentage of missing values.
* Percentages are calculated after excluding missing values. The Missing row shows the real percentage of missing values.
* Percentages are calculated after excluding missing values. The Missing column shows the real percentage of missing values.
---
title: "Passion Dashboard"
author: "Rémi Thériault"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
social: menu
source_code: embed
# theme: lumen
storyboard: false
---
```{r setup, include=FALSE}
query_pubmed <- TRUE
```
```{r packages}
# Load packages
library(pubmedDashboard)
library(dplyr)
library(ggflags)
```
```{r API_TOKEN_PUBMED, eval=query_pubmed, include=FALSE}
if(Sys.info()["sysname"] == "Windows") {
API_TOKEN_PUBMED <- keyring::key_get("pubmed", "rempsyc")
}
check_pubmed_api_token(API_TOKEN_PUBMED)
```
```{r save_process_pubmed_batch, results='hide', eval=query_pubmed}
pubmed_query_string <- paste(
"passion [Title/Abstract]",
"OR Dualistic Model of Passion [Text Word]")
save_process_pubmed_batch(
pubmed_query_string,
year_low = 2023,
year_high = 2030,
api_key = API_TOKEN_PUBMED)
```
# Continent
## Column 1 {data-width=2150}
### Waffle plot of journal paper percentages, by continent (each square = 1% of data) {data-height=600}
```{r get_historic_data}
articles.df4 <- read_bind_all_data()
```
```{r clean_journals_continents}
articles.df4 <- clean_journals_continents(articles.df4)
saveRDS(articles.df4, "data/fulldata.rds")
```
```{r continent_waffle_overall}
waffle_continent(articles.df4)
```
### Table of journal paper percentages, by continent {data-height=200}
```{r, continent_table}
table_continent(articles.df4)
```
## Column 2 {.tabset .tabset-fade}
### Context
**Representativity of First Authors in Psychology**
A large proportion of first authors in psychology are located in North America or Europe, mostly in the US ([Thalmayer et al., 2021](https://psycnet.apa.org/doi/10.1037/amp0000622), [Arnett, 2008](https://doi.org/10.1037/0003-066x.63.7.602)). In this dashboard, I present some aggregated data by continent, country, and year (for first authors only), for the topic of **PASSION**, using the following PubMed search query term:
```
passion [Title/Abstract]
OR Dualistic Model of Passion [Text Word]
AND ('1980/01/01'[Date - Publication] : '3000/12/31'[Date - Publication])
```
This dashboard was created with the `pubmedDashboard` package in R: https://rempsyc.github.io/pubmedDashboard/.
> \* Percentages are calculated after excluding missing values. The *Missing* column shows the real percentage of missing values.
### Method & Data
The data from this report include information about publications on the topic of passion for years 1980 to 2023. They include information about the articles (e.g., title, abstract) as well as on the authors, such as university of affiliation. I have obtained these data from PubMed using the PubMed API through the `easyPubMed` package. I have determined the country of the first author of each paper based on the affiliation address by matching the university name with a world university names database obtained from GitHub.
> \* Percentages are calculated after excluding missing values. The *Missing* column shows the real percentage of missing values.
### Missing data
Some of the papers were missing address information; in many cases, the PubMed API provided only the department and no university. It was not possible to identify the country in these cases (one would need to look at the actual papers one by one to make manual corrections). Furthermore, some university names from the data did not match the university name database obtained from GitHub. In some cases, I have brought manual corrections to university names in an attempt to reduce the number of missing values.
> \* Percentages are calculated after excluding missing values. The *Missing* column shows the real percentage of missing values.
### Next Steps
Possible future steps include: (a) obtaining a better, more current university name database (that includes country of university), (b) making manual corrections for other research institutes not included in the university database, (c) host DT tables on a server to speed up the website and allow the inclusion of a DT table for exploring the raw data, and (d) find a way to use country flags for the countries-by-journal figure.
> \* Percentages are calculated after excluding missing values. The *Missing* column shows the real percentage of missing values.
# Continent, by Year (lm)
## Column 1 {data-width=800}
### Scatter plot of journal paper percentages, by continent and year {data-height=600}
```{r, continent_scatter_overall}
scatter_continent_year(articles.df4)
```
## Column 2
### Table of journal paper percentages, by continent {data-height=200}
```{r, continent_table_journal_year}
x <- table_continent_year(articles.df4)
x
```
> \* Percentages are calculated after excluding missing values. The *Missing* column shows the real percentage of missing values.
# Continent, by Year (loess)
## Column 1 {data-width=800}
### Scatter plot of journal paper percentages, by continent and year {data-height=600}
```{r, continent_scatter_overall_loess}
scatter_continent_year(articles.df4, method = "loess")
```
## Column 2
### Table of journal paper percentages, by continent {data-height=200}
```{r, continent_table_journal_year_loess}
x
```
> \* Percentages are calculated after excluding missing values. The *Missing* column shows the real percentage of missing values.
# Country
## Column 1 {data-width=800}
### Waffle plot of journal paper percentages, by country (each flag = 1% of data)
```{r country_table_overall, fig.width=4.5, fig.height=4.5}
waffle_country(articles.df4)
```
## Column 2
### Table of journal paper percentages, by country {data-height=200}
```{r country_table_journal}
table_country(articles.df4)
```
> \* Percentages are calculated after excluding missing values. The *Missing* row shows the real percentage of missing values.
# Country, by Year
## Column 1 {data-width=1000}
### Scatter plot of journal paper percentages, by country and year
```{r, country_series_year}
scatter_country_year(articles.df4, method = "lm")
```
## Column 2
### Table of journal paper percentages, by country and year {data-height=200}
```{r, country_table_year}
table_country_year(articles.df4)
```
> \* Percentages are calculated after excluding missing values. The *Missing* column shows the real percentage of missing values.
# Missing Data
## Column 1 {data-width=700}
### This table allows investigating why the country/university could not be identified
```{r missing_universities, warning=FALSE}
articles.df4 %>%
table_missing_country()
```
## Column 2