Logo Lanfrica

Jemtai-Stacy/mpesa-transaction-analyzer

Domain:

socioeconomic

Record type:

software
Creator:
Jem
Host:
Python data analysis tool for M-PESA-style mobile money transactions # πŸ“± Mobile Money Transaction Analyzer A Python data analysis tool that processes M-PESA-style mobile money transaction data to uncover personal finance patterns, visualise spending behaviour, and flag anomalous transactions. Built as a portfolio project to demonstrate practical data analysis skills using Python β€” with a focus on financial data relevant to the East African fintech context. --- ## 🎯 What This Project Does | Feature | Description | |---|---| | **Data Cleaning** | Loads and validates raw transaction CSVs, handles missing values and duplicates | | **Financial Summary** | Computes total income, expenses, and net balance across a date range | | **Spending Breakdown** | Categorises outgoing transactions and visualises them with horizontal bar charts | | **Monthly Cash Flow** | Compares income vs. expenses month-over-month with trend line | | **Anomaly Detection** | Flags statistically unusual transactions using Z-score analysis | | **Top Recipients** | Identifies the counterparties receiving the most money | --- ## πŸ› οΈ Tech Stack - **Python 3.10+** - **pandas** β€” data loading, cleaning, grouping, and aggregation - **matplotlib** β€” data visualisation and chart export --- ## πŸš€ Getting Started ### 1. Clone the repository ```bash git clone github.com cd mpesa-transaction-analyzer ``` ### 2. Install dependencies ```bash pip install -r requirements.txt ``` ### 3. Add your transaction data Replace `transactions.csv` with your own M-PESA export, or use the included sample dataset. Your CSV should have these columns: ``` transaction_id, date, type, amount_kes, category, counterparty, status ``` ### 4. Run the analysis ```bash python analyze.py ``` Charts are saved automatically to the `/outputs` folder. --- ## πŸ“Š Sample Output ``` πŸ” Mobile Money Transaction Analyzer βœ… Loaded 60 valid transactions from transactions.csv ================================================== FINANCIAL SUMMARY (KES) === …

Languages