pdf_document:
latex_engine: xelatex
author: "Amos Kipkorir Langat"
date: "r Sys.Date()
"
output:
html_document:
df_print: paged
pdf_document: default
word_document: default
title: "SUMMER INSTITUTE FOR COMPUTATIONAL SOCIAL SCIENCES-ACCRA"
knitr::opts_chunk$set(warning = TRUE, echo = TRUE)
Bibliometric Aanlysis
Assignment presentation on bibliometetric analysis
Install and load required packages
options(repos = "https://cran.rstudio.com/")
install.packages("bibliometrix")
install.packages("bibliometrix")
install.packages("ggplot2")
install.packages("dplyr")
library(bibliometrix)
library(ggplot2)
library(dplyr)
##Load the bibliometric csv dataset
bibli_Data<-read.csv("C:\\Users\\user\\Documents\\SICSS-ACCRA PROJECT\\day 6\\Bibliometrix-Export-File-2023-08-27.csv")
##data to keep by deleting other columns
data_keep<-data_frame(
Name_of_Author=bibli_Data$AU,
University_Affiliated=bibli_Data$C3,
Journal_Name=bibli_Data$PU,
title_article=bibli_Data$AB,
Publication_Year=bibli_Data$PY,
Number_of_citations=bibli_Data$PG
)
View(data_keep)
Define the valid_year_pattern
valid_year_pattern <- "^\\d{4}$"
Filter the data_keep data frame to keep only valid year observations
data_keep_filtered <- data_keep %>%
filter(grepl(valid_year_pattern, Publication_Year))
Select specific columns
selected_columns <-data_keep_filtered %>%
select(Publication_Year, Number_of_citations)
View(selected_columns)
###create the ggplot2 graph
ggplot(selected_columns, aes(x = Publication_Year, y = Number_of_citations)) +
geom_point(size = 4, color = "blue") +
geom_line(color = "red") +
labs(
title = "Bibliometric Analysis",
x = "Publication Year",
y = "Number of Citations"
) +
theme_minimal()