This report presents an analysis of my LinkedIn content metrics for 90 days (May 4th, 2024, to August 1st, 2024). This analysis, conducted using R code, provides insights into content performance during this period.
# load readxl package
library(readxl)
# Specify the file path
content <- "C:/Users/HP/Downloads/Content_2024-05-04_2024-08-01_PeaceOluwatayo.xlsx"
# Get all sheet names
sheet_names <- excel_sheets(content)
# Read all sheets into a list of data frames and remove NA values
data_list <- lapply(sheet_names, function(sheet) {
data <- read_excel(content, sheet = sheet)
na.omit(data) # Remove rows with NA values
})
## New names:
## • `` -> `...2`
## • `` -> `...3`
## • `` -> `...4`
## • `` -> `...5`
## • `` -> `...6`
## • `` -> `...7`
# Assign names to list elements for easier access
names(data_list) <- sheet_names
# Extract specific sheets
top_posts <- data_list[["TOP POSTS"]]
demographics <- data_list[["DEMOGRAPHICS"]]
followers <- data_list[["FOLLOWERS"]]
engagement <- data_list[["ENGAGEMENT"]]
# View specific sheets in RStudio
View(demographics)
View(followers)
View(engagement)
# check the data types of the columns in demographics sheet
str(demographics)
## tibble [30 × 3] (S3: tbl_df/tbl/data.frame)
## $ Top Demographics: chr [1:30] "Job titles" "Job titles" "Job titles" "Job titles" ...
## $ Value : chr [1:30] "Data Analyst" "Founder" "Chief Executive Officer" "Software Engineer" ...
## $ Percentage : chr [1:30] "0.056374356150627136" "0.019528372213244438" "0.01510685309767723" "< 1%" ...
# convert the percentage column to numeric data type
demographics$Percentage <- as.numeric(demographics$Percentage)
demographics$Percentage
## [1] 0.05637436 0.01952837 0.01510685 NA NA 0.15843773
## [7] 0.05711127 0.02505527 0.01879145 0.01510685 0.16507001 0.13411938
## [13] 0.05711127 0.04716286 0.03352984 0.33824614 0.23986736 0.06705969
## [19] 0.02837141 0.02726603 0.13338245 0.11790715 0.09174650 0.08032425
## [25] 0.07074429 0.01215917 NA NA NA NA
# remove NA values in demographics data
demographics_complete<- na.omit(demographics)
demographics_complete
## # A tibble: 24 × 3
## `Top Demographics` Value Percentage
## <chr> <chr> <dbl>
## 1 Job titles Data Analyst 0.0564
## 2 Job titles Founder 0.0195
## 3 Job titles Chief Executive Officer 0.0151
## 4 Locations Lagos 0.158
## 5 Locations Abuja 0.0571
## 6 Locations Port Harcourt 0.0251
## 7 Locations Ibadan 0.0188
## 8 Locations London Area, United Kingdom 0.0151
## 9 Industries IT Services and IT Consulting 0.165
## 10 Industries Software Development 0.134
## # ℹ 14 more rows
# view complete demographics data
View(demographics_complete)
# delete unnecessary rows in followers data
followers_updated <- followers[-1,]
followers_updated
## # A tibble: 90 × 2
## `Total followers on 8/1/2024:` `2713.0`
## <chr> <chr>
## 1 5/4/2024 3.0
## 2 5/5/2024 5.0
## 3 5/6/2024 7.0
## 4 5/7/2024 129.0
## 5 5/8/2024 73.0
## 6 5/9/2024 38.0
## 7 5/10/2024 25.0
## 8 5/11/2024 38.0
## 9 5/12/2024 15.0
## 10 5/13/2024 6.0
## # ℹ 80 more rows
# view complete followers updated data
View(followers_updated)
# load data.table package
library(data.table)
# rename column names in followers_updated data
setnames(followers_updated, old = c("Total followers on 8/1/2024:", "2713.0"), new = c("Date", "New Followers"))
print(followers_updated)
## # A tibble: 90 × 2
## Date `New Followers`
## <chr> <chr>
## 1 5/4/2024 3.0
## 2 5/5/2024 5.0
## 3 5/6/2024 7.0
## 4 5/7/2024 129.0
## 5 5/8/2024 73.0
## 6 5/9/2024 38.0
## 7 5/10/2024 25.0
## 8 5/11/2024 38.0
## 9 5/12/2024 15.0
## 10 5/13/2024 6.0
## # ℹ 80 more rows
# check the data types of the columns in followers_updated sheet
str(followers_updated)
## tibble [90 × 2] (S3: tbl_df/tbl/data.frame)
## $ Date : chr [1:90] "5/4/2024" "5/5/2024" "5/6/2024" "5/7/2024" ...
## $ New Followers: chr [1:90] "3.0" "5.0" "7.0" "129.0" ...
## - attr(*, "na.action")= 'omit' Named int 1
## ..- attr(*, "names")= chr "1"
# convert the date column of the followers_updated sheet to date data type
followers_updated$Date <- strptime(followers_updated$Date, format = "%m/%d/%Y")
followers_updated$Date
## [1] "2024-05-04 WAT" "2024-05-05 WAT" "2024-05-06 WAT" "2024-05-07 WAT"
## [5] "2024-05-08 WAT" "2024-05-09 WAT" "2024-05-10 WAT" "2024-05-11 WAT"
## [9] "2024-05-12 WAT" "2024-05-13 WAT" "2024-05-14 WAT" "2024-05-15 WAT"
## [13] "2024-05-16 WAT" "2024-05-17 WAT" "2024-05-18 WAT" "2024-05-19 WAT"
## [17] "2024-05-20 WAT" "2024-05-21 WAT" "2024-05-22 WAT" "2024-05-23 WAT"
## [21] "2024-05-24 WAT" "2024-05-25 WAT" "2024-05-26 WAT" "2024-05-27 WAT"
## [25] "2024-05-28 WAT" "2024-05-29 WAT" "2024-05-30 WAT" "2024-05-31 WAT"
## [29] "2024-06-01 WAT" "2024-06-02 WAT" "2024-06-03 WAT" "2024-06-04 WAT"
## [33] "2024-06-05 WAT" "2024-06-06 WAT" "2024-06-07 WAT" "2024-06-08 WAT"
## [37] "2024-06-09 WAT" "2024-06-10 WAT" "2024-06-11 WAT" "2024-06-12 WAT"
## [41] "2024-06-13 WAT" "2024-06-14 WAT" "2024-06-15 WAT" "2024-06-16 WAT"
## [45] "2024-06-17 WAT" "2024-06-18 WAT" "2024-06-19 WAT" "2024-06-20 WAT"
## [49] "2024-06-21 WAT" "2024-06-22 WAT" "2024-06-23 WAT" "2024-06-24 WAT"
## [53] "2024-06-25 WAT" "2024-06-26 WAT" "2024-06-27 WAT" "2024-06-28 WAT"
## [57] "2024-06-29 WAT" "2024-06-30 WAT" "2024-07-01 WAT" "2024-07-02 WAT"
## [61] "2024-07-03 WAT" "2024-07-04 WAT" "2024-07-05 WAT" "2024-07-06 WAT"
## [65] "2024-07-07 WAT" "2024-07-08 WAT" "2024-07-09 WAT" "2024-07-10 WAT"
## [69] "2024-07-11 WAT" "2024-07-12 WAT" "2024-07-13 WAT" "2024-07-14 WAT"
## [73] "2024-07-15 WAT" "2024-07-16 WAT" "2024-07-17 WAT" "2024-07-18 WAT"
## [77] "2024-07-19 WAT" "2024-07-20 WAT" "2024-07-21 WAT" "2024-07-22 WAT"
## [81] "2024-07-23 WAT" "2024-07-24 WAT" "2024-07-25 WAT" "2024-07-26 WAT"
## [85] "2024-07-27 WAT" "2024-07-28 WAT" "2024-07-29 WAT" "2024-07-30 WAT"
## [89] "2024-07-31 WAT" "2024-08-01 WAT"
# convert the new followers column to numeric data type
followers_updated$`New Followers` <- as.numeric(followers_updated$`New Followers`)
followers_updated$`New Followers`
## [1] 3 5 7 129 73 38 25 38 15 6 12 17 12 8 15 9 9 14 45
## [20] 22 8 13 5 12 8 15 15 12 6 6 9 26 20 9 8 2 3 10
## [39] 7 3 2 5 1 5 2 13 14 4 1 4 3 2 0 6 9 2 17
## [58] 2 10 23 21 6 15 6 2 7 15 14 16 10 16 3 10 16 11 7
## [77] 11 14 4 8 13 12 10 8 9 7 4 13 6 8
# view followers_updated data
View(followers_updated)
# check the data types of the columns in engagement sheet
str(engagement)
## tibble [90 × 3] (S3: tbl_df/tbl/data.frame)
## $ Date : chr [1:90] "5/4/2024" "5/5/2024" "5/6/2024" "5/7/2024" ...
## $ Impressions: num [1:90] 232 296 215 5322 2772 ...
## $ Engagements: num [1:90] 11 10 7 216 116 36 23 32 16 10 ...
# convert the date column of the engagement sheet to date data type
engagement$Date <- strptime(engagement$Date, format = "%m/%d/%Y")
engagement$Date
## [1] "2024-05-04 WAT" "2024-05-05 WAT" "2024-05-06 WAT" "2024-05-07 WAT"
## [5] "2024-05-08 WAT" "2024-05-09 WAT" "2024-05-10 WAT" "2024-05-11 WAT"
## [9] "2024-05-12 WAT" "2024-05-13 WAT" "2024-05-14 WAT" "2024-05-15 WAT"
## [13] "2024-05-16 WAT" "2024-05-17 WAT" "2024-05-18 WAT" "2024-05-19 WAT"
## [17] "2024-05-20 WAT" "2024-05-21 WAT" "2024-05-22 WAT" "2024-05-23 WAT"
## [21] "2024-05-24 WAT" "2024-05-25 WAT" "2024-05-26 WAT" "2024-05-27 WAT"
## [25] "2024-05-28 WAT" "2024-05-29 WAT" "2024-05-30 WAT" "2024-05-31 WAT"
## [29] "2024-06-01 WAT" "2024-06-02 WAT" "2024-06-03 WAT" "2024-06-04 WAT"
## [33] "2024-06-05 WAT" "2024-06-06 WAT" "2024-06-07 WAT" "2024-06-08 WAT"
## [37] "2024-06-09 WAT" "2024-06-10 WAT" "2024-06-11 WAT" "2024-06-12 WAT"
## [41] "2024-06-13 WAT" "2024-06-14 WAT" "2024-06-15 WAT" "2024-06-16 WAT"
## [45] "2024-06-17 WAT" "2024-06-18 WAT" "2024-06-19 WAT" "2024-06-20 WAT"
## [49] "2024-06-21 WAT" "2024-06-22 WAT" "2024-06-23 WAT" "2024-06-24 WAT"
## [53] "2024-06-25 WAT" "2024-06-26 WAT" "2024-06-27 WAT" "2024-06-28 WAT"
## [57] "2024-06-29 WAT" "2024-06-30 WAT" "2024-07-01 WAT" "2024-07-02 WAT"
## [61] "2024-07-03 WAT" "2024-07-04 WAT" "2024-07-05 WAT" "2024-07-06 WAT"
## [65] "2024-07-07 WAT" "2024-07-08 WAT" "2024-07-09 WAT" "2024-07-10 WAT"
## [69] "2024-07-11 WAT" "2024-07-12 WAT" "2024-07-13 WAT" "2024-07-14 WAT"
## [73] "2024-07-15 WAT" "2024-07-16 WAT" "2024-07-17 WAT" "2024-07-18 WAT"
## [77] "2024-07-19 WAT" "2024-07-20 WAT" "2024-07-21 WAT" "2024-07-22 WAT"
## [81] "2024-07-23 WAT" "2024-07-24 WAT" "2024-07-25 WAT" "2024-07-26 WAT"
## [85] "2024-07-27 WAT" "2024-07-28 WAT" "2024-07-29 WAT" "2024-07-30 WAT"
## [89] "2024-07-31 WAT" "2024-08-01 WAT"
# view complete engagement data
View(engagement)
# Load dplyr package
library(dplyr)
##
## Attaching package: 'dplyr'
##
## The following objects are masked from 'package:data.table':
##
## between, first, last
##
## The following objects are masked from 'package:stats':
##
## filter, lag
##
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
# left join engagement data with followers_updated data
followers_engagement <- left_join(engagement, followers_updated, by = "Date")
followers_engagement
## # A tibble: 90 × 4
## Date Impressions Engagements `New Followers`
## <dttm> <dbl> <dbl> <dbl>
## 1 2024-05-04 00:00:00 232 11 3
## 2 2024-05-05 00:00:00 296 10 5
## 3 2024-05-06 00:00:00 215 7 7
## 4 2024-05-07 00:00:00 5322 216 129
## 5 2024-05-08 00:00:00 2772 116 73
## 6 2024-05-09 00:00:00 1094 36 38
## 7 2024-05-10 00:00:00 987 23 25
## 8 2024-05-11 00:00:00 1044 32 38
## 9 2024-05-12 00:00:00 636 16 15
## 10 2024-05-13 00:00:00 537 10 6
## # ℹ 80 more rows
# view complete followers_engagement data
View(followers_engagement)
# check data types of the columns in followers_engagement data
str(followers_engagement)
## tibble [90 × 4] (S3: tbl_df/tbl/data.frame)
## $ Date : POSIXct[1:90], format: "2024-05-04" "2024-05-05" ...
## $ Impressions : num [1:90] 232 296 215 5322 2772 ...
## $ Engagements : num [1:90] 11 10 7 216 116 36 23 32 16 10 ...
## $ New Followers: num [1:90] 3 5 7 129 73 38 25 38 15 6 ...
# create month column in followers_engagement data
followers_engagement$Month <- format(followers_engagement$Date, "%b")
followers_engagement$Month
## [1] "May" "May" "May" "May" "May" "May" "May" "May" "May" "May" "May" "May"
## [13] "May" "May" "May" "May" "May" "May" "May" "May" "May" "May" "May" "May"
## [25] "May" "May" "May" "May" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun"
## [37] "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun"
## [49] "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jun" "Jul" "Jul"
## [61] "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul"
## [73] "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul" "Jul"
## [85] "Jul" "Jul" "Jul" "Jul" "Jul" "Aug"
# Ensure the month column is an ordered factor with abbreviated month names
followers_engagement$Month <- factor(followers_engagement$Month,
levels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"),
ordered = TRUE)
# load ggplot2 package
library(ggplot2)
# create a line graph to visualize impressions over time
impressions_overtime <- ggplot(followers_engagement) +
aes(x = Date, y = Impressions) +
geom_line(colour = "#440154") +
labs(title = "Content Impressions over Time") +
theme_classic() +
theme(plot.title = element_text(size = 16L, face = "bold", hjust = 0.5), axis.title.y = element_text(size = 12L,
face = "plain"), axis.title.x = element_text(size = 12L, face = "plain"), axis.text.y = element_text(face = "plain",
size = 10L), axis.text.x = element_text(face = "plain", size = 10L), legend.text = element_text(size = 15L),
legend.title = element_text(size = 15L))
impressions_overtime
# load plotly package
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
# create an interactive plot for impressions over time
ggplotly(impressions_overtime)
The above line graph shows the content impressions from may 4th to august 1st, 2024. The x-axis represents the date, while the y-axis shows the number of impressions. The content impressions show a peak in May while there was a fluctuation in the impressions over time.
# create a bar plot to visualize impressions per month
impressions_per_month <- ggplot(followers_engagement) +
aes(x = Month, y = Impressions) +
geom_col(fill = "#440154") +
labs(title = "Content Impressions per Month") +
theme_classic() +
theme(plot.title = element_text(size = 16L, face = "bold", hjust = 0.5), axis.title.y = element_text(size = 12L),
axis.title.x = element_text(size = 12L))
impressions_per_month
# create an interactive plot for impressions per month
ggplotly(impressions_per_month)
The above bar plot shows the total content impressions between may and august 2024. The x-axis represents the Month, while the y-axis represents the number of impressions. The height of each bar shows the total impressions for each month.The month of July had the highest number of impressions.
# create a bar plot to visualize engagements per month
engagements_per_month <- ggplot(followers_engagement) +
aes(x = Month, y = Engagements) +
geom_col(fill = "#440154") +
labs(title = "Engagements per Month") +
theme_classic() +
theme(plot.title = element_text(size = 16L, face = "bold", hjust = 0.5), axis.title.y = element_text(size = 12L),
axis.title.x = element_text(size = 12L))
engagements_per_month
# create an interactive plot for engagements per month
ggplotly(engagements_per_month)
The above bar plot shows the total engagements between may and august 2024. The x-axis represents the Month, while the y-axis represents the number of engagements. The height of each bar shows the total engagements for each month.The month of July had the highest number of engagements.
# create a bar plot to visualize new followers per month
new_followers_per_month <- ggplot(followers_engagement) +
aes(x = Month, y = `New Followers`) +
geom_col(fill = "#440154") +
labs(title = "New Followers per Month") +
theme_classic() +
theme(plot.title = element_text(size = 16L, face = "bold", hjust = 0.5), axis.title.y = element_text(size = 12L),
axis.title.x = element_text(size = 12L))
new_followers_per_month
# create an interactive plot for new followers per month
ggplotly(new_followers_per_month)
The above bar plot shows the total number of new followers between may and august 2024. The x-axis represents the Month, while the y-axis represents number of new followers. The height of each bar shows the total number of new followers for each month.The month of May had the highest number of new followers.
# import number_of_posts data set
number_of_posts <- read_excel("C:/Users/HP/Downloads/number of posts may 4 to aug 1.xlsx")
# view number_of_posts data set
View(number_of_posts)
# check the data types of the columns in number_of_posts sheet
str(number_of_posts)
## tibble [4 × 2] (S3: tbl_df/tbl/data.frame)
## $ Month : chr [1:4] "May" "Jun" "Jul" "Aug"
## $ No of posts: num [1:4] 4 3 33 1
# Ensure the month column is an ordered factor with abbreviated month names
number_of_posts$Month <- factor(number_of_posts$Month,
levels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"),
ordered = TRUE)
# create a bar plot to visualize number of posts per month
no_of_posts_per_month <- ggplot(number_of_posts) +
aes(x = Month, y = `No of posts`) +
geom_col(fill = "#440154") +
labs(title = "Number of Posts per Month") +
theme_classic() +
theme(plot.title = element_text(size = 16L, face = "bold", hjust = 0.5), axis.title.y = element_text(size = 12L),
axis.title.x = element_text(size = 12L))
no_of_posts_per_month
# create an interactive plot for number of posts per month
ggplotly(no_of_posts_per_month)
The above bar plot shows the total number of posts between may and august 2024. The x-axis represents the Month, while the y-axis represents number of posts. The height of each bar shows the total number of posts for each month.The month of July had the highest number of posts.
# load dplyr package
library(dplyr)
# create a bar plot to visualize top job titles
top_job_titles <- demographics_complete %>%
filter(`Top Demographics` %in% "Job titles") %>%
ggplot() +
aes(x = `Top Demographics`, y = Percentage, fill = Value) +
geom_col(position = "dodge2") +
scale_fill_brewer(palette = "Purples", direction = 1) +
labs(title = "Top Job Titles", fill = "Keys") +
theme_classic() +
theme(plot.title = element_text(size = 16L, face = "bold", hjust = 0.5), axis.title.y = element_text(size = 10L),
axis.title.x = element_text(size = 10L))
top_job_titles
# create an interactive plot for top job titles
ggplotly(top_job_titles)
The above bar plot shows the most common job titles among the audience. The x-axis represents the job titles, while the y-axis represents the percentage of the audience. The highest bar, Data Analyst, indicates that it’s the most common job title among the audience, followed by other job titles in decreasing order of percentage.
# create a bar plot to visualize top locations
top_locations <- demographics_complete %>%
filter(`Top Demographics` %in% "Locations") %>%
ggplot() +
aes(x = `Top Demographics`, y = Percentage, fill = Value) +
geom_col(position = "dodge2") +
scale_fill_brewer(palette = "Purples", direction = 1) +
labs(title = "Top Locations", fill = "Keys") +
theme_classic() +
theme(plot.title = element_text(size = 16L, face = "bold", hjust = 0.5), axis.title.y = element_text(size = 10L),
axis.title.x = element_text(size = 10L))
top_locations
# create an interactive plot for top locations
ggplotly(top_locations)
The above bar plot shows the top locations of the audience. The x-axis represents the locations, while the y-axis represents the percentage of the audience. The highest bar, Lagos, indicates that it’s the most common location among the audience, followed by other locations in decreasing order of percentage.
# create a bar plot to visualize top industries
top_industries <- demographics_complete %>%
filter(`Top Demographics` %in% "Industries") %>%
ggplot() +
aes(x = `Top Demographics`, y = Percentage, fill = Value) +
geom_col(position = "dodge2") +
scale_fill_brewer(palette = "Purples", direction = 1) +
labs(title = "Top Industries", fill = "Keys") +
theme_classic() +
theme(plot.title = element_text(size = 16L, face = "bold", hjust = 0.5), axis.title.y = element_text(size = 10L),
axis.title.x = element_text(size = 10L))
top_industries
# create an interactive plot for top industries
ggplotly(top_industries)
The above bar plot shows the top industries of the audience. The x-axis represents the industries, while the y-axis represents the percentage of the audience. The highest bar, IT Services and IT Consulting, indicates that it’s the most common industry among the audience, followed by other locations in decreasing order of percentage.
# create a bar plot to visualize seniority level
seniority_level <- demographics_complete %>%
filter(`Top Demographics` %in% "Seniority") %>%
ggplot() +
aes(x = `Top Demographics`, y = Percentage, fill = Value) +
geom_col(position = "dodge2") +
scale_fill_brewer(palette = "Purples", direction = 1) +
labs(title = "Seniority Level", fill = "Keys") +
theme_classic() +
theme(plot.title = element_text(size = 16L, face = "bold", hjust = 0.5), axis.title.y = element_text(size = 10L),
axis.title.x = element_text(size = 10L))
seniority_level
# create an interactive plot for seniority level
ggplotly(seniority_level)
The above bar plot shows the seniority level of the audience. The x-axis represents the seniority levels, while the y-axis represents the percentage of the audience. The highest bar, Entry level, indicates that it’s the most common seniority level among the audience, followed by other levels in decreasing order of percentage.
# create a bar plot to visualize company size
company_size <- demographics_complete %>%
filter(`Top Demographics` %in% "Company size") %>%
ggplot() +
aes(x = `Top Demographics`, y = Percentage, fill = Value) +
geom_col(position = "dodge2") +
scale_fill_brewer(palette = "Purples", direction = 1) +
labs(title = "Company Size", fill = "Keys") +
theme_classic() +
theme(plot.title = element_text(size = 16L, face = "bold", hjust = 0.5), axis.title.y = element_text(size = 10L),
axis.title.x = element_text(size = 10L))
company_size
# create an interactive plot for company size
ggplotly(company_size)
The above bar plot shows the company size of the audience. The x-axis represents the company size, while the y-axis represents the percentage of the audience. The highest bar, 11-50 employees, indicates that it’s the most common company size among the audience, followed by other sizes in decreasing order of percentage.
Analyzing my LinkedIn performance from May to August 2024, I have gained valuable insights into my audience: predominantly Entry-level Data Analysts in Lagos, working in IT Services and IT Consulting at small to medium-sized companies. While July was the top-performing month and May saw significant new followers growth, inconsistent content performance highlights the need for strategic refinement. With these findings, I can now optimize my content and engagement approach to foster continued growth and connection with my audience.