library(tidyverse)
library(here)index.qmd
Introduction
This data was obtained from https://www.waterpointdata.org/2021/11/09/global-water-challenge-announces-the-development-of-whdx-an-open-data-exchange-to-improve-wash-in-healthcare-facilities/
under the aquaya waterTracs program.
private information such as ids were removed. in the dictionary file you will fing important cariables that may need some interpretation.
PROJECT DESCRIPTION
To identify the organisations that constructed the different water points
To assess their safety as drinking water points
To identify who manages the water points.
Methods
Involved renaming a few columns as well as mutating some to give specific values. The Na values could not be removed as they would make the results meaningless.
raw_data <- read_csv(here::here("data/raw/CAPSTONE.csv"))raw_data_new <- raw_data |>
rename(year = install_year,
fecal_value = fecal_coliform_value,
fecal_presence = fecal_coliform_presence,
country_id = clean_country_id,
country_name = clean_country_name,
adm1 = clean_adm1,
tech = water_tech_clean,
management = management_clean,
status = status_clean
)raw_new_data is the processed folder being used.
raw_data_new # A tibble: 1,000 × 25
row_id source report_date status_id water_source water_tech year
<dbl> <chr> <dttm> <chr> <chr> <chr> <dbl>
1 9063 Water For… 2020-02-19 00:00:00 Yes <NA> Protected… NA
2 9223 Water For… 2005-09-07 00:00:00 No <NA> Protected… NA
3 9376 Water For… 2020-02-20 00:00:00 No <NA> Protected… NA
4 13241 Water For… 2019-03-15 00:00:00 Yes <NA> Protected… NA
5 15068 Water For… 2019-03-19 00:00:00 Yes <NA> Protected… NA
6 19412 Water For… 2005-09-07 00:00:00 Yes <NA> Protected… NA
7 31145 Water For… 2019-03-21 00:00:00 No <NA> Protected… NA
8 32000 Water For… 2020-02-20 00:00:00 Yes <NA> Protected… NA
9 39965 Water Mis… 2013-12-12 00:00:00 Unknown <NA> Electrica… 2012
10 41933 Water Mis… 2013-12-18 00:00:00 Unknown <NA> Electrica… 2008
# ℹ 990 more rows
# ℹ 18 more variables: installer <chr>, fecal_value <lgl>,
# fecal_presence <chr>, activity_id <chr>, country_id <chr>,
# country_name <chr>, adm1 <chr>, water_source_clean <chr>,
# water_source_category <chr>, tech <chr>, `_facility_type` <chr>,
# management <chr>, status <chr>, count <dbl>, updated <dttm>,
# pay_clean <chr>, subjective_quality_clean <chr>, dataset_title <chr>
library(gt)
library(gapminder)Results
Creating tables and figures or graphs showing the relationship between fecal contamination at water points and other factors such as the installer, the country, and the management system.
summary_table_country <- raw_data_new |>
count(country_id, fecal_presence)
summary_table_country |>
gt() |>
fmt_number(columns = c(country_id, fecal_presence),
decimals = 1)| country_id | fecal_presence | n |
|---|---|---|
| GTM | NA | 1 |
| HND | NA | 10 |
| KEN | NA | 1 |
| MEX | NA | 4 |
| UGA | Absent | 1 |
| UGA | Present | 75 |
| UGA | NA | 908 |
?@tbl-country_fecal shows the number of water sources with presence of fecal contamination.
ggplot(summary_table_country, aes(x = country_id, y = n,fill = fecal_presence)) +
geom_col(position = "stack")+
labs(title = "Presence and absence counts in Uganda", x = "Country", y = "number" ) +
theme_minimal()Figure 1 shows a graph with the presence and absence of fecal contamination at water sources.
raw_data_new <- raw_data_new |>
mutate(management = case_when(
management == "Community Management" ~ "CM",
management == "Other" ~ "Ot",
management == "Other Institutional Management" ~ "OIM",
management == "Private Operator/ Delegated Management" ~ "PO/DM",
management == "NA" ~ "NA"
))summary_table_management <- raw_data_new |>
count(management, fecal_presence)
summary_table_management |>
gt() |>
fmt_number(columns = c(management, fecal_presence),
decimals = 1)| management | fecal_presence | n |
|---|---|---|
| CM | NA | 547 |
| OIM | NA | 60 |
| Ot | NA | 11 |
| NA | Absent | 1 |
| NA | Present | 75 |
| NA | NA | 306 |
Table 2 shows the different management systems and the presence of fecal contamination.
ggplot(summary_table_management, aes(x = management, y = n,fill = fecal_presence)) +
geom_col(position = "stack")+
labs(title = "Presence and absence counts in different managements", x = "management system", y = "number" ) +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) Figure 2 shows a graph that depicts results in the table.
summary_table_installer <- raw_data_new |>
count(installer, fecal_presence)
summary_table_installer |>
gt() |>
fmt_number(columns = c(installer, fecal_presence),
decimals = 1)| installer | fecal_presence | n |
|---|---|---|
| Water Mission | NA | 18 |
| World Vision | NA | 13 |
| other | NA | 1 |
| NA | Absent | 1 |
| NA | Present | 75 |
| NA | NA | 892 |
Table 3 shows the fecal presence where different organisations have installed water points.
ggplot(summary_table_installer, aes(x = installer, y = n,fill = fecal_presence)) +
geom_col(position = "stack")+
labs(title = "Presence and absence counts in water sources by different installers", x = "installer", y = "number" ) +
theme_minimal()Figure 3 shows fecal contamination in a graph format.
Conclusions
Fecal contamination in water sources is existent where communities are in chage of managing water sources.
It is also prominent where other organisations that have not been recognised are in charge of constructing water points.
Uganda has been seen to have the highest water sources with fecal contamination and others are unknown.
The study suggested that improving sanitary completion and local environmental hygiene was more important than controlling on-site sanitation in improving the quality of these springs.
References
[@howard2003; @pedley1997; @powell2003]