<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Newtonsigei on Medium]]></title>
        <description><![CDATA[Stories by Newtonsigei on Medium]]></description>
        <link>https://medium.com/@newtonsigei13105?source=rss-ea2fe0e19637------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Q38qLWv14FSng9DM</url>
            <title>Stories by Newtonsigei on Medium</title>
            <link>https://medium.com/@newtonsigei13105?source=rss-ea2fe0e19637------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 08:29:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@newtonsigei13105/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Mpesa Wrapped:]]></title>
            <link>https://medium.com/@newtonsigei13105/mpesa-wrapped-6f0a32e4ebbf?source=rss-ea2fe0e19637------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f0a32e4ebbf</guid>
            <category><![CDATA[reporting]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Newtonsigei]]></dc:creator>
            <pubDate>Wed, 02 Apr 2025 20:20:24 GMT</pubDate>
            <atom:updated>2025-04-02T20:20:24.620Z</atom:updated>
            <content:encoded><![CDATA[<h4>Transforming Your Financial Data into Meaningful Insights</h4><h3>1. Introduction</h3><p>When was the last time you truly understood where your M-Pesa money went? Not just the big purchases, but every transaction, every pattern, every financial decision that shapes your economic life. For most Kenyans, M-Pesa statements remain cryptic documents — dense with numbers but light on insights. We’re changing that narrative with <strong>Mpesa Wrapped</strong>, a revolutionary tool that transforms your transaction data into a compelling visual journey through your financial habits, much like how Spotify Wrapped captures your year in music. This application doesn’t just show you numbers; it tells the story of your money.</p><h4>Our Team</h4><ul><li><strong>Newton Kiprono</strong> — Project Lead</li><li><strong>Ian Kiprono Moses</strong> — UI/UX Designer</li><li><strong>Alex Maina</strong> — QA engineer &amp; data analyser</li><li><strong>Donald Mbuvi</strong> — Backend Developer</li></ul><p>We have developed this project over a two-month period, starting with an initial concept in January 2025 and launching the first version in March 2025.</p><h3>Who Is It For?</h3><p>Mpesa Wrapped is designed for anyone who uses M-Pesa regularly and wants to gain deeper insights into their spending habits. Whether you’re:</p><ul><li>An individual trying to improve personal financial habits</li><li>A small business owner tracking business expenses</li><li>A financial advisor needing data-driven insights for clients</li></ul><p>Our solution transforms complicated financial statements into easy-to-understand visualizations that reveal spending patterns you might otherwise miss.</p><h3>My Personal Focus</h3><p>As the lead developer on this project, my primary focus was on creating a robust and secure backend infrastructure that could reliably process sensitive financial data. I was particularly invested in the integration between our FastAPI backend and PostgreSQL database, ensuring that all transactions could be efficiently stored and quickly retrieved for analysis.</p><h3>2. Why I Chose This Project: From Viral Tweet to Real Application</h3><p>It all started with a tweet that went viral in December 2024, right when Spotify Wrapped was dominating everyone’s social media feeds. As I was scrolling through Twitter (now X), viewing tweep’s music choices and impressive listening stats, I stumbled upon a tweet that hit close to home:</p><p>“Mpesa Wrapped?’” yeah, this simple tweet had thousands of retweets and comments.</p><p>As an ambitious software developer, something clicked for me. What started as a joke on social media highlighted a real gap in personal finance tools in Kenya. While the original tweet was meant to be funny, the underlying desire for financial clarity was very real.</p><p>What began as a response to a viral joke has become a tool with real purpose — proving once again that sometimes the best ideas start with someone saying “wouldn’t it be funny if…” and someone else saying “actually, let’s do it.”</p><h3>3. Results: From Concept to Functional Application</h3><h3>Architecture Overview</h3><p>Our Mpesa Wrapped application follows a straightforward but effective architecture designed to securely process financial data while delivering insightful visualizations. Here’s how data flows through our system:</p><ol><li><strong>PDF Upload</strong>: Users upload their M-Pesa statement PDFs through the React frontend.</li><li><strong>PDF Processing</strong>: The FastAPI backend receives these PDFs and processes them using PyPDF to extract text content.</li><li><strong>Data Transformation</strong>: The extracted text is converted to CSV format and then cleaned using pandas to normalize transaction data.</li><li><strong>Storage</strong>: Clean transaction data is stored in two places:</li></ol><ul><li>PostgreSQL database for persistent storage and quick retrieval</li><li>JSON files for immediate analysis with pandas</li></ul><p><strong>5. Analysis</strong>: The pandas library analyzes the transaction data to generate insights (top transactions, spending patterns, etc.).</p><p><strong>6. Visualization</strong>: Results are sent back to the React frontend where they’re displayed in a card-based slideshow format.</p><p><strong>7. User Experience</strong>: Users navigate through their financial insights with an auto-slideshow effect similar to the Spotify Wrapped experience.</p><h3>4. A difficult technical challenge I overcame:</h3><p>One of the most challenging tasks was <strong>generating dynamic images to visually represent analyzed transaction data</strong>. Since the application aimed to deliver an experience similar to <strong>Spotify Wrapped</strong>, I needed a way to convert JSON-based transaction analysis into <strong>engaging, shareable images</strong> summarizing users’ financial habits.</p><p>The challenge stemmed from <strong>dynamically rendering data into aesthetically pleasing images</strong> while maintaining flexibility across different transaction patterns. Simply overlaying text on static templates wouldn’t work because each user had unique spending trends, requiring the layout to <strong>adjust dynamically based on data length, font size, and image dimensions</strong>.</p><p>To tackle this:</p><ol><li><strong>Used PIL (Python Imaging Library) and Matplotlib</strong> to generate visual reports directly from the cleaned JSON transaction data.</li><li><strong>Created reusable templates</strong> where elements like top transactions, total spending, and most frequent payments would be dynamically positioned.</li><li><strong>Implemented auto-scaling for text and charts</strong>, ensuring labels remained readable regardless of data size.</li></ol><p>After multiple iterations, I successfully automated the creation of <strong>high-quality, personalized images</strong>, making Mpesa Wrapped a <strong>visually appealing and shareable experience for users</strong>.</p><h3>5. What i have learnt:</h3><p>This project taught me the importance of <strong>clean data, scalable processing, and dynamic image generation</strong>. I initially underestimated the complexity of structuring transaction data for analysis and creating shareable visuals, but I learned that <strong>well-organized data is the key to meaningful insights</strong>. Generating images dynamically required handling variable-length content, auto-scaling fonts, and ensuring visual consistency, which deepened my understanding of <strong>PIL and Matplotlib</strong>. If I were to do things differently, I would implement <strong>caching and batch processing earlier</strong> to improve performance. This experience reinforced my interest in <strong>data visualization, automation, and system optimization</strong>, shaping my approach to building efficient, user-friendly applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f0a32e4ebbf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>