This is the methodology for www.limpopo-schools.section27.org.za.

South African NGO Section27 http://section27.org.za/ collected data about the state of the sanitation facilities at 86 schools in South Africa’s Limpopo province during the first half of 2018.

Section27’s sanitation data

Section27 found that:

Why is this important?

Plain pit toilets are not allowed in South Africa’s schools. At least four children have died using dangerous pit toilets at their schools. The National Department of Education to ensure that they are removed and that schools are provided with more appropriate forms of sanitation that are listed in the School Infrastructure Norms and Standards Regulations.

library(readr)
library(dplyr)
library(DT)

# Get Dataset 1: Section27 data

S27_schools <- read_csv("Raw Data/FinalS27SanitationTableSep2018ForR.csv")

# How many of those 86 schools have pit toilets?

S27_schools_count <- S27_schools %>% 
  group_by(Pit_Toilets) %>% 
  summarise(total=n()) %>% 
  mutate(percent=total/sum(total)*100)

  datatable(S27_schools_count)
# How many have pit toilets as their only form of sanitation?

S27_pits_only_count <- S27_schools %>% 
  group_by(Only_Pit_Toilets) %>% 
  summarise(total=n()) %>% 
  mutate(percent=total/sum(total)*100)

datatable(S27_pits_only_count)
# List these schools

S27_pits <- S27_schools %>% select(School_Name, Pit_Toilets, Only_Pit_Toilets) %>% 
  filter(Pit_Toilets=="Yes")

datatable(S27_pits)

The Limpopo Department of Education’s sanitation audit

The Limpopo Department of Education (LDE) had to provide a list of all the schools with pit toilets in the province to the High Court in Polokwane as part of the judgement in a case brought by the family of Michael Komape, a child who died in a pit latrine at his school in Limpopo province in 2014.

We compared the 86 Section27 schools with the LDE’s list and found that:

#How many S27 schools with pit toilets are not on the LDE list?
S27_pits_not_on_LDE_list_count <- S27_schools %>% 
  filter(Pit_Toilets=="Yes") %>% 
  group_by(Pit_Toilets, On_LDE_pit_list) %>% 
  summarise(total=n())

datatable (S27_pits_not_on_LDE_list_count)
# Note: The ? in the table above represents a school that we cannot find on the National Department of Basic Education's masterlist of schools or on the LDE's list. 

# How many of these 19 schools had pit toilets only?

S27_pits_only_not_on_LDE_list <- S27_schools %>% 
  select(School_Name, Only_Pit_Toilets, On_LDE_pit_list) %>% 
  filter(Only_Pit_Toilets=="Yes" & On_LDE_pit_list=="No")

datatable(S27_pits_only_not_on_LDE_list)
# List the S27 schools with pit toilets that are not on the LDE'S 31 AUG 2018 list

S27_pits_not_on_LDE_list <- S27_schools %>% 
  select(School_Name, Pit_Toilets, On_LDE_pit_list) %>% 
  filter(Pit_Toilets=="Yes" & On_LDE_pit_list=="No")

datatable(S27_pits_not_on_LDE_list)

Section27 graded the sanitation facilities at each of the 86 schools, according to one of five categories: Blue, Green, Yellow, Orange and Red. Orange are secondary schools with pit toilets, red and primary schools with pit toilets. Blue was for schools with fully acceptable toilets, but no school received this grading.

#Colour coding of 86 S27 schools

S27_schools_colour_codes <- summarise(
  group_by(S27_schools, S27Classification),
  total=n())

datatable(S27_schools_colour_codes)

LDE’s 31 August 2018 list of schools with pit toilets

The Limpopo Department of Education (LDE) listed 1,474 schools with pit toilets in an annexure of an affidavit handed to the High Court.

# This dataset is a combination of the LDE's Pit toilet list (Annexure A - 31 Aug 2018) and a masterlist of all the schools in Limpopo province.
# The list provided by the LDE was a very poor quality pdf from which the data could not be extracted using Adobe Pro's OCR. 
# A copy of the Limpopo school masterlist (Q4 2016, dated March 2017) was downloaded from here: <https://www.education.gov.za/LinkClick.aspx?fileticket=arbR5FK0zZg%3d&tabid=466&portalid=0&mid=7070> 
# A column named "ON_LDE_LIST" was added to the masterlist and those schools that appeared on the LDE's 31 Aug list were manualy marked "Yes", other schools were marked "No". 
# During this process, it was found that a number of schools appeared on the LDE list more than once and that one school was in fact a preschool and therefore had to be excluded. 
  
