library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(lubridate)
Data Loading and Cleaning
data <- read.csv("member_data_uga.csv", stringsAsFactors = FALSE)
data <- data %>%
filter(Title != "#activity+title") %>%
mutate(Date = ymd(Date),
Year = year(Date))
Summary Statistics
summary(data)
## Title Member.Organization Date Countries
## Length:7 Length:7 Min. :2020-10-07 Mode:logical
## Class :character Class :character 1st Qu.:2021-08-09 NA's:7
## Mode :character Mode :character Median :2021-12-08
## Mean :2022-01-08
## 3rd Qu.:2022-06-11
## Max. :2023-05-09
## Summary Content Topics Working.Groups
## Length:7 Length:7 Length:7 Length:7
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## Sectors Funding.Type Other.Tags Author
## Length:7 Length:7 Length:7 Length:7
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## Status iso3 Year
## Length:7 Length:7 Min. :2020
## Class :character Class :character 1st Qu.:2021
## Mode :character Mode :character Median :2021
## Mean :2021
## 3rd Qu.:2022
## Max. :2023
Analysis by Funding Type
funding_type_count <- data %>%
count("Funding Type") %>%
arrange(desc(n))
print(funding_type_count)
## "Funding Type" n
## 1 Funding Type 7
ggplot(funding_type_count, aes(x = reorder("Funding Type", -n), y = n)) +
geom_bar(stat = "identity", fill = "skyblue") +
theme_minimal() +
labs(title = "Activities by Funding Type",
x = "Funding Type",
y = "Count") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))

Analysis by Sector
sector_count <- data %>%
separate_rows(Sectors, sep = ", ") %>%
count(Sectors) %>%
arrange(desc(n))
print(sector_count)
## # A tibble: 15 × 2
## Sectors n
## <chr> <int>
## 1 Agriculture 2
## 2 Education 2
## 3 Local Economic Development 2
## 4 COVID-19 Response 1
## 5 Civil Society & Advocacy 1
## 6 Conflict Mitigation 1
## 7 Environment 1
## 8 Family Planning and Reproductive Health 1
## 9 Financial Sector 1
## 10 Global Health 1
## 11 Maternal and Child Health 1
## 12 Protection 1
## 13 Reconciliation & Peacebuilding 1
## 14 Sanitation & Hygiene (WASH) 1
## 15 Water 1
ggplot(sector_count, aes(x = reorder(Sectors, -n), y = n)) +
geom_bar(stat = "identity", fill = "lightgreen") +
theme_minimal() +
labs(title = "Activities by Sector",
x = "Sector",
y = "Count") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))

Analysis by Year
year_count <- data %>%
count(Year) %>%
arrange(desc(n))
print(year_count)
## Year n
## 1 2021 3
## 2 2022 2
## 3 2020 1
## 4 2023 1
ggplot(year_count, aes(x = Year, y = n)) +
geom_bar(stat = "identity", fill = "salmon") +
theme_minimal() +
labs(title = "Activities by Year",
x = "Year",
y = "Count")
