Logo Lanfrica

MilesMaloka/Service-Delivery-Protests-Analysis-ZA-2023-

Domain:

peace and security

Record type:

dataset
Creator:
Mil
Host:
This project documents the Exploratory Data Analysis (EDA) for South African service delivery protests in 2023. # South African Service Delivery Protests Analysis (ZA 2023) ## Project Overview This repository contains an Exploratory Data Analysis (EDA) of service delivery protests in South Africa for the year 2023. The aim is to understand the characteristics, trends, and patterns of these protests to gain insights into the social and political landscape related to service delivery issues. ## Dataset The analysis is based on the `service_delivery_protests_za_2023.csv` dataset, which includes information on: - **Date**: The date of the protest. - **Province**: The province where the protest occurred. - **Municipality**: The municipality involved in the protest. - **Number_of_Protests**: The count of protests in a specific entry. - **Reason_for_Protest**: The underlying reason for the service delivery protest. ## Methodology The EDA was conducted following these steps: ### 1. Initial Data Investigation (PA0101) - Loaded the dataset using pandas. - Checked the total number of rows and columns (`df.shape`). - Previewed the first few rows (`df.head()`). - Identified and quantified missing data (`df.isnull().sum()`). ### 2. Restructure the Dataset (PA0102) - Dropped the 'Unnecessary_ID' column (if present). - Renamed the 'Prov' column to 'Province' for clarity. - Converted the 'Date' column to datetime objects. - Filtered out rows with missing 'Date' or 'Province' values. ### 3. Ensure Integrity of Data (PA0103) - Identified and removed any duplicate rows. - Validated that 'Number_of_Protests' values were non-negative. - Ensured consistency in categorical values ('Province', 'Municipality') by trimming whitespace. ### 4. Find Significant Patterns and Trends (PA0104) - **Monthly Protest Trends**: Visualized the sum of protests over each month of 2023 using a line chart. - **Protests by Province**: Created a bar chart showing the total number of protests in each province, sorted in descending order. - **Heatmap of Protests**: Generated a heatmap to display the distribution of …