DEV Community

Cover image for Analysing 8 Years of Femicide in Kenya with Excel - A Data Story
Nelly Mogere
Nelly Mogere

Posted on

Analysing 8 Years of Femicide in Kenya with Excel - A Data Story

Content Warning: This article discusses femicide, the murder of women and girls. The data covers real cases of gender-based violence. If this is a sensitive topic for you, please take care.


Femicide isn't just a statistic. Every row in the dataset I worked with was someone's daughter, sister, wife, or friend.
When I came across the Femicide in Kenya (2016-2023) dataset on Kaggle, I knew I wanted to do more than scroll through it. I wanted to let the data speak, clearly and loudly. So I built a full analysis pipeline in Excel: cleaning, enriching, analysing, and visualising 507 documented cases over eight years.

This is the story of how I did it, what I found, and why it matters.


Where the Data Came From

The dataset lives on Kaggle and was compiled from multiple verified public sources:

  • Investigative journalism and news media
  • Activist platforms and gender-based violence tracking organisations
  • Social media reports and community alerts

Each row represents one unique femicide case. The columns cover:

Field What it tells us
Date When it was reported
Victim Name / Age Who was targeted
County / Town Where it happened
Suspect Relationship Who did it
Type of Femicide Intimate or Non-intimate
Mode of Killing How it was done
Murder Scene Where specifically
Case / Court Status What happened legally

Before I could analyse any of this, though, the data needed serious cleaning.


Cleaning the Data in Excel Power Query

I loaded the raw file into Excel's Power Query Editor, my go-to for structured, repeatable data transformations. Here's the exact cleaning process I followed, step by step.

Step 1: Remove Duplicates

The first thing I always do. Removed all duplicate rows upfront so every case was counted once and only once.

Step 2: Standardise the Author Name Column

The author names had inconsistent casing, some all caps, some all lowercase. I applied the PROPER function to fix this, so JOHN DOE and john doe both become John Doe.

Step 3: Clean the Medium (News Source) Column

  • Replaced all null and empty values with "Not Provided".
  • Removed the (Kenya) suffix that was appended to source names. Since every entry is already Kenya-specific, this was just visual clutter making filters messy.

Step 4: Fix the Type of Murder Column

This one was subtle but important. The column had both femicide and Femicide as separate values - Excel treats them as distinct, which would split my pivot counts in two. I standardised everything to Femicide.

Step 5: Clean the Victim Name Column

Some entries had "unnamed" as the victim's name, others were blank. Both were replaced with "Not Provided" for consistency.

Step 6: Fix the Suspect Relationship Column

Two entries had trailing noise:

  • Stranger had "/Unknown relationship" appended - redundant. Removed it.
  • Friend had "/known to the victim" appended - also redundant. Removed it.

These kinds of notes make sense in a notes field, not in a category column you'll filter on.

Step 7: Fill Remaining Nulls Across Text Columns

A blanket step - replaced all remaining null and empty cells in text columns with "Not Provided". This ensures no blank filter entries appear in pivot slicers.

Step 8: Apply PROPER to More Columns

Repeated the PROPER text function across other columns (county names, relationship types, etc.) to prevent capitalisation variants from appearing as duplicate filter options.


Data Enrichment - Adding a Region Column

Once the data was clean, I needed to go one level higher than county for geographic analysis. Kenya has 47 counties - grouping them into the 8 administrative regions would give cleaner, more readable charts.

I built a separate Mapping sheet with each county mapped to its region, then used this XLOOKUP to create a new Region column:

=XLOOKUP(U2, Mapping!$A$2:$A$48, Mapping!$B$2:$B$48, "Unknown County")
Enter fullscreen mode Exit fullscreen mode

This had a bonus effect: it doubled as a spell-checker for county names. Any misspelled county would return "Unknown County" - which flagged it for correction in the source data. A clean, self-validating approach.


Building the Dashboard

With clean, enriched data, I built Pivot Tables for every question I wanted to answer, then assembled everything into a single interactive Excel dashboard with slicers for filtering by county, region, murder scene, relationship type, and more.

Here's what the final dashboard looked like:

Femicide Cases in Kenya Dashboard


The Numbers at a Glance

KPI Value
Total Cases 507
Most Affected County Nairobi
Counties Affected 45 out of 47
Intimate Partner Cases 83%
Most Vulnerable Age Range 26-36 years
Minor Victims 20
Most Common Method Stabbing
Most Common Scene Home

What the Data Revealed

1. The Home Is the Most Dangerous Place

This was the finding that hit hardest. The majority of femicide victims were killed at home, not on the streets, not in unknown locations, at home.

We talk about home as a place of safety. The data dismantles that assumption.

2. 83% of Cases Involved Intimate Partners

Boyfriends. Husbands. Ex-partners.

8 in 10 femicide cases in this dataset were committed by someone the victim was in, or had been in, a relationship with. Intimate partner violence isn't just a contributor to femicide in Kenya. It is, overwhelmingly, the cause.

3. The Most Targeted Age Group Is 26-36

These are women in the prime of their adult lives, building careers, raising families, living independently. The data shows they are the most at-risk group.

Twenty victims were minors. Twenty children.

4. Stabbing and Strangulation Dominate

The two most recorded methods of killing were stabbing and strangulation. Both require physical proximity. This is not random or opportunistic violence - it is violence by someone close to the victim, in spaces familiar to her.

5. This Is a National Crisis, Not a Nairobi Story

Yes, Nairobi had the highest case count. But 45 of Kenya's 47 counties recorded at least one femicide case in this dataset. The geographic spread is a clear signal: this is a nationwide systemic problem.

6. The Justice System Is Failing These Women

When I looked at the court verdict breakdown, the majority of cases never reached a guilty verdict. Many were ongoing. Some suspects were never brought to trial at all. The impunity is visible in the data.

7. Arguments Over Food

I'll be honest, this stopped me in my tracks. Going through case descriptions, several murders were triggered by domestic arguments. One recurring trigger: food.

Arguments over food. Women losing their lives over arguments about food.

That's not just a data point. That's a reflection of what happens when control, anger, and access to violence exist in the same home.


Why I Built This

I'm a data analyst. My tools are spreadsheets, formulas, and charts. But tools don't choose what they illuminate, we do.

I chose to work on this dataset because the story it tells is important, and because too often data on gender-based violence gets buried in PDFs or left uncleaned on data platforms. I wanted to take it out of the raw and make it readable, visual, and undeniable.

If you're a researcher, journalist, policymaker, or just someone who cares, I hope this analysis gives you something useful.


Tools I Used

  • Microsoft Excel - Power Query for cleaning, XLOOKUP for enrichment, Pivot Tables for aggregation, Charts for visualisation, Dashboard for presentation

That's it. No Python. No SQL. No Power BI. Just Excel used thoughtfully and thoroughly.


Access the Files

The full project, including the raw dataset, cleaned file, and dashboard, is on GitHub:

(https://github.com/pinkleather221/kenya-femicide-analysis.git)


Final Note

Behind every row in this dataset is a name. A face. A life that was ended by violence that could have been prevented.

If this analysis can contribute, even a small amount, to better policy, stronger advocacy, or clearer public understanding of the femicide crisis in Kenya, then it was worth building.


If you found this useful or have questions about the methodology, drop a comment below. And if you're working on similar social impact data projects, I'd love to connect.


Top comments (0)