Task 1: Use world bank data to analyze something

For this task, I am extracting the number of scientific and technical journal articles by country. This refers to the number of articles published in the field of physics, biology, chemistry, mathematics, clinical medicine, biomedical research, engineering and technology, and earth and space sciences. I chose five countries (US, Canada, China, India, and Germany) to see the trend in publications over the years. I think it would be really interesting to see the number of publications in each field as well. Also, it would be great if the publications for economics were included.

# Packages needed
library(wbstats)
library(ggplot2)
# extract data from worldbank API between 2000 to 2018 by country
ForData <- wb_data(country= c("USA", "Canada", "China", "India", "Germany"),
                      indicator = "IP.JRN.ARTC.SC",
                   start_date = 2000, end_date = 2018)
str(ForData)
## tibble [95 x 9] (S3: tbl_df/tbl/data.frame)
##  $ iso2c         : chr [1:95] "CA" "CA" "CA" "CA" ...
##  $ iso3c         : chr [1:95] "CAN" "CAN" "CAN" "CAN" ...
##  $ country       : chr [1:95] "Canada" "Canada" "Canada" "Canada" ...
##  $ date          : num [1:95] 2000 2001 2002 2003 2004 ...
##  $ IP.JRN.ARTC.SC: num [1:95] 33854 33374 36153 38040 41974 ...
##   ..- attr(*, "label")= chr "Scientific and technical journal articles"
##  $ unit          : chr [1:95] NA NA NA NA ...
##  $ obs_status    : chr [1:95] NA NA NA NA ...
##  $ footnote      : chr [1:95] NA NA NA NA ...
##  $ last_updated  : Date[1:95], format: "2021-03-19" "2021-03-19" ...
# Checking min and max number of overall publications
min(ForData$IP.JRN.ARTC.SC)
## [1] 21770.72
max(ForData$IP.JRN.ARTC.SC)
## [1] 528263.2
# plot the data
ggplot(ForData)+
  geom_point(aes(x=date, y=IP.JRN.ARTC.SC, color=country))+
  labs(title = "Number of scientific publications by country",
       x = "Date",
       y = "Number of publications")+
  scale_y_continuous(breaks = seq(20000,550000,50000))

Result shows increase in number of publications for all countries over time. However, I would like to point out China in particular as it has the highest number of publications and the number has increased by more than 460,000 in 18 years period.