LP_schools_Pits_Aug2018 <- read_csv("Raw Data/Lim_master_incl_pits_Aug312018.csv")

#Remove space from variable Pit toilets
LP_schools_Pits_Aug2018 <- rename(LP_schools_Pits_Aug2018,
                                  PitToilets="Pit toilets")

#Remove the unnecessary variables.
LP_schools_Pits_Aug2018_trim <- select(LP_schools_Pits_Aug2018, PitToilets, NatEmis, Institution_Name, Phase, GIS_Longitude, GIS_Latitude, EIDistrict, Quintile, NoFeeSchool, Urban_Rural, `Educator_Number 2017`, `Learner_Number 2017`)

# Filter for the schools with pit toilets
LP_schools_Pits_Aug2018_With_Pits <- filter(LP_schools_Pits_Aug2018_trim, PitToilets=="Yes")

CSIR audit data

The Council for Scientific and Industrial Research (CSIR) was commissioned to do an audit of Limpopo’s schools by the Limpopo Department of Education. Section 27 subpoenaed the CSIR to get this information and a spreadsheet containing information about the state of sanitation at schools was included in the documents received.

According to this spreadsheet:

There were 3,909 public ordinary schools in the province 3,023 of them had pit toilets 889 of them had pit toilets only 8 of them had not sanitation facilities on the premises at all.

# Note: Variables not related to sanitation have been removed from the original document and cells containing "NULL" have been replaced with blanks (na).

library(readxl)

LP_CSIR_20160920 <- read_excel("Raw Data/CSIR_basic_info_NORMS_and_GAPs_20160920_sanitation.xlsx")

# Change variables from chars to numbers.

LP_CSIR_20160920$TotalToiletSeats <- as.numeric(LP_CSIR_20160920$TotalToiletSeats)
LP_CSIR_20160920$TotalToiletSeatsPit <- as.numeric(LP_CSIR_20160920$TotalToiletSeatsPit)
LP_CSIR_20160920$TotalToiletSeatsNOTPit <- as.numeric(LP_CSIR_20160920$TotalToiletSeatsNOTPit)

# Filter out unncessary categories and inactive schools

LP_CSIR_type <- group_by(LP_CSIR_20160920, FacilityTypeName) %>%
  summarise(total=n())

LP_CSIR_ordinary_schools <- filter(LP_CSIR_20160920, FacilityTypeName %in% c("COMBINED SCHOOL", "HIGH SCHOOL", "MIDDLE SCHOOL", "PRIMARY SCHOOL", "TECHNICAL SCHOOL") & Inactive=="No")

# How many schools had pit toilets?

LP_CSIR_pit_count <- group_by(LP_CSIR_ordinary_schools, TotalToiletSeatsPit) %>% 
summarise(total=n())

LP_CSIR_pit_toilet_schools <- filter(LP_CSIR_ordinary_schools, TotalToiletSeatsPit>0)

# How many schools had no toilet facilities at all?
LP_CSIR_no_toilets <- filter(LP_CSIR_ordinary_schools, TotalToiletSeats==0)

# 8

#HOW MANY CSIR SCHOOLS HAD PIT TOILETS ONLY?
LP_CSIR_pits_only <- filter(LP_CSIR_ordinary_schools, TotalToiletSeatsNOTPit==0)

LDE Infrastructure Plan 2015 - schools listed in annexure

This dataset was compiled before the CSIR audit and many of the 3,890 schools listed appear to have no information about their sanitation.

# Dataset 4

LP_Schools_EMIS2014 <- read_excel("Raw Data/Pages from LDE Infrustructure Norms and Standards Implementation Plan.xlsx")

# Filter out independent and special needs schools
LP_Public_Schools_EMIS2014 <- filter (LP_Schools_EMIS2014, Sector=="PUBLIC", Phase!="SNE")

# THE EMIS2014 DATASET LISTED SCHOOLS ACCORDING TO WHETHER THEY HAD ACCESS TO SANITATION OR NOT. HOW MANY SCHOOLS REQUIRED SANITATION AND HOW MANY DIDN'T?

LP_Public_Schools_EMIS2014_sanitation <- group_by(LP_Public_Schools_EMIS2014, `Access to Sanitation`) %>%
  summarize(total=n())