How does account ownership differ by gender and education level in the 2024 data?
The data comes from the Global Findex Database 2025. This analysis focuses on the 2024 data in the database.
findex <- read_csv("GlobalFindexDatabase2025.csv", guess_max = 10000)
## Rows: 8577 Columns: 438
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (6): countrynewwb, codewb, regionwb24_hi, incomegroupwb24, group, group2
## dbl (432): year, pop_adult, account_t_d, fiaccount_t_d, mobileaccount_t_d, b...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# Structure
glimpse(findex[, 1:10])
## Rows: 8,577
## Columns: 10
## $ countrynewwb <chr> "Afghanistan", "Albania", "Algeria", "Angola", "Argent…
## $ codewb <chr> "AFG", "ALB", "DZA", "AGO", "ARG", "ARM", "AUS", "AUT"…
## $ year <dbl> 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, …
## $ pop_adult <dbl> 14575546, 2281010, 26251587, 12779501, 30685516, 24570…
## $ regionwb24_hi <chr> "South Asia (excluding high income)", "Europe & Centra…
## $ incomegroupwb24 <chr> "Low income", "Upper middle income", "Lower middle inc…
## $ group <chr> "all", "all", "all", "all", "all", "all", "all", "all"…
## $ group2 <chr> "all", "all", "all", "all", "all", "all", "all", "all"…
## $ account_t_d <dbl> 0.09005012, 0.28268124, 0.33286113, 0.39203542, 0.3313…
## $ fiaccount_t_d <dbl> 0.09005012, 0.28268124, 0.33286113, 0.39203542, 0.3313…
# First 15 column names
names(findex)[1:15]
## [1] "countrynewwb" "codewb" "year"
## [4] "pop_adult" "regionwb24_hi" "incomegroupwb24"
## [7] "group" "group2" "account_t_d"
## [10] "fiaccount_t_d" "mobileaccount_t_d" "borrow_any_t_d"
## [13] "fin4_d" "dig_acc" "fin11_2a"
# Summary statistics for selected columns
summary(findex[, 1:10])
## countrynewwb codewb year pop_adult
## Length :8577 Length :8577 Min. :2011 Min. :2.280e+05
## N.unique : 174 N.unique : 174 1st Qu.:2014 1st Qu.:3.749e+06
## N.blank : 0 N.blank : 0 Median :2017 Median :8.530e+06
## Min.nchar: 4 Min.nchar: 3 Mean :2018 Mean :3.797e+07
## Max.nchar: 50 Max.nchar: 3 3rd Qu.:2022 3rd Qu.:2.577e+07
## Max. :2024 Max. :1.177e+09
## NAs :684
## regionwb24_hi incomegroupwb24 group group2
## Length :8577 Length :8577 Length :8577 Length :8577
## N.unique : 7 N.unique : 4 N.unique : 7 N.unique : 13
## N.blank : 0 N.blank : 0 N.blank : 0 N.blank : 0
## Min.nchar: 11 Min.nchar: 10 Min.nchar: 3 Min.nchar: 3
## Max.nchar: 50 Max.nchar: 19 Max.nchar: 10 Max.nchar: 21
## NAs : 684 NAs : 684
##
## account_t_d fiaccount_t_d
## Min. :0.004049 Min. :0.004049
## 1st Qu.:0.373679 1st Qu.:0.305506
## Median :0.619084 Median :0.573062
## Mean :0.608645 Mean :0.577825
## 3rd Qu.:0.875772 3rd Qu.:0.874565
## Max. :1.000000 Max. :1.000000
## NAs :90 NAs :182
# Find account-related columns
names(findex)[grepl("account", names(findex), ignore.case = TRUE)]
## [1] "account_t_d" "fiaccount_t_d" "mobileaccount_t_d"
# Summary of account ownership
summary(findex$account_t_d)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NAs
## 0.004049 0.373679 0.619084 0.608645 0.875772 1.000000 90
# Gender and education observations
findex %>% filter(group %in% c("gender", "education")) %>% select(countrynewwb, year, group, group2, account_t_d) %>%
head(10)
## # A tibble: 10 × 5
## countrynewwb year group group2 account_t_d
## <chr> <dbl> <chr> <chr> <dbl>
## 1 Albania 2011 gender men 0.337
## 2 Albania 2011 gender women 0.227
## 3 Algeria 2011 gender men 0.461
## 4 Algeria 2011 gender women 0.204
## 5 Angola 2011 gender men 0.395
## 6 Angola 2011 gender women 0.389
## 7 Argentina 2011 gender men 0.346
## 8 Argentina 2011 gender women 0.318
## 9 Armenia 2011 gender men 0.167
## 10 Armenia 2011 gender women 0.181
# Keep gender and education data and remove missing account ownership values
findex_clean <- findex %>% filter(group %in% c("gender", "education")) %>% select(countrynewwb, year, group, group2, account_t_d) %>% filter(!is.na(account_t_d))
head(findex_clean)
## # A tibble: 6 × 5
## countrynewwb year group group2 account_t_d
## <chr> <dbl> <chr> <chr> <dbl>
## 1 Albania 2011 gender men 0.337
## 2 Albania 2011 gender women 0.227
## 3 Algeria 2011 gender men 0.461
## 4 Algeria 2011 gender women 0.204
## 5 Angola 2011 gender men 0.395
## 6 Angola 2011 gender women 0.389
# Count Observations
findex_2024 <- findex_clean %>% filter(year == 2024)
count(findex_2024, group, group2)
## # A tibble: 4 × 3
## group group2 n
## <chr> <chr> <int>
## 1 education prim edu or less 153
## 2 education secondary edu or more 153
## 3 gender men 153
## 4 gender women 153
result_2024 <- findex_2024 %>% group_by(group, group2) %>% summarize(average_account_ownership = mean(account_t_d, na.rm = TRUE), .groups = "drop" ) %>% mutate( average_account_ownership_pct = average_account_ownership * 100)
print(result_2024, width = Inf)
## # A tibble: 4 × 4
## group group2 average_account_ownership
## <chr> <chr> <dbl>
## 1 education prim edu or less 0.597
## 2 education secondary edu or more 0.780
## 3 gender men 0.739
## 4 gender women 0.676
## average_account_ownership_pct
## <dbl>
## 1 59.7
## 2 78.0
## 3 73.9
## 4 67.6
In the 2024 data, the average account ownership rate was 78.0% for people with secondary education or more, compared with 59.7% for people with primary education or less.
In the 2024 data, the average account ownership rate was 73.9% for men, compared with 67.6% for women.
education_2024 <- result_2024%>%
filter(group == "education")
ggplot(education_2024, aes(x = group2, y = average_account_ownership_pct, fill = group2)) + geom_col() + labs( title = "Account Ownership by Education Level, 2024", x = "Education Level", y = "Average Account Ownership (%)" ) + theme_minimal()