Skip to content

Sandrakimiring/Mpesa_statement_analysis

Repository files navigation

M-Pesa Statements Analysis

Preview

This project analyzes M-Pesa transaction data from July 2023 to July 2024. The dataset was generated by Safaricom (accessible by dialing *334#) and provides a detailed breakdown of financial transactions, including:

  1. Receipt Number
  2. Completion Time
  3. Transaction Details
  4. Transaction Status
  5. Amount Paid In
  6. Amount Withdrawn
  7. Balance

Overview

This repository contains a comprehensive analysis of M-Pesa transaction data, offering insights into personal financial habits over a one-year period. The data was carefully cleaned, processed, and visualized to uncover trends in spending, income, savings, and overall financial health.

Data Source

The dataset was sourced directly from Safaricom by dialing *334# and was initially provided in PDF format. The PDF was then converted into an Excel file for further analysis.

Tools Used

  • Excel:

    • Converted the PDF data into Excel format using I Love PDF.

    • Consolidated data from multiple sheets into a single, unified dataset.

    • Cleaned the dataset by removing unnecessary columns (e.g., "Receipt No." and "Completion Time") to focus on key financial details.

    • Transformed the data from its raw format to a structured format, ready for analysis: from this: screenshot 1

      to this:

    Screenshot 2024-08-05 174540
  • Power BI:

    • Utilized Power BI for in-depth analysis and visualization, creating dashboards that provide a clear view of spending patterns, income sources, and balance trends.
    • To create an interactive dashboardimage

Data Cleaning

The data cleaning process involved the following steps:

  1. Handling Redundant Columns:

    • Removed columns such as "Receipt No." and "Completion Time" that were not necessary for the financial analysis.
  2. Data Formatting:

    • Ensured all data was correctly formatted, particularly dates and transaction amounts, to facilitate accurate analysis.
  3. Final Dataset Preparation:

    • Prepared the cleaned dataset for analysis by ensuring consistency across all entries and correcting any anomalies.

Exploratory Data Analysis (EDA)

Overview

The exploratory data analysis (EDA) provided insights into various aspects of the financial data, helping to answer questions such as:

  • What are the major spending categories?
  • How does the balance change over time?
  • Which months have the highest income or expenses?

Summary Statistics

  • Descriptive Statistics: Calculated the mean, median, and total amounts for income and expenditures across different months.
  • Transaction Categories: Identified and categorized transactions to determine spending patterns and income sources.

Data Visualization

Category-wise Spending Analysis

image
  • The analysis showed that the majority of spending was on personal expenditures, with the least spent on transport.

Balance Over Time

image
  • The highest balance was recorded in January 2024, while the lowest balance was in March 2024.

Highest Spending Month

image
  • December 2023 saw the highest spending, which corresponded with the highest income for the year.

Savings Analysis

image
  • The largest savings were accumulated in December 2023.

Trends and Patterns

  • High Spending Months: December 2023 was identified as the month with the highest expenditures, driven largely by personal and holiday-related spending.
  • Income Sources: 70% of income was derived from family contributions, with the remaining 30% from other sources such as money deposits.
  • Savings Analysis: Significant savings were made in December 2023, highlighting a period of financial discipline following a high-income month.

Insights

  • Spending Behavior: The analysis revealed a strong correlation between high income and increased spending in December 2023, suggesting a trend of spending based on available funds.
  • Balance Trends: The fluctuating balance over the year provided insights into cash flow management, with notable peaks and troughs that align with major life events or financial decisions.
  • Income Diversity: The reliance on family for 70% of income suggests potential areas for diversifying income sources to achieve greater financial independence.

Conclusion

The M-Pesa transaction analysis from July 2023 to July 2024 offers a detailed look into personal financial management, highlighting key spending habits and income sources. The insights gained can inform future financial decisions, helping to manage expenditures better and optimize savings.

Future Work

Future analysis could explore:

  • Deeper Spending Categorization: Breaking down spending into more granular categories to identify specific areas of overspending.
  • Year-over-Year Comparison: Analyzing trends over multiple years to assess financial growth or areas of concern.
  • Predictive Analysis: Using historical data to forecast future spending and balance trends.

Usage Instructions

  1. Clone the repository:
    git clone https://github.com/Sandrakimiring/mpesa-statements-analysis.git

About

mpesa statments analysis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors