<?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 Anuhi Mustapha on Medium]]></title>
        <description><![CDATA[Stories by Anuhi Mustapha on Medium]]></description>
        <link>https://medium.com/@helloanuhi?source=rss-e3cec1de8d75------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-f-V_cbzsdq7JRALQ4EMQw.jpeg</url>
            <title>Stories by Anuhi Mustapha on Medium</title>
            <link>https://medium.com/@helloanuhi?source=rss-e3cec1de8d75------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 16:04:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@helloanuhi/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[Operation Threshold: Debt-Burden Risk & First-Payment Default Analysis]]></title>
            <link>https://medium.com/@helloanuhi/operation-threshold-debt-burden-risk-first-payment-default-analysis-08869f9852d3?source=rss-e3cec1de8d75------2</link>
            <guid isPermaLink="false">https://medium.com/p/08869f9852d3</guid>
            <category><![CDATA[loan-default]]></category>
            <category><![CDATA[excel-analysis]]></category>
            <category><![CDATA[credit-score]]></category>
            <category><![CDATA[financial-analytics]]></category>
            <category><![CDATA[excel-dashboard]]></category>
            <dc:creator><![CDATA[Anuhi Mustapha]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 14:49:08 GMT</pubDate>
            <atom:updated>2026-11-13T14:49:08.806Z</atom:updated>
            <content:encoded><![CDATA[<h4>Does the size of a loan, measured against income, predict who defaults? I cleaned and modelled 20,000 loans in Excel to find out.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5P7auyW4wHXWE5EOAqMOWA.png" /><figcaption>Default rate rises eight times faster with debt burden than with any other underwriting signal</figcaption></figure><blockquote><strong>Disclaimer:</strong> Vantage Trust Bank does not exist. Every borrower, branch, and loan officer named in this piece is a synthetic name attached to simulated data that simulates a real-life work scenario for a personal analytics case study project. Every figure in this article is real in the sense that I calculated it correctly from data. Nothing else about it is real. Think of it as a flight simulator for credit risk analytics: the instruments work, the sky doesn’t exist.</blockquote><h4>The Bank Story</h4><p>Vantage Trust Bank operates 10 branches, offering Personal, SME, Auto, and Mortgage loans to retail and small business customers through a network of 40 loan officers. The credit team approves loans primarily on credit score and income verification, but has never systematically checked whether loan size relative to income predicts repayment failure.</p><blockquote><a href="https://github.com/anuhimustee/Operation-Threshold-Analysis-Credit-Risk-Division"><strong>Read the full story here…</strong></a></blockquote><p><strong>The question nobody had actually answered</strong></p><p><em>“We’re approving loans on credit score and income verification, but nobody has checked whether size-of-loan-versus-income is quietly doing more damage than either. I don’t want a guess. I want a number.” </em><strong>Head of Credit Risk</strong></p><p>It’s a fair complaint, fictional or not. Most retail lending underwriting sit hard on two signals: does this person’s credit history look clean, and can they prove the income they say they earn. Both are useful. Neither one directly asks the question that actually determines whether a loan gets repaid, which is: relative to what this person earns, how big is the debt we just handed them?</p><h3>Finding 1: Debt Burden is the signal, not Credit Score</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*hUYhVy-9eYE5_AbsfDYgwg.png" /><figcaption><em>The four numbers the credit risk team started with.</em></figcaption></figure><p>Across the portfolio, default rate climbs from 5.48% for borrowers in the Low debt-to-income band to 43.50% for borrowers in the Severe band. That’s an 8x jump rise! That’s crazy! and it dwarfs every other variable I tested.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*BeQHbSNctWjX9O7GXQGI8g.png" /><figcaption><em>Default rate peaks in Severe. Money at risk peaks in High. They’re not the same band.</em></figcaption></figure><p>What convinced me this wasn’t a fluke of how I’d sliced the data: the numbers reconcile. Add up the portfolio value at risk in each of the four Debt-To-Income (DTI) bands, <strong>£7.31 million </strong>in Low, <strong>£18.56 million</strong> in Moderate, <strong>£33.57 million</strong> in High, <strong>£28.09 million</strong> in Severe, and it sums to exactly £87,532,900, which is the same figure the top-line portfolio summary produces independently…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*Y-3sPixPYb1P_ZNfbzsrVg.png" /></figure><p>The same story reveal itself when we look at the number of loans : <strong>10,272</strong> defaults in Low, <strong>5,685</strong> in Moderate, <strong>3,112 </strong>in High, and <strong>931</strong> in Severe adds up to <strong>2,446</strong>, the portfolio’s total default count, to the loan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*gTEFUvCwQpu7iGm_xpra4w.png" /></figure><p>There’s a wrinkle worth sitting with, though. The Severe band has the worst odds, but it isn’t where the most money is on the line. That title goes to the High band: <strong>£33.57 million</strong> at risk, against <strong>£28.09 million</strong> in Severe, because there are simply more High-DTI loans outstanding (3,112 of them, versus <strong>931</strong> in Severe).</p><h3>Finding Two: A missed first payment is just a coin flip, not a red flag</h3><p><strong><em>1,502 of the 20,000 loans</em></strong> missed their very first scheduled payment, a 7.51% first-payment-default rate. My assumption going in was that this would be close to a death sentence for a loan. It isn’t. <strong>63</strong>% of those loans went on to repay completely normally afterward, with no further defaults at all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*IY3ajOZ8WmlgBtFWcSbmEA.png" /><figcaption>7.51% first-payment-default rate represents 1,502 of 20,000 loans</figcaption></figure><p>That’s a genuinely useful, slightly counterintuitive finding, because it changes what a missed first payment should trigger. If this is treated as a hard risk flag, the bank is misclassifying the majority of the borrowers it catches. But if this is treated as a prompt for a phone call, a check-in, an early nudge, it’s used for exactly what it’s good at: catching a problem early enough to fix it, in the roughly one-third of cases where there actually is one.</p><h3>Finding Three: The Credit-Score Mirage</h3><p>I realized that once a loan crosses into the Severe DTI band, credit score stops doing its job. Fair-credit borrowers default at <strong>45.27%</strong> at that debt level. Poor-credit borrowers default at <strong>43.44%</strong>. Borrowers with no usable credit history on file default at<strong> 44.44%</strong>. Three tiers of borrower that would be priced completely differently under a normal underwriting model, converging to within two percentage points of each other.</p><p>I left Excellent and Good credit tiers out of that comparison on purpose. Almost no borrower with strong credit ever ends up carrying a severe debt load in this portfolio (the Excellent tier has exactly one loan in the Severe band), which is itself sort of the point: good credit tends to come with the financial habits that keep debt-to-income low in the first place. But for the borrowers who do slip through with a heavy debt burden regardless of what their credit file says, the score stops telling you anything useful. The loan’s size relative to income has effectively overridden it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NEie8NTOeppdXCnTlLnWIQ.png" /></figure><h3>Finding Four: Most defaults are a slow bleed, not a cliff edge</h3><p>I split defaults into “immediate” (the loan fails right out of the gate) and “gradual” (it deteriorates over time) and expected debt burden to make that split more dramatic. It doesn’t, much. Across every DTI band, <strong>75 to 80%</strong> of defaults are gradual. Even in the Severe band, where you’d expect a loan to just collapse, <strong>75.56%</strong> of failures are still a slow slide rather than an immediate one, only slightly higher than the <strong>79.40%</strong> gradual share in the Low band.</p><p>There’s a real effect here, immediate failure does get somewhat more common as debt burden rises, but it’s a small one, not the dramatic pattern I went in expecting. Practically, it means an early-warning system built around trend lines (payment history drifting worse over several months) is going to catch far more trouble than one built around any single missed payment, at every debt level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*HBgaZA3iBtqzcVZI8eluFw.png" /><figcaption>75 to 80% of defaults are gradual</figcaption></figure><h3>Finding Five: Where the portfolio actually bleeds money</h3><p>SME loans default at <strong>17.21%</strong>, the highest of the four loan categories, and account for <strong>24.84%</strong> of the portfolio’s total value at risk despite being smaller by loan count than personal or auto lending.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*VQt500XU08907hfdZIatlg.png" /></figure><p>Two branches run consistently hotter than the rest of the network:<strong> Manchester at 16.80%</strong> and <strong>Newcastle at 15.82%</strong>, against a cluster of 11 to 13% everywhere else.</p><p>Worth flagging honestly: Manchester and Newcastle are also two of the smallest branches in the portfolio,<strong> 500 and 986 loans </strong>respectively, against <strong>4,577 in Liverpool</strong> or <strong>3,098 in Birmingham</strong>. A gap that size on a smaller book deserves a closer look before it gets treated as a verdict on the branch itself. That’s exactly why this finding sits in the “worth investigating” tier rather than the “act on this immediately” tier the debt-burden finding earned. Not every pattern that shows up in a sorted table is telling you the same kind of truth, which brings me to the best example of that in the whole project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*8t6m6jdpggpUSrGcah8Ayg.png" /><figcaption><em>Two branches, two of the smallest loan books in the network.</em></figcaption></figure><h3>The Twist: A Leaderboard that wasn’t real</h3><p>Here’s a table that looks damning at first glance. Sort the loan officers by their share of immediate (versus gradual) defaults, and Kofi Rahman sits at the top of the list with <strong>38.98%</strong>, worst in the group. Jack Patel sits at the bottom with <strong>28.00%</strong>, best in the group. It’s the kind of table that, in a real organization, ends up in someone’s performance review.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*Co85KbpOZwUxbH-HWNf4kQ.png" /></figure><p>Here’s the detail that should stop anyone from using it that way: sort those same ten officers by overall default rate instead, and the ranking scrambles completely. <strong>Jack Patel</strong>, who looked like the star on the first metric, actually has the lowest overall default rate of the group at <strong>8.99%</strong>. <strong>Kofi Rahman</strong>, who looked worst, lands in the middle of the pack at <strong>12.27%</strong>, while Emily Hussain, who wasn’t near the top of the first ranking, has the highest overall default rate at <strong>12.47%</strong>. Depending on which column you sort by, a different person is “the worst officer.”</p><blockquote><strong>Not clear decision metrics to consider</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*jnzX2wIBccw3YNgu8Cf7dg.png" /></figure><p>This is the part of the project I keep coming back to. Nothing about that first table is fabricated or wrong. Every number in it is accurate. It’s also almost entirely meaningless, and it would have been trivial to act on it anyway if nobody had bothered to run the test.</p><h3>What the bank should actually do</h3><ul><li>Tighten approval standards above roughly <strong>35%</strong> debt-to-income, the boundary where the High and Severe bands meet and where both default risk and dollar exposure concentrate.</li><li>Treat debt-to-income as the primary risk signal once a loan is large relative to income, not credit score alone, since score stops discriminating risk exactly where it matters most.</li><li>Use a missed first payment to trigger early borrower contact, not an automatic high-risk flag. Two out of three of those loans are going to be fine.</li><li>Give SME applications and the Manchester and Newcastle branches a closer look, without treating either as a confirmed problem yet.</li><li>Leave the loan officer rankings out of performance conversations entirely. Thirty-seven of forty officers are statistically indistinguishable from the portfolio average, and a sorted list will always manufacture a top and bottom regardless.</li></ul><h3>What this project taught me</h3><p>I came into this expecting the credit-score story and the officer-ranking story to be the interesting parts, and they turned out to be the traps. The genuinely useful finding, that loan size relative to income beats every other underwriting signal by a wide margin, was sitting in a pivot table the whole time, waiting for someone to build the cross-tab and check whether the numbers reconciled.</p><p><em>Check out the full analysis</em> <a href="https://github.com/anuhimustee/Operation-Threshold-Analysis-Credit-Risk-Division"><strong>here:</strong></a></p><p><a href="https://github.com/anuhimustee/Operation-Threshold-Analysis-Credit-Risk-Division">GitHub - anuhimustee/Operation-Threshold-Analysis-Credit-Risk-Division: One Statement from the Head of Credit Risk set the tone running... &quot;We&#39;re approving loans on credit score and income verification, but nobody has checked whether size-of-loan versus- income is quietly doing more damage than either. I don&#39;t want a guess. I want a number.&quot;</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=08869f9852d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Operation Last Mile Analysis: Diagnosing a €4.2M Delivery Crisis with SQL]]></title>
            <link>https://medium.com/@helloanuhi/operation-last-mile-analysis-diagnosing-a-4-2m-delivery-crisis-with-sql-c892fb783989?source=rss-e3cec1de8d75------2</link>
            <guid isPermaLink="false">https://medium.com/p/c892fb783989</guid>
            <category><![CDATA[supply-chain-analytics]]></category>
            <category><![CDATA[sql-analysis]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[logistics-analytics]]></category>
            <dc:creator><![CDATA[Anuhi Mustapha]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 11:04:49 GMT</pubDate>
            <atom:updated>2026-11-12T11:04:49.437Z</atom:updated>
            <content:encoded><![CDATA[<h3>Operation Last Mile: Diagnosing a €4.2M Delivery Crisis with SQL</h3><h4>Four Executives, Four Theories, One €4.2M Contract</h4><p><em>A yes/no column explained more than a boardroom full of opinions. Here is how I used SQL to find it in 15,000 shipments.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OPVkAdqmIo1vgnLul2UGdA.png" /><figcaption>Operation Last Mile</figcaption></figure><p>The biggest client had just sent a formal breach notice. <strong>€4.2 million a year</strong> was about to walk out the door.</p><p>In the room, four senior leaders each had a confident explanation for why deliveries were failing. Bad drivers. Unready stock. Two troublesome cities. Pricing games. None of them had looked at the data.</p><p>I did. The answer came down to one column, stock_ready_flag. When stock wasn&#39;t ready at dispatch, on-time delivery collapsed from <strong>74.5% to 47.4%</strong>. That is a 27-point drop from a single variable.</p><p>This is the story of how I got there, what the data said about each theory, and what I’d tell the COO to do on Monday morning.</p><blockquote><strong><em>Note:</em></strong><em> </em><strong>Simulated Case Study.</strong> This project is based on <em>Operation Last Mile</em>, a Case Study from DWD Academy. Corridex Logistics, its clients, staff and the brief are simulated to mimick real world problem in the Logistics and Transportation Industry, and the dataset is synthetic. Any resemblance to real organisations or people is coincidental. The SQL, analysis, and recommendations are my own work. The Dataset might be synthetic, but the problem, analytical and technical reasoning, and decision is real and true!!!</blockquote><h3>The setup: a contract on a two-quarter clock</h3><p>Corridex is a pan-European freight company with 5 warehouses (Amsterdam, Berlin, Madrid, Warsaw, Lyon), 15 routes, 20 drivers and 12 clients. Every client contract promises an <strong>85% on-time delivery rate</strong>.</p><p>Hartwell Group, the largest client at roughly 23% of volume, audited its shipments and found Corridex far below that line. It invoked Clause 14.3: get above 85% for two consecutive quarters, or the contract ends.</p><p>The COO wanted to know exactly where the operation was failing and which levers to pull first. Four stakeholders already had answers:</p><ul><li><strong>Operations Manager:</strong> “It’s specific drivers and high-risk routes. A small group causes most delays.”</li><li><strong>Warehouse Head:</strong> “Stock isn’t ready when shipments are scheduled. We lose hours before a vehicle even leaves.”</li><li><strong>Regional Director:</strong> “It’s one or two city pairs. Fix those routes and the SLA recovers.”</li><li><strong>Finance Director:</strong> “Standard shipments are being deprioritised to protect Express and Critical margins. It’s a pricing problem.”</li></ul><p>My brief was simple: don’t confirm what anyone believes. Find what the data actually says.</p><h3>How I approached it: build the foundation once, query it everywhere</h3><p>The data came as a star schema in SQL Server: one fact table (fact_shipments, one row per shipment) and five dimensions for customers, drivers, routes, warehouses and dates.</p><p>Before writing any analysis, I explored the basics. How many rows? Which delivery statuses exist, and in what share? What date range am I working with? Knowing the grain of the data saves you from confident wrong answers later.</p><p>Then I made the decision that shaped the whole project. Instead of re-joining six tables in every query, I built <strong>one foundation view</strong> that does the joins once:</p><pre>CREATE OR ALTER VIEW vw_ShipmentDetail AS<br>SELECT<br> -- Shipment identifiers<br>    f.shipment_id,<br>    f.shipment_date,<br>    f.promised_delivery_date,<br>    f.actual_delivery_date,<br>    f.expected_transit_days,<br><br>    -- Delivery outcome<br>    f.delivery_status,<br>    f.delay_days,<br>    f.delivery_attempt_count,<br>    f.failed_delivery_reason,<br>    f.is_returned,<br><br>    -- Shipment attributes<br>    f.shipment_category,<br>    f.shipment_weight_kg,<br>    f.shipment_value_eur,<br>    f.priority_tier,<br><br>    -- Stock &amp; warehouse at dispatch<br>    f.stock_ready_flag,<br>    f.stock_issue_type,<br>    f.warehouse_delay_hours,<br><br>    -- Customer<br>    f.customer_id,<br>    c.customer_name,<br>    c.customer_segment,<br>    c.contract_tier,<br>    c.sla_threshold_days,<br>    c.country                       AS customer_country,<br>    c.city                          AS customer_city,<br><br>    -- Driver<br>    f.driver_id,<br>    d.driver_name,<br>    d.vehicle_type,<br>    d.experience_years,<br>    d.performance_rating,<br>    d.employment_type,<br><br>    -- Route<br>    f.route_id,<br>    r.route_name,<br>    r.origin_city,<br>    r.destination_city,<br>    r.route_type,<br>    r.risk_level                    AS route_risk_level,<br>    r.distance_km,<br>    r.standard_transit_days,<br><br>    -- Warehouse<br>    f.warehouse_id,<br>    w.warehouse_name,<br>    w.city                          AS warehouse_city,<br>    w.region,<br><br>    -- Date dimensions<br>    dt.year,<br>    dt.quarter,<br>    dt.month_number,<br>    dt.month_name,<br>    dt.day_of_week,<br>    dt.is_weekend,<br>    dt.is_public_holiday,<br><br>    -- Derived: on-time flag (1 = on-time, 0 = late or failed)<br>    -- Use this in every aggregation instead of filtering by status<br>    CASE WHEN f.delivery_status = &#39;On-Time&#39; THEN 1 ELSE 0 END AS on_time_flag<br>FROM<br> fact_shipments f<br>INNER JOIN dim_customer   c   ON f.customer_id = c.customer_id<br>INNER JOIN dim_driver     d   ON f.driver_id     = d.driver_id<br>INNER JOIN dim_route      r   ON f.route_id      = r.route_id<br>INNER JOIN dim_warehouse  w   ON f.warehouse_id  = w.warehouse_id<br>INNER JOIN dim_date       dt  ON f.shipment_date = dt.date_id;<br>GO<br><br>SELECT *<br>FROM vw_ShipmentDetail</pre><p>That on_time_flag is the quiet hero. With a 1 or 0 on every row, any on-time rate becomes SUM(on_time_flag) / COUNT(*), grouped by whatever lens I need.</p><p>On top of the foundation, I built one summary view per investigation lens: routes, warehouses, drivers, customers and risk. Each of the six deliverables then became a handful of short, readable queries. The definitions stay consistent everywhere, and anyone can audit the logic in one place.</p><p>Along the way I leaned on window functions (RANK() OVER, SUM(COUNT(*)) OVER() for percent-of-total), CASE logic for banding and flags, and careful casting so averages didn&#39;t silently round to integers.</p><h3>What the data said</h3><h3>1. It’s bad, and it’s getting worse</h3><p>Overall on-time delivery sat at <strong>70.1%</strong>, nearly 15 points below the 85% SLA. Worse, the trend was falling: 74.8% in 2024, 65.3% in 2025, and just 60.8% in Q4 2025.</p><p>Peak season, same driver capacity, same warehouse headcount. Something in the operating model didn’t scale.</p><p>But there was a bright spot. Two clients, Medipharma Europe (85.1%) and Veltrade (85.6%), were already meeting SLA. Both ship only on Berlin-origin domestic routes. The operation <em>could</em> perform. It just wasn’t doing it everywhere.</p><h3>2. Two warehouses can’t get stock ready</h3><p>Amsterdam and Warsaw had stock-issue rates of <strong>24.5% and 25%</strong>. Berlin sat at 6.3%; Lyon and Madrid were under 8%. That is three to four times the problem rate at two specific sites.</p><p>The issue types were split almost evenly: Out of Stock (31.8%), Damaged Goods (33.9%) and Late Supplier (34.3%). No single cause dominated. That points to a broad execution failure in receiving, storage and supplier management, not one upstream fix.</p><p>Then came the connection that changed the story. All 3,389 of Hartwell Group’s shipments run through Amsterdam. Their 62% on-time rate isn’t a client problem. It’s an Amsterdam problem that lands entirely on the most valuable contract.</p><h3>3. The wrong vehicles are on the wrong routes</h3><p>Vans on cross-border routes delivered on time just <strong>41%</strong> of the time. Vans on domestic routes managed 67.4%. HGVs on domestic routes hit 84.8%.</p><p>The three worst drivers in the network were all contract Van drivers out of Warsaw, running cross-border routes, with one to two years of experience. Put the wrong vehicle on the wrong route hundreds of times and you get exactly this result. That’s an assignment problem, not a people problem.</p><h3>4. It’s a route type, not a city pair</h3><p>Domestic routes averaged 79.4% on time. Cross-border routes averaged 61.1%, and fell from 66% in 2024 to 56.9% in 2025.</p><p>The worst single route, Warsaw–Madrid, ran at 43.7%. But all nine cross-border routes underperformed. This isn’t about geography. It’s about how cross-border freight is run.</p><h3>5. Hartwell isn’t even the worst-served client</h3><p>Hartwell ranked third worst. Two other clients were getting worse service and hadn’t complained yet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R65s68_sjl38Lmfu14u5wQ.png" /><figcaption>Hartwell isn’t the worst of worst… Two Client came before it</figcaption></figure><p>Hartwell escalated because of its volume and contract value, not because its service was uniquely bad. Polaris and Solano both route heavily through Warsaw. Without change, their breach notices are a matter of time.</p><h3>Scoring the four theories</h3><p>Each stakeholder saw a real piece of the problem. Only one was close to the whole picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZcbPP4HJMkbQZCK4H-qKow.png" /><figcaption>The Truth Behind the Four Claims…</figcaption></figure><h3>From diagnosis to early warning: a delivery risk score</h3><p>Knowing what went wrong is useful. Spotting the next failure before it ships is better. So I turned the findings into a composite risk score for every shipment.</p><p>Each risk factor adds points, weighted by how strongly it showed up in the analysis:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*lCyevFut5kSlPyiZoLik8g.png" /><figcaption>Risk Score Card</figcaption></figure><p>Scores run up to 20. Shipments scoring 10 or more are HIGH RISK, 5–9 are MEDIUM, and below 5 are LOW. The whole score lives in one SQL view, vw_RiskScore, built with layered CASE expressions.</p><p>The payoff showed up at the customer level. Solano Retail had <strong>35.7%</strong> of its shipments in the high-risk tier and Polaris Industries had 30.3%. The two clients meeting SLA had 0%. The score flags the next breach notices before they arrive.</p><p>One honest caveat: the weights are judgment-based, drawn from the analysis rather than fitted by a model. The natural next step is to validate them, for example with a logistic regression on the same features.</p><h3>What I told the COO to do</h3><p>Three actions, in this order.</p><ol><li><strong>Audit Amsterdam and Warsaw warehouse operations within two weeks.</strong> Look at receiving, storage and supplier management, and name an accountable owner at each site. Track stock readiness as a weekly KPI, not a monthly report line. This is the highest-leverage fix in the dataset, and it directly lifts Hartwell’s numbers.</li><li><strong>Take Vans off cross-border routes this week.</strong> It’s a scheduling change, not a hiring change. Vans move to domestic work; Trucks and HGVs take cross-border. It’s the fastest single fix available.</li><li><strong>Brief the Hartwell account team before quarter end.</strong> Not with promises, but with the data, the specific changes underway and a realistic recovery timeline. A client watching numbers fall with no explanation needs a plan more than an apology.</li></ol><p>The most encouraging finding? The 85% target is achievable. Berlin already runs at 83.5% with no special intervention, and two domestic routes sit at 85.5%. The capability exists. It just isn’t applied consistently.</p><h3>What this project taught me</h3><p><strong>Test theories; don’t confirm them.</strong> Every stakeholder was partly right. The value came from testing all four against the same data, side by side.</p><p><strong>Build the foundation before the analysis.</strong> One well-designed view saved me from rewriting the same six-table join twenty times. It also meant every number used the same definition of “on time.”</p><p><strong>Study the winners, not just the losers.</strong> Berlin, Medipharma and Veltrade proved the target was reachable. That turned a gloomy report into a credible recovery plan.</p><p><strong>Separate system problems from people problems.</strong> The worst drivers looked like the problem. The data showed they were set up to fail by how routes were assigned.</p><p>The headline numbers made this look like a company-wide crisis. The data showed something narrower and more fixable: two warehouses and one assignment rule.</p><p>That’s the job of an analyst. Not to have the loudest opinion in the room, but to bring the evidence that settles the argument.</p><p><em>Built with SQL Server (T-SQL): views, window functions and CASE logic. The full SQL script and executive summary are on my GitHub:</em></p><p><a href="https://github.com/anuhimustee/CorridexLogistics-Delivery-Performance-Failure-Supply-Chain-Risk-Investigation-Analysis/tree/main">GitHub - anuhimustee/CorridexLogistics-Delivery-Performance-Failure-Supply-Chain-Risk-Investigation-Analysis: Corridex&#39;s largest client, accounting for 23% of total annual shipment volume issued a formal SLA breach notice following a review of their 2024 shipping data..Their logistics audit recorded a Corridex on-time delivery rate of 68.4% against a contractual SLA threshold of 85% .My goal with this project is to know where this operation is failing,</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c892fb783989" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 8:From UK Milk to Nigerian Cocoa: What Week 8 Taught Me About Analysing Real World Data]]></title>
            <link>https://medium.com/@helloanuhi/week-8-from-uk-milk-to-nigerian-cocoa-what-week-8-taught-me-about-data-fa0d3e8aac80?source=rss-e3cec1de8d75------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa0d3e8aac80</guid>
            <dc:creator><![CDATA[Anuhi Mustapha]]></dc:creator>
            <pubDate>Sun, 01 Nov 2026 20:38:13 GMT</pubDate>
            <atom:updated>2026-11-02T11:58:19.973Z</atom:updated>
            <content:encoded><![CDATA[<h4>How UK milk, Nigerian cocoa, Python Groupby, SQL, and a few silent bugs taught me that code running is not the same as code being correct.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gMubQiCn2WwMpZJ2" /><figcaption>Photo by <a href="https://unsplash.com/@lukechesser?utm_source=medium&amp;utm_medium=referral">Luke Chesser</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Allow me to take you to the market on this one.</p><p>Picture a market woman at the close of business.</p><p>She doesn’t just pour all the day’s money on the table, stare at it, and hope the answer appears.</p><p>She sorts it first.</p><p>₦1,000 notes in one pile. ₦500 notes in another. ₦200 notes somewhere else.</p><p>Then she counts each pile.</p><p>Then, and only then, she writes the total in her small notebook.</p><p><strong>Sort. Count. Write it down.</strong></p><p>Still not making sense?</p><p>Okay, let me try another approach.</p><p>If you have ever prepared a Bill of Quantities and as a Civil Engineering graduate, I have prepared my fair share you don’t price an entire building as one big lump sum.</p><p>You break it down into concrete, reinforcement, blockwork, roofing and everything else. You measure each section, calculate the quantities, create subtotals, and eventually roll everything up into a summary.</p><p>You get the point now?</p><p>Because that, in many ways, is what my Week 8 of this 24-week Data Science, Machine Learning, and Generative AI internship was about.</p><p>In Python, they call it:</p><blockquote>Split. Apply. Combine.</blockquote><p>The market woman has probably been doing it for years without writing a single line of code.</p><h3>Split, Apply, Combine: The Market Woman Was Right All Along</h3><p>When I entered Week 8’s learning cave, one of the first things waiting for me was groupby.</p><p>The idea itself is beautifully simple:</p><p>- <strong>Split</strong> the data into groups.<br>- <strong>Apply</strong> a calculation to each group.<br>- <strong>Combine</strong> the results into something useful.</p><p>You might split your data by country, month or trade flow. Then you could calculate the sum, average, maximum or count for each group.</p><p>And our data for the week?</p><blockquote><strong>Milk.</strong></blockquote><p>Yes. Milk.</p><p>The guided project was <strong>Project 4: Exploring the UK’s Milk Imports and Exports</strong>, using data from the United Nations Comtrade database for January to May 2015.</p><p>For example, to calculate the total value of milk the UK exported versus imported:</p><pre># Total value of milk the UK exported vs imported<br>grouped = milk.groupby([&#39;Trade Flow&#39;])[&#39;Trade Value (US$)&#39;].aggregate(sum)</pre><p>One line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*zf2jhSf1U8F_-g9UaAhgHA.png" /><figcaption>A single line of code that tells more than one story…</figcaption></figure><p>Just one line, and I could see that the UK exported about <strong>US$265 million</strong> worth of milk and cream while importing about <strong>US$156 million</strong>.</p><p>That meant a trade surplus of over <strong>US$100 million</strong>.</p><p>But here’s where the real lesson clicked for me:</p><p><strong>Change what you group by, and you change the question you’re asking.</strong></p><p>Group by trade flow, and you’re asking about imports versus exports.</p><p>Group by partner, and you’re asking who the major trading partners are.</p><p>Ireland, by the way, topped both lists. And on the export side, it wasn’t even close.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*eYZL1V_q286JyPJ_sDzydw.png" /><figcaption>Ireland topping the charts…</figcaption></figure><p>My first proper aha! moment of the week:</p><blockquote><strong>The columns you group by decide the question you’re asking.</strong></blockquote><h3>Then Came `Filter()`: Who are the Regular Customers?</h3><p>Next came `filter()`, which allows you to keep or remove entire groups based on a condition.</p><p>In our analysis, a “regular customer” was defined as a country that bought both types of milk every single month.</p><p>Two products.</p><p>Five months.</p><p>Ten rows.</p><p>So the logic looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*G4bnGriio6VbrIE5PPKuPw.png" /><figcaption>Countries that bought the two products every single month… This is just a snapshot!</figcaption></figure><p>Those regular customers turned out to be responsible for about <strong>75% of the UK’s milk export value.</strong></p><p>Loyal customers, as they say, are the real business.</p><p>And &#39;pivot_table</p><p>Ah, my old friend.</p><p>I have built more PivotTables in Excel than I can count, so seeing the same kind of thinking in Python felt like meeting a familiar face in a new city.</p><p>Different environment.</p><p>Same analytical instinct.</p><h3>From UK Milk to Nigerian Cocoa</h3><p>After completing the guided project, the instruction was clear:</p><p><strong>Now repeat the analysis with your own data.</strong></p><p>So I headed back to the Comtrade website and pulled Nigeria’s monthly <strong>cocoa trade data for 2023.</strong></p><p>I worked with:</p><p>- Cocoa beans (HS 1801)<br>- Cocoa shells and waste (HS 1802)</p><p>And, as expected, the cocoa had stories to tell.</p><p>The <strong>Netherlands</strong> bought about <strong>US$263 million</strong> worth of Nigerian cocoa beans.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Gm5QjepTC4bg4MDTP8-fw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*TdUe5JfOBevVOA05i5Ta_A.png" /><figcaption><strong>Netherlands</strong> sit at the top havin a Trade Value of about <strong>US$263 million</strong> worth of Nigerian cocoa beans.</figcaption></figure><p>But what really caught my attention was the monthly pattern.</p><p>In <strong>January, November and December</strong>, exports were each above US$100 million.</p><p>From <strong>April to Septembe</strong>r, however, every single month was below <strong>US$41 million</strong>.</p><p>That’s the cocoa harvest season showing up right there in the numbers.</p><p>The data was literally telling me when activity was at its busiest.</p><p>And this is one thing I am beginning to enjoy more and more about data analysis.</p><p>Sometimes, the story is already there.</p><p>You just need to group the data properly, ask the right question and pay attention to what the numbers are trying to tell you.</p><h3><strong>Then Came the Charts…</strong></h3><p>Part B of the week took me into data visualisation with <strong>Seaborn</strong> and <strong>Matplotlib.</strong></p><p>The assignment included:</p><p>- A histogram<br>- A KDE plot<br>- Box and violin plots<br>- A regression plot<br>- A heatmap</p><p>I typed my first histogram, ran it with so much confidence and…</p><p>One tall bar at zero.</p><p>A few lonely dots scattered far, far to the right.</p><p>I stared at it.</p><p>The chart stared back.</p><p>Why?</p><p>The answer was hiding in the scale of the data.</p><p>The milk trade values ranged from as little as <strong>US$191</strong> for Bulgaria in one month to <strong>tens of millions of dollars </strong>for Ireland.</p><p>Putting those values on the same normal scale is like trying to draw a bolt and the bridge it holds on the same sheet at the same scale.</p><p>One of them will disappear.</p><p>The solution was a log scale, where each step on the axis represents a tenfold increase.</p><p>Suddenly, the chart could breathe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*ajmWZi-xbs19W28bH3BEgQ.png" /></figure><p>Other charts tells a different story based on intended context</p><p>I stepped into the KDE plot to answer the quesiton if import records are bigger than export records?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*dsSJMN4T76PKJMDYGBd2_g.png" /></figure><p><strong>Imports: a few large, steady suppliers.</strong> The top five suppliers (Ireland, France, Germany, the Netherlands and Belgium) supply $128.5m of the $156.5m imported, <strong>82%</strong>. All five are nearby EU members, which in 2015 meant tariff-free trade inside the single market.</p><p>Fresh milk is perishable, so it is mostly bought from neighbors.</p><ul><li><strong>Exports: one giant customer plus a long tail.</strong> Ireland takes 48% of exports, and the top five take <strong>68%</strong> ($180.6m). The remaining~100 countries make up the spread of smaller values on the left of the export curve.</li></ul><p>Then I came up with another question, What is the spread of trade flow and Milk Type. Answer this through a Box and Violin Plot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G0wQc5toXfVVOkqkVvWuYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*IUtYFhT0ErEhdm7efj_NhQ.png" /></figure><p>Insights it gave: Each box holds the middle 50% of records, and the line inside is the median. The dots above the whiskers are outliers: the few very large partner-months (mostly Ireland and the big EU neighbours). The violin adds the shape: where it is wide, many records sit at that value.</p><p>Each group covers several orders of magnitude, so the same commodity is traded in tiny parcels to some countries and in multi-million-dollar volumes to others.</p><p>-<strong>Fresh vs processed milk reach different markets.</strong> Unprocessed milk and cream (0401) is perishable and bulky, so it mostly goes to and comes from nearby countries. Processed milk (0402: milk powder, condensed and evaporated milk) keeps for months and travels well, so it reaches distant buyers. In Part A, China, Hong Kong and the UAE are regular <strong>processed</strong> milk customers, and Algeria and Angola are sizeable export markets. Check the printed top-3 lists: nearby partners should dominate 0401 and the distant markets should show up under 0402.</p><p>I was inquistive to know If the UK’s uppliers also buy form it. Then comes the final chart: Regression Plot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*rfMFgdp9QIXN7zNyaSAJvA.png" /></figure><p>What is this saying → The line slopes upwards i.e. the countries the UK buys most milk from are also the ones it sells most to. Large, nearby economies trade more with each other in <strong>both</strong> directions (economists call this the gravity model of trade), and dairy firms ship different products back and forth across the same borders (intra-industry trade).</p><h3>SQL Wanted a Word Too</h3><p>Just when I thought I was done, the SQL practice came along and basically said:</p><blockquote>”Answer all of that again, but in SQL this time.”</blockquote><p>Fair enough.</p><p>The line slopes upwards (see r): the countries the UK buys most milk from are also the ones it</p><p>sells most to. Large, nearby economies trade more with each other in <strong>**both**</strong> directions (economists call this the gravity model of trade),</p><p>and dairy firms ship different products back and forth across the same borders (intra-industry trade).</p><p>GROUP BYis SQL’s own version of the split-apply-combine idea.</p><p>Then came:</p><ul><li>CASE expressions</li><li>Conditional aggregation, which felt like building a PivotTable in SQL</li><li>GROUPING SETS for subtotals</li><li>Window functions such as ROW_NUMBER() OVER (PARTITION BY …) to rank the top three partners within each trade flow</li><li>GROUPING SETS, especially, reminded me of a Bill of Quantities.</li></ul><p>Different categories.</p><p>Subtotals.</p><p>Then a bigger summary.</p><p>A BOQ in one query.</p><p>I promise you, the connection made sense in my head.</p><p>It was a lot.</p><p>But it was good.</p><h3>But… Of Course, There Had to Be a But</h3><p>Three things humbled me this week.</p><p>And honestly, these were probably the most valuable lessons of all.</p><h4><strong>1. The “World” That Wouldn’t Leave</strong></h4><p>The Comtrade dataset contains a partner called <strong>”World.”</strong></p><p>Sounds harmless, right?</p><p>Except “World” isn’t an actual country in this context.</p><p>It represents the total of all the countries for that particular month.</p><p>If you leave it in alongside the individual countries, you risk counting the same trade value twice.</p><p>So I confidently wrote this:</p><pre><br># Removing World from the Partner column… or so I thought<br>naija_trade_countries = naija_cocoa[naija_cocoa != &#39;World&#39;]<br><br></pre><p>No error.</p><p>The code ran smoothly.</p><p>I was happy.</p><p>Then I sorted my top trading partners.</p><p>And at the top of my table was…</p><p>No partner name.</p><p>Just blank.</p><p>`NaN`.</p><p>My code hadn’t removed the <strong>World rows</strong> at all.</p><p>Instead, it compared every cell in the entire DataFrame with the word `”World”`, replaced the matching values with missing values and kept the rows.</p><p>My market woman had somehow added the summary page back into the line items.</p><p>The actual fix was much simpler:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TBf7nAsCmGs9yLs3HcC0gQ.png" /></figure><p>And this was the scary part:</p><p><strong>There was no red error line.</strong></p><p>The code worked.</p><p>It just did the wrong thing.</p><p>Since then, I’ve become more deliberate about checking that my country-level rows add up to the World totals before trusting the numbers.</p><h4>2. 434 Rows When I Asked for 4</h4><p>My first attempt at SQL Task 1 returned <strong>434 rows</strong>.</p><p>The task wanted<strong> 4.</strong></p><p>Small problem.</p><p>After checking my query, I realised what I had done.</p><p>I included the month and partner in my `SELECT` and `GROUP BY`, so SQL gave me a result for every combination of:</p><p>- Trade flow<br>- Month<br>- Partner</p><p>The query wasn’t necessarily wrong.</p><p>It simply answered a completely different question.</p><p>And once again, the same lesson from Python returned:</p><blockquote><strong>Whatever you put in your `GROUP BY` determines the level at which your results are summarised.</strong></blockquote><p>Or, more practically:</p><p><strong>Group by only what the question is asking for.</strong></p><h3>What I Built in Week 8</h3><p>By the end of the week, I had worked on:</p><p><strong>1. UK Milk Trade Analysis — Project 4</strong></p><p>I answered four key questions around:</p><p>- The UK’s trade balance<br>- Its main trading partners<br>- Its regular customers<br>- Countries the UK both bought from and sold to</p><p><strong>2. Nigeria Cocoa Trade Analysis — 2023</strong></p><p>I repeated the analysis using my own Comtrade dataset and explored patterns in:</p><p>- Trade activity<br>- Seasonality<br>- Price per kilogram</p><p><strong>3. Five Seaborn Visualisations</strong></p><p>I created:</p><ul><li>A histogram</li><li>KDE plot</li><li>Box and violin plots</li><li>A regression plot</li><li>A heatmap</li></ul><p>Each visualisation came with written insights based on what the data showed.</p><p>4. Five SQL Queries</p><p>The SQL tasks moved from a simple `GROUP BY` to a tidy, chart-ready table using concepts such as:</p><ul><li>Top 5</li><li>LEFT JOIN</li><li>Window Functions</li></ul><h3>The Bugs That Taught Me the Biggest Lesson</h3><p>If I’m being honest, the concepts themselves were not the hardest part of Week 8.</p><p>Groupby made sense.</p><p>Pivot tables made sense.</p><p>Even SQL made sense…</p><p>Eventually.</p><p>The difficult part was dealing with bugs that didn’t shout.</p><p>Earlier in my learning journey, many of my mistakes came with red lines and loud error messages.</p><p>This week was different.</p><p>Two of my biggest mistakes produced <strong>no error at all</strong></p><p>Just the wrong answer.</p><p>And worse still, the wrong answer looked perfectly believable.</p><p>That is a completely different kind of lesson.</p><blockquote>Code that runs is not the same as code that is correct.</blockquote><p>That one stayed with me.</p><p>It clicked.</p><h3>So, What Did Week 8 Really Teach Me?</h3><p>As I pen down my deliverables for this week, I realise that data analysis is not simply about getting a number.</p><p>It’s about understanding:</p><ol><li>What question you’re actually asking</li><li>How your data is being grouped</li><li>Whether your code did what you intended it to do</li><li>And, most importantly, whether the final number can be trusted</li></ol><p>The market woman doesn’t just count the money.</p><p>She sorts it first.</p><p>The Quantity Surveyor doesn’t just price the building.</p><p>He breaks it down first.</p><p>And apparently, the data analyst shouldn’t just run the code and celebrate either.</p><p><strong>Sort. Analyse. Verify. Then tell the story.</strong></p><p>I’m also turning my Nigerian cocoa analysis into a full portfolio project, so watch this space.</p><p>But for now…</p><p>Let’s see what Week 9 has in store for me.</p><p>Week 9! Can you be nice a little bit…🥂🥂🥂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa0d3e8aac80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 7 Was a Lot: Pandas, SQL, and an Independent Data Project]]></title>
            <link>https://medium.com/@helloanuhi/week-7-was-a-lot-pandas-sql-and-an-independent-data-project-7beb15241aa0?source=rss-e3cec1de8d75------2</link>
            <guid isPermaLink="false">https://medium.com/p/7beb15241aa0</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[internship-experience]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Anuhi Mustapha]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 15:33:27 GMT</pubDate>
            <atom:updated>2026-10-25T15:33:27.110Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Working with World Bank indicators, investigating economic and digital access, and learning to trust the analytical process as much as the output.</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q-MLSW7P1oir9rqJ" /><figcaption>Photo by <a href="https://unsplash.com/@jeshoots?utm_source=medium&amp;utm_medium=referral">JESHOOTS.COM</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Some weeks, the challenge is learning something new. Other weeks, the challenge is bringing several things you already know together, working through unexpected errors, and making sure everything produces the right result.</p><p>I am going to be subtle and gentle on this one cause it did push me to the edge. At the moment, I was angry and frustrated as I penned down my tasks for Week 7. I’m happy because I am not the same person anymore.</p><p>The workload was substantial. Between the lesson notebooks, take-home exercises, assessments, and my own analytical project, there was quite a lot to work through. The tasks were also interconnected, meaning I had to apply concepts from earlier lessons while working on later exercises.</p><p>I moved between pandas and SQL Server, cleaned and combined datasets, explored relationships between economic indicators, created visualisations, and worked through SQL practice tasks against database tables.</p><p>I was familiar with SQL, so learning the language itself was not the central challenge. The more demanding part was working through the assessment instructions, troubleshooting errors associated with the instructor-provided code, and dealing with instances where my results did not align with the expected output.</p><p>But beyond the technical work, Week 7 gave me an opportunity to practise something every analyst needs: understanding what the data is saying, checking the logic behind a result, and knowing when an unexpected output deserves further investigation.</p><h3>Returning to the Foundations: Cleaning and Combining Data with Pandas</h3><p>The first part of the take-home focused on transforming and combining data using pandas.</p><p>I worked with World Bank datasets containing GDP, life expectancy, and population information. The exercises required me to prepare the datasets, select the relevant columns, transform values, and combine the results into a structure suitable for analysis.</p><p>One task involved preparing a population DataFrame containing country names and population figures. I then had to combine it with the GDP and life-expectancy data.</p><p>This was an opportunity to practise the different types of joins in pandas: left, right, outer, and inner joins.</p><p>Each join serves a different purpose. A left join preserves the records from the left DataFrame, a right join preserves those from the right, an outer join retains records from both, and an inner join returns only matching records.</p><p>Understanding these differences matters because the choice of join affects what remains in the final dataset. A technically correct merge can still be inappropriate if it excludes records needed for the analysis.</p><p>I also worked on using constants for column names, converting GDP values, rounding figures, and preparing data for subsequent calculations.</p><p>These exercises reinforced the importance of treating data preparation as a deliberate process rather than simply combining tables and hoping for the best.</p><h3>Moving from Data Preparation to Analysis</h3><p>Once the datasets were prepared, the next step was to investigate the relationship between GDP and life expectancy.</p><p>The exercises required me to compare the countries with the highest GDP against those with the longest life expectancy. I also examined whether countries with relatively high GDP fell below a life-expectancy threshold and considered possible explanations for such observations.</p><p>One important part of the analysis was calculating GDP per capita by dividing GDP by population. This provided a different way to examine economic prosperity, since a country’s total economic output does not tell us how that output compares with its population.</p><p>I used Spearman’s rank correlation to investigate relationships between indicators and scatterplots to examine the distributions visually.</p><p>This distinction between calculation and interpretation is important. A correlation coefficient can help describe a relationship, but it does not establish that one variable causes changes in another. Likewise, a scatterplot can reveal patterns and exceptions that a single statistic might not adequately communicate.</p><p>The work was beginning to feel less like a collection of isolated coding exercises and more like an analytical workflow: prepare the data, ask a question, select an appropriate method, and interpret the result.</p><h3>My Own Project: Is Economic Prosperity Related to Internet Usage?</h3><p>One of the most interesting parts of the take-home was the instruction to create an independent project using two World Bank indicators.</p><p>Rather than simply repeat the example from the lesson, I chose to investigate the relationship between <strong>GDP per capita and internet usage</strong>.</p><p>My objective was to explore whether countries with higher GDP per capita also tended to have a greater proportion of their populations using the internet.</p><p>I selected 2022 as the reference year because it provided data for both indicators that I could use for a consistent comparison.</p><p>The two indicators were:</p><ul><li><strong>GDP per capita (current US$):</strong> World Bank indicator NY.GDP.PCAP.CD.</li><li><strong>Individuals using the internet (% of population):</strong> World Bank indicator IT.NET.USER.ZS.</li></ul><pre>import warnings<br>warnings.simplefilter(&quot;ignore&quot;, FutureWarning)<br><br>import requests<br>import pandas as pd<br># import matplotlib.pyplot as plt<br>from scipy.stats import spearmanr<br><br># Decided to use year 2022 because it is the most recent year that has both internet usage and GDP<br># that captures enough information<br><br>YEAR = 2022<br><br>GDP_INDICATOR = &quot;NY.GDP.PCAP.CD&quot;<br>INTERNET_INDICATOR = &quot;IT.NET.USER.ZS&quot;<br><br># <br>GDP = &quot;GDP per capita (US$)&quot;<br>INTERNET = &quot;Internet users (%)&quot;<br>COUNTRY = &quot;country&quot;<br><br>print(&quot;Project: Internet Usage and GDP per Capita&quot;)<br>print(&quot;Year:&quot;, YEAR)</pre><p>I retrieved the data using pandas_datareader, inspected the resulting DataFrames, and prepared the datasets for analysis.</p><pre>if pd.__version__.startswith(&#39;0.23&#39;):<br>    # this solves an incompatibility between pandas 0.23 and datareader 0.6<br>    # taken from https://stackoverflow.com/questions/50394873/<br>    core.common.is_list_like = api.types.is_list_like<br><br>from pandas_datareader.wb import download<br><br>YEAR = 2022<br><br># Get the GDP per capital from the world bank data page using the pandas_datareader.wb<br>gdpWB = download(indicator=GDP_INDICATOR, country=&#39;all&#39;, start=YEAR, end=YEAR)<br><br># Gettting the Internet Usage from the world bank data page using the pandas_datareader.wb<br>internetWB = download(indicator=INTERNET_INDICATOR, country=&#39;all&#39;, start=YEAR, end=YEAR)</pre><blockquote>Preview of the two dataset</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*Lwpb3s5MdmIkqjwLUeK0tw.png" /></figure><h3>Cleaning and combining the data</h3><p>The raw data included regional aggregates as well as country-level observations. I excluded the aggregate entries and removed observations with missing values before selecting the relevant columns.</p><p>I then renamed the indicator columns to make them easier to work with and combined the datasets using an inner join on the country column.</p><p>This gave me a DataFrame containing countries for which both GDP per capita and internet-usage data were available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*2xfvpnkCIA8OI7qoh7U_PQ.png" /></figure><h3>Measuring the relationship</h3><p>To investigate the relationship, I calculated Spearman’s rank correlation coefficient and its associated p-value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*ipevKg1E1IGPZxhm05gbXA.png" /></figure><p>The result recorded was a Spearman correlation of <strong>0.879</strong>, with a reported p-value of <strong>0.0</strong>.</p><p>This indicated a strong positive rank association in the analysed data: countries with higher GDP per capita generally tended to rank higher in internet usage.</p><p>However, the finding does not establish that higher GDP per capita directly causes greater internet access. Other factors, including infrastructure, affordability, education, and public policy, may also influence internet usage.</p><p>I also created a scatterplot with a logarithmic scale on the GDP-per-capita axis. This helped make the wide variation in countries’ income levels easier to examine visually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*fSUlWazOR0RtG8myhsHX4A.png" /><figcaption><em>Exploring the relationship between GDP per capita and internet usage across countries using 2022 World Bank data.</em></figcaption></figure><p>The project brought together several skills I had been practising: retrieving data, cleaning DataFrames, renaming columns, merging datasets, calculating correlation, and visualising results.</p><p>More importantly, I had to think about the question I wanted to answer and how to communicate the result without overstating what the analysis could prove.</p><p>That was the value of the independent project. I was not simply following an existing example; I was applying the workflow to a question I had chosen myself.</p><h3>The Troubleshooting That Came with the Work</h3><p>Of course, the week was not entirely smooth.</p><p>As I worked through the notebooks and assessments, I encountered errors associated with the instructor-provided code and situations where my output did not match the expected results.</p><p>This was frustrating, particularly because I was trying to connect the lesson explanations with the practical tasks while working through several requirements at once.</p><p>When an error appears, it is easy to assume that the problem must be in your own code. But a discrepancy can have different sources, and changing your solution repeatedly without understanding the issue may only create more confusion.</p><p>I had to examine the instructions, pay attention to the relevant columns and operations, and consider what the code was actually doing rather than focusing only on the expected output.</p><p>The experience reinforced an important distinction: <strong>a reference solution is useful for checking your work, but understanding the logic is what allows you to investigate when something does not agree.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RuZg0QI9yxAgoJFL" /><figcaption><em>One of the troubleshooting moments that made me look beyond the expected output and examine the code more carefully.</em></figcaption></figure><p>The important lesson here was to investigate the source of the problem instead of assuming that either the reference code or my own approach must be correct.</p><p>This is a habit I want to keep developing. In analytical work, unexpected results should prompt questions, not blind adjustments.</p><h3>Taking the Same Analytical Thinking into SQL Server</h3><p>The final section of the take-home brought the work back to SQL Server.</p><p>The objective was to solve similar data preparation and analysis problems directly against database tables, rather than first bringing the raw data into pandas.</p><p>I worked through five SQL practice tasks.</p><p>The first involved cleaning wind-direction values in London’s 2014 weather dataset. The values contained unwanted HTML fragments, so I used REPLACE() to remove them and TRY_CAST() to convert the cleaned values into integers. I then counted the days with wind directions greater than 350 degrees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rGHVE-z2t_Fh-camhVkrrg.png" /></figure><p>The second task involved converting text-based dates into proper SQL date values using TRY_CONVERT(). I retrieved London&#39;s weather observations for 8–12 December 2014, inclusive, and sorted them chronologically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*ZzdNQ_wklkFszjxGGgcM1w.png" /><figcaption><strong>SQL Task 2 · Dates: a date range</strong></figcaption></figure><p>For the third task, I joined GDP and life-expectancy tables from the World Bank datasets. I filtered for countries with GDP below $10 billion and known life expectancy, converted GDP into billions of US dollars, rounded the requested values, and returned the ten countries with the highest life expectancy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*Ifxfpe36WIa--0KYI08zuw.png" /><figcaption><strong>SQL Task 3 · Combining tables (JOIN)</strong></figcaption></figure><p>The fourth task examined what could be lost when incomplete records were removed before combining datasets. Using a LEFT JOIN, I counted rows with missing GDP or missing life-expectancy values.</p><p>Finally, I used a common table expression and window functions to calculate rolling seven-row rainfall totals and identify the driest seven-day period during London’s summer of 2014. The query excluded incomplete windows and used the earliest start date to break a tie.</p><p>These exercises required me to pay attention to the same analytical details that mattered in pandas: data types, missing values, join logic, sorting, and the assumptions behind calculations.</p><p>They also showed how data preparation can be performed within a relational database before the results are brought into Python for further analysis.</p><h3>A result worth documenting</h3><p>The practice notebook recorded a score of <strong>5 out of 5</strong> across the five SQL tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*nohZyxjogRQ-UmS7X-JsHA.png" /><figcaption><em>The recorded result of the five-task SQL practice assessment.</em></figcaption></figure><p>This was a useful way to close that section of the work. The tasks required different techniques, but each had a specific expected output that I needed to satisfy.</p><p>The experience also reinforced that knowing a tool is only part of the job. Understanding the question, following the requirements, and validating the output remain essential.</p><h3>What Week 7 Taught Me</h3><p>Looking back, the biggest lesson from Week 7 was the importance of approaching data work systematically.</p><p>I worked with pandas to clean and transform datasets, explored different join types, analysed relationships between World Bank indicators, created a project of my own, and applied SQL to similar problems directly in a database.</p><p>Along the way, I had to deal with errors, investigate mismatches, and keep track of the details that determine whether a solution answers the question correctly.</p><p>The experience reminded me that data analysis is not simply about writing code that executes.</p><p>It is about understanding the data, selecting an appropriate method, checking assumptions, and interpreting the results responsibly.</p><p>A correlation coefficient may reveal a strong association, but it does not establish causation. A join may execute successfully, but the choice of join determines which records survive. A rolling window may calculate a total, but the analyst still needs to verify whether the rows represent the intended period.</p><p>These details are what turn a working query or notebook into a defensible analysis.</p><p>I also came away with a stronger appreciation for independent projects. Choosing GDP per capita and internet usage gave me an opportunity to apply the lessons to a question of my own and communicate a finding beyond the immediate requirements of an exercise.</p><h3>What Comes Next?</h3><p>As I continue my Dataraflow internship, I want to become more deliberate about the full analytical process: from retrieving and cleaning data to selecting the right method, validating the results, and communicating the conclusions clearly.</p><p>Week 7 demanded a lot of attention, and there were moments when I had to slow down and work through the details carefully. But that is part of building the discipline required for more advanced data science and machine learning work.</p><p>I am learning to value not only the final result, but also the reasoning, checks, and decisions that support it.</p><p><strong>One lesson from Week 7: don’t stop when your code runs. Understand what it returns, why it returns it, and whether the evidence supports the conclusion you draw.</strong></p><p>Well.. Let’s see what Week 8 has in store forme I guess...</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7beb15241aa0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 6: NumPy Was Gentle, Pandas Was Sweet… Then SQL Tested My Sanity!]]></title>
            <link>https://medium.com/@helloanuhi/week-6-numpy-was-gentle-pandas-was-sweet-then-sql-tested-my-sanity-41029f8bd490?source=rss-e3cec1de8d75------2</link>
            <guid isPermaLink="false">https://medium.com/p/41029f8bd490</guid>
            <category><![CDATA[numpy]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sql-server]]></category>
            <dc:creator><![CDATA[Anuhi Mustapha]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 14:31:21 GMT</pubDate>
            <atom:updated>2026-10-19T14:31:21.214Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Three tools, a lot of learning, a few unexpected errors, and one tired brain trying to keep up with it all.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ArHFNIGQJPsZaJ5Bf-16KQ.png" /><figcaption>Taking a step back to think about SQL again…</figcaption></figure><p>To be skillful in Data Science, you must master pandas.</p><p>At least, that’s the impression I got when Week 6’s materials dropped!</p><p>You see that picture below? That was the biggest joke 😂😂😂 of the week when the Week 6 modules landed in our respective emails and dashboards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*LGfSlKtqKaJpJA6dR63ggg.png" /><figcaption>In the world of Data Professional, importing pandas is highly essential, legal, and legitimate kind of business</figcaption></figure><p>Well, I took a glance at it when I received the email and quickly scanned through the content.</p><p>If I’m being honest, it was A LOT!</p><p>A lot to take in for one week.</p><p>First came NumPy.</p><p>As gentle as a dove, it landed softly, gently, and sweetly.</p><p>Or so I thought…</p><h3>NumPy: The Gentle Introduction</h3><p>It felt more like a build-up to the fundamental concepts I had already learnt, such as lists, arrays, and so much more.</p><p>It didn’t give me much trouble. I understood the concepts quite well and actually enjoyed working through the tasks and assignments that came with it.</p><p>Wait a minute… Hold on!</p><p>There was one tiny bit of something that confused me, though.</p><p>Take a look at this assignment:</p><blockquote><em>“Write a NumPy program to create an element-wise comparison (equal, equal within a tolerance) of two given arrays.”</em></blockquote><p>God knows I’m not even going to lie. I didn’t have the slightest idea how to approach this because I was literally seeing it for the first time.</p><p>What did I do?</p><p>I had to build on what already existed — my fundamentals.</p><p>A little research here and there, with my friend ChatGPT helping me understand the concepts, and I began to comprehend something that initially seemed foreign.</p><p>I wasn’t just looking for an answer to the assignment. I wanted to understand the concept well enough to implement it myself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*cyT10dHjPxqN1sVtFsQFLQ.png" /></figure><blockquote>BOOM!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*c-ImraBEf4HamlLwBuftHA.png" /></figure><p>That came like a <em>Eureka!</em> moment.</p><p>I was quite surprised by the result because, as a Civil Engineer by profession, this concept felt surprisingly familiar.</p><p>On-site, we take measurements, compare values, and account for acceptable variations. During design, we also apply something called a <em>Factor of Safety</em> to account for uncertainties and ensure that structures can withstand the loads they are expected to carry.</p><p>Of course, comparing NumPy arrays within a numerical tolerance isn’t the same thing as applying a Factor of Safety in engineering. But the underlying idea of understanding acceptable differences and working with numerical values made the concept easier for me to relate to.</p><p>Isn’t it interesting how something you learnt in one field can help you understand a concept in another?</p><p>The tech world has its own language and mantra, and NumPy is one of the fundamental building blocks of Data Science.</p><p>That was a win for me!</p><p>Anyhoo… I wrapped up the remaining NumPy tasks and landed in the world of pandas.</p><h3>Pandas: Hehehehe… I Got It!</h3><p>Remember the picture at the beginning of this article?</p><p>😂😂😂😂😂</p><p>I got it started!</p><p>Stay with me on this.</p><p>First off, pandas introduced itself and brought me up to speed on what we would be doing.</p><p>This gave me a clear scope of what I intended to achieve by the end of the learning session.</p><p>I jumped straight into learning how to load data, select columns, sort data, and even create new columns by performing calculations on existing ones.</p><p>For some reason, it wasn’t as scary as I thought it would be.</p><p>It was easy. It made a lot of sense.</p><p>Perhaps it was because of my previous Data Analytics experience with Python.</p><p>Whatever the reason, I was enjoying the process.</p><p>Next, we transitioned into working with CSV files, exploring Series and DataFrame attributes, and retrieving subsets of data using rows and columns.</p><p>To solidify my understanding of calculated columns, I encountered comparison and bitwise operators again, but this time in a much deeper context.</p><p>I began to understand how they worked and, more importantly, how to apply them.</p><p>Now, I wasn’t just looking at these concepts on the surface anymore. I was thinking about several practical, real-life situations where they could come in handy.</p><p>Appreciation began to fill my heart.</p><p>I started thinking more deeply about how to approach a problem, manipulate data, and get the results I wanted efficiently.</p><p>I was beginning to see how the pieces fitted together.</p><p>Then, suddenly, a familiar stranger from Week 3 showed up.</p><p><strong>SQL!</strong></p><p>Wait, wait, wait…</p><p>What are you doing here?</p><p>That was the question I asked in my mind.</p><p>But the first line of the task objective made me rethink what lay ahead.</p><p>And it was A LOT!</p><h3>SQL: From “I Can Write a SELECT” to “I Can Answer Business Questions”</h3><p>It turns out they wanted to take me from the usual:</p><p>“I can write a SELECT statement.&quot;</p><p>To:</p><p><strong>“I can answer real business questions with SQL.”</strong></p><p>Okay, that hit hard!</p><p>It reinforced the idea that Data Science and Data Analytics are not just about writing code. They also require analytical thinking and the ability to put yourself in the position of decision-makers or the end users of your data.</p><p>You must understand the question being asked, identify the information needed, and determine how to turn the available data into something useful.</p><p>Given my experience as a Data Analyst, I was already quite familiar with SQL, especially Microsoft SQL Server and its dialect, T-SQL.</p><p>The concepts and applications weren’t entirely new to me.</p><p>But as familiar as SQL seemed, this particular session still presented its own challenges.</p><p>And I strongly believe I’m not the only one who has experienced this.</p><p>Knowing SQL syntax is one thing. Applying it to solve a practical business problem is an entirely different thing.</p><p>My SQL learning curve centred on moving beyond the basics and applying what I knew to real database questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*IDX3SxBcdg7x9A5cTjMJKw.png" /><figcaption>Check out my learning curve for SQL this week!</figcaption></figure><p>Now, it wasn’t just about knowing the syntax. I had to use it against a database containing World Bank datasets on GDP, population, tuberculosis deaths, and other indicators, alongside other assessment tasks.</p><p>Before diving into the queries, I first had to explore something called a <strong>schema</strong>.</p><h3>Before You Touch a Database, Ask Yourself This!</h3><p>If someone hands me a database, what do I do first?</p><p>What’s the first step I should take?</p><p>These are questions every data professional should ask before even lifting a finger.</p><p>And that’s precisely what this session began to address.</p><pre># Every SQL Server database describes itself through read-only system views. <br># TABLES lists the tables and COLUMNS lists every column with its data type.<br><br>tables = q(&quot;&quot;&quot;<br>    SELECT TABLE_SCHEMA AS schema_name, TABLE_NAME AS table_name, TABLE_TYPE<br>    FROM INFORMATION_SCHEMA.TABLES<br>    ORDER BY TABLE_SCHEMA, TABLE_NAME<br>&quot;&quot;&quot;)<br>print(len(tables), &quot;tables&quot;)<br>tables</pre><p>I explored the underlying structure of the database, including the tables and columns available in assessmentDB.</p><pre>run_query(&quot;&quot;&quot;<br>    SELECT TABLE_SCHEMA AS schema_name, COUNT(*) AS n_tables<br>    FROM INFORMATION_SCHEMA.TABLES<br>    GROUP BY TABLE_SCHEMA<br>    ORDER BY TABLE_SCHEMA<br>&quot;&quot;&quot;)</pre><p>Think of it this way.</p><p>I had to step into the building, inspect the rooms, understand the layout, and familiarize myself with what was available before deciding what to do.</p><p>Once I had a clearer picture of the database structure, I proceeded to revise and explore the SQL concepts I needed.</p><p>There’s a saying that learning is continuous, and that’s true in its entirety.</p><p>Even with the SQL concepts and projects I had worked on previously, this session taught me new things.</p><p>Especially some SQL functions and features!</p><h3>Three SQL Features That Caught My Attention</h3><p><strong>1. </strong><strong>TRY_CAST() and </strong><strong>TRY_CONVERT()</strong></p><p>These functions were interesting to me because they reminded me of the familiar CAST() and CONVERT() functions used to convert an expression from one data type to another.</p><p>The difference?</p><p>When TRY_CAST() or TRY_CONVERT() encounters a value that cannot be converted to the requested data type, it returns NULL instead of raising a conversion error, provided the conversion itself is permitted.</p><p>This can be particularly useful when working with messy datasets, where not every value behaves as expected.</p><p>I appreciated learning these functions because they gave me another way to handle data conversion more safely.</p><p>Check the use of both TRY_CONVERT() &amp; CONVERT()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ty8iqxdhUVV1zPk9pAo7vA.png" /><figcaption>Using TRY_CONVERT</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IOwIPTeeuSC2huCucgupYw.png" /><figcaption>Using CONVERT</figcaption></figure><p><strong>2. </strong><strong>ROLLUP</strong></p><p>Okay, this was a new one for me!</p><p>ROLLUP is used with GROUP BY to generate subtotals and grand totals across a hierarchy of grouping columns.</p><p>For example, I used it to aswer a test question</p><pre>run_query(&quot;&quot;&quot;SELECT COALESCE(Internet_Service, &#39;** TOTAL **&#39;) AS internet_service,<br>       COALESCE(Contract_Type, &#39;(all)&#39;)          AS contract_type,<br>       SUM(Churn)                                AS churned<br>FROM week16.customer_churn_prediction<br>GROUP BY ROLLUP(Internet_Service, Contract_Type)&quot;&quot;&quot;<br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*1yx0jlM8SX6BQTsgxcATLg.png" /></figure><p>Now, that’s something worth remembering!</p><p><strong>3. </strong><strong>OFFSET and </strong><strong>FETCH</strong></p><p>This was another useful feature to explore.</p><p>In SQL Server, OFFSET and FETCH NEXT can be used with ORDER BY to paginate query results.</p><p>In simple terms, you can tell SQL:</p><p>“Skip the first 10 rows, then give me the next 5.”</p><p>This is useful when working with paginated reports, dashboards, and applications that retrieve results in manageable batches.</p><p>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*bNNK-n2hk0mjeedM4n7U6w.png" /></figure><p>These features reminded me that there is always something new to learn, even when you think you’re already familiar with a tool.</p><h3>The Real Test: Putting SQL to Work</h3><p>The real test of what I had learnt and revised in theory was the practical application of business questions.</p><p>Or should I say, defending my knowledge?</p><p>Check this out.</p><p>One of the assessment questions asked us to:</p><blockquote><em>From </em><em>week16.customer_churn_prediction, return the number of customers, the number of churned customers (</em><em>Churn = 1), and the churn rate percentage for each </em><em>Contract_Type.</em></blockquote><blockquote><em>Return </em><em>Contract_Type, </em><em>customers, </em><em>churned, and </em><em>churn_rate_pct, rounded to one decimal place and sorted by churn rate from highest to lowest.</em></blockquote><blockquote><em>Watch out for the integer-division trap!</em></blockquote><p>Now, this is a typical example of conditional aggregation in SQL.</p><p>You need to understand the table, identify the columns involved, count the customers, count those who churned, and calculate the churn rate correctly.</p><p>In my head, I thought a Common Table Expression (CTE) would make the query easier, simpler, and neater.</p><pre>run_query(&quot;&quot;&quot;WITH days AS (<br>    SELECT TRY_CONVERT(date, GMT) AS day,<br>           [Max TemperatureC]     AS max_temp<br>    FROM week06.london_2014<br>),<br>ranked AS (<br>    SELECT MONTH(day) AS month_no,<br>           day,<br>           max_temp,<br>           ROW_NUMBER() OVER (PARTITION BY MONTH(day)<br>                              ORDER BY max_temp DESC, day ASC) AS rn<br>    FROM days<br>    WHERE day IS NOT NULL<br>)<br>SELECT month_no, day, max_temp<br>FROM ranked<br>WHERE rn = 1<br>ORDER BY month_no;&quot;&quot;&quot;)</pre><p>I went ahead and ran it.</p><p>Then, <strong>BOOM!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mgx1eZ0zQdl6iZa08ECvpg.png" /><figcaption>An error!</figcaption></figure><p>Hold on!</p><p>The result was correct. I cross-checked every line of code and its logic. Everything made sense.</p><p>So, what was the problem?</p><p>It turned out that DataFlow had configured its assessment helper to accept SELECT queries only. My approach was not compatible with that restriction.</p><p>The problem wasn’t necessarily my SQL logic. It was the way I had structured the query in relation to the assessment environment.</p><p>Okay…</p><p>I stepped away from my system, took a fresh breath, and started again.</p><p>No, no, no! I wasn’t rewriting the query just yet.</p><p>I mean, I started <strong>thinking again</strong>.</p><p>Because that’s one of the first and most essential things you do when working with SQL.</p><p>Knowing the tools and syntax to use is one thing. Thinking logically and analytically about how to piece them together to achieve your desired result is an entirely different thing.</p><p>I thought.</p><p>I reconsidered.</p><p>I looked at the problem again.</p><p>And then I remembered…</p><p>Wait a minute!</p><p>A CTE is not the only way to organise a query. I could use a subquery in the FROM clause instead.</p><p>If my preferred approach wasn’t compatible with the assessment helper, I could use another valid approach that met the same requirement.</p><p>So, I restructured the query and tried again.</p><p><strong>BOOM!!!</strong></p><pre>SELECT<br>    month_no,<br>    day,<br>    max_temp<br>FROM (<br>    SELECT<br>        MONTH(TRY_CONVERT(date, GMT)) AS month_no,<br>        TRY_CONVERT(date, GMT) AS day,<br>        [Max TemperatureC] AS max_temp,<br>        ROW_NUMBER() OVER (<br>            PARTITION BY MONTH(TRY_CONVERT(date, GMT))<br>            ORDER BY<br>                [Max TemperatureC] DESC,<br>                TRY_CONVERT(date, GMT) ASC<br>        ) AS rn<br>    FROM week06.london_2014<br>    WHERE TRY_CONVERT(date, GMT) IS NOT NULL<br>) AS MonthlyRanking<br>WHERE rn = 1<br>ORDER BY month_no;</pre><p>I got it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*rZvGBQ1ElN5F5kfsaVk-MQ.png" /><figcaption>The Result…</figcaption></figure><p>And that’s how we proceeded.</p><p>That moment reminded me of something important: solving a problem isn’t always about finding the first approach that comes to mind. Sometimes, it is about understanding the constraints, reconsidering your options, and adapting your solution.</p><p>Every other task went relatively smoothly after that.</p><p>The logic was logical, and the analysis was analytical!</p><p>Well, most of the time. 😂</p><h3>When Writing Queries Is No Longer Enough</h3><p>Three tactical questions at the end of the assessment pushed my thinking even further.</p><p>They highlighted the difference between knowing how to code, writing queries that return results, and translating those results into practical solutions for business owners and decision-makers.</p><p>1. In Task 3 or Task 7, what would `AVG(Churn)` or `AVG([Mean TemperatureC])` return <strong>without</strong> converting to a decimal first, and why?</p><p>2. In Task 6, why do those countries fail to match? How would you fix this in a real project?</p><p>3. Look at your Task 10 result. What is <strong>suspicious</strong> about it? What would you tell the Head of Credit before anyone trains a model on this data?</p><p>One of them particularly stood out to me.</p><p>A query can execute successfully and still fail to answer the question that matters to the business.</p><p>A number on a dashboard is only useful when it helps someone understand a situation, identify an opportunity, or make a better decision.</p><p>That is the difference between simply retrieving data and thinking analytically about what the data means.</p><p>And that is the skill I’m working towards.</p><h3>Week 6: A Lot to Process, A Lot to Appreciate</h3><p>As I pen down this week’s article, Week 6 has come to a close, and I’m gradually transitioning into Week 7.</p><p>So far, the tasks, deliverables, and assessments have stretched my mind, challenged my reasoning, and put my brain through some serious mental gymnastics.</p><p>It’s a good thing, no doubt.</p><p>But it takes a lot of work and effort.</p><p>From NumPy to pandas, and from exploring data structures to answering business questions with SQL, this week reminded me that learning Data Science is not just about collecting tools and memorising syntax.</p><p>It’s about understanding concepts, connecting ideas, asking the right questions, and knowing how to apply what you have learnt to solve problems.</p><p>Sometimes, the answer comes easily.</p><p>Sometimes, you stare at an error message and wonder what exactly went wrong.</p><p>And sometimes, the answer is correct, but the approach needs to change.</p><p>That’s part of the process.</p><p>In my earlier article, I mentioned that winter was coming.</p><p>Oops! I mean, <strong>Week 6 was coming!</strong></p><p>And it did.</p><p>It’s a done deal, but I’m still trying to put the pieces of my brain back together.</p><p>This time, all I can say is…</p><p><strong>Let’s get Week 7 started!</strong></p><p>Cheers!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41029f8bd490" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 5: Nearly Finished Me… Until I Had to Find a Problem Worth Solving!]]></title>
            <link>https://medium.com/@helloanuhi/week-5-nearly-finished-me-until-i-had-to-find-a-problem-worth-solving-7a483d8ba7ad?source=rss-e3cec1de8d75------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a483d8ba7ad</guid>
            <category><![CDATA[data-science-research]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[research-paper-writing]]></category>
            <dc:creator><![CDATA[Anuhi Mustapha]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 11:52:59 GMT</pubDate>
            <atom:updated>2026-10-13T15:06:25.051Z</atom:updated>
            <content:encoded><![CDATA[<h3>Week 4/5 Nearly Broke Me This Time… Until I Had to Find a Problem Worth Solving!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TaAHpQGMhD3QyOzt" /><figcaption>Photo by <a href="https://unsplash.com/@dandimmock?utm_source=medium&amp;utm_medium=referral">Dan Dimmock</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hmm… I’m not even gonna lie, I was confused this week.</p><p>Yes!… it wasn’t funny, I must say.</p><p>It’s easier said than done, as the saying goes.</p><p>We took a break from the chronicles of the internship. Well, not necessarily a break, but a break from doing something too technical to doing something more realistic.</p><p>In the beginning, it was said that God created light, yeah?</p><p>Well, for the DataraFlow internship, there was something more. And most of us, including me, didn’t really understand what it meant until Week 5 greeted us sheepishly.</p><p>Now, stay with me on this because it gets interesting…</p><p>In the beginning, the internship mentioned that, as part of our graduation criteria, we (the interns) must write and publish a research paper in a journal.</p><p>Sounds simple and easy, right?</p><p>Yeah, that was my thought too, until Week 5 became the enemy fashioned against the majority of us, or at least me in particular.</p><p>And this article is a testimony of how I conquered it.</p><h3>First Things First: What Exactly Is Research?</h3><p>Firstly, we had to understand what research is. Then came the question of what a research paper is.</p><p>It’s like I’m repeating words, nah? I don’t think so, because as much as they look like twins, they are actually different.</p><p>Here’s what I learnt.</p><p><strong>Research.</strong></p><p>Re-search. (See the hyphen there? It was deliberate!)</p><p>I came to understand it as the process of investigating something that has already been explored(or search), or exploring something new, to discover information, uncover gaps, or find better ways of doing things.</p><p>Perhaps the previous researcher didn’t investigate it thoroughly, missed a particular detail, or there is a new method or approach that could produce better and more efficient results.</p><p>You get the idea?</p><p><strong>Now, a research paper</strong> is the fraternal twin of research. It is simply the product of a research process.</p><p>It is the documentation of what the research is about, why it was conducted, how it was carried out, what was discovered, and what the findings mean.</p><p>Noted!</p><p>I continued.</p><h3>The Real Enemy: Finding a Research Topic</h3><p>The first deliverable for the week was to come up with a research topic and submit it for approval.</p><p>I won’t lie to you. Nothing was more confusing than this, both for me and for so many others.</p><p>We sheepishly heard ourselves whispering silent questions, while others asked theirs out loud.</p><p><em>What is a research topic?</em></p><p><em>How do we come up with one?</em></p><p><em>Where can I find one?</em></p><p>These questions, among many others, set the entire cohort in disarray.</p><p>Why?</p><p>Because, just like me, the majority of us had <strong>NEVER WRITTEN A RESEARCH PAPER BEFORE!</strong></p><p>Do you get?</p><blockquote><strong>NEVER WRITTEN A RESEARCH PAPER BEFORE!</strong></blockquote><p>We didn’t know how to start or where to begin.</p><p>This was despite the fact that a technical expert session had been held with a guest speaker titled <em>“Demystifying Research.”</em></p><p>At that point in time, everything made sense. But when I was left alone with my own thoughts, my mind went blank.</p><p>Completely blank.</p><p>However, one thing the guest speaker said became an anchor for me to revolve around.</p><p>She explained that a research topic could emerge from a problem you identify within your community, society, organisation, or company — a problem that bothers you and that you want to solve.</p><p>And that stuck with me.</p><h3>The Icebreaker: A Brainstorming Session That Changed Everything</h3><p>With confusion looming directly over our faces, sadness in our voices, or perhaps an imbalance in our thoughts, the founder of DataFlow, Mr <a href="https://medium.com/u/9fed4a8ca160">Emeto Winner</a>, decided to have a brainstorming session with us.</p><p>The goal was to give us a practical, step-by-step guide, with real-world examples, on how to develop a research topic we could actually work on.</p><p>I strongly remember one key thing he said because, for me, that was the icebreaker.</p><p>He explained that one of the best ways to come up with a research topic is to look into the domain you currently work in and identify the problems the industry is facing.</p><p>This, he explained, makes the job easier.</p><p>And just like that, a light bulb went off in my head.</p><p>Or so I thought…</p><h3>Backstory: A Little About Me</h3><p>I studied Civil Engineering during my undergraduate years and, by extension, currently work as a Project Manager in the Project Management Office (PMO) of a renewable energy company.</p><p>My interest in Project Management began during my final year, when I took courses such as <em>Construction Planning and Management</em> and <em>Fundamentals of Project Management</em>.</p><p>Then, I fell in love with it, and the journey has been smooth ever since.</p><p>Despite my profound desire and love for tech…</p><p>Wait, hold on a minute!</p><p>It’s beginning to sound as if I’m cheating.</p><p>Well, we live in a symbiotic environment, so both can coexist. In fact, according to Mr Winner, there is no better thing to do than this.</p><p>So, I guess I’m on the right track!</p><p>At different intervals, I sat with my thoughts, staring at my blank Word document.</p><p>That document stared right back at me like a helpless dog looking at its master for food.</p><blockquote>Bingo!</blockquote><blockquote>We were both hungry, man!</blockquote><p>The problem was that I had absolutely no idea what to write or what research topic to come up with.</p><p>I looked deeply into the domain I currently work in — Project Management — but I just couldn’t seem to identify a problem worth investigating.</p><p>Despite holding an Associate Project Management certification and having an understanding of different aspects of Project Management, my head was still literally…</p><blockquote><strong>BLANK!</strong></blockquote><p>Yes, there are existing problems, such as project delays, cost overruns, and other project delivery challenges. Some of these have already been explored using Data Science and Machine Learning.</p><p>But project problems are not always universal. What affects one project may not necessarily affect another in the same way.</p><p>I wanted to research something that could make a meaningful impact and add significant value to the industry.</p><p>But what exactly was that problem?</p><p>That was the million-dollar question.</p><h3>Enter the SPOT Framework!</h3><p>During the technical session, we were introduced to a mind-blowing trick: using AI to our advantage.</p><p>We also learnt about the <strong>SPOT framework</strong>, which became the turning point in my search for a research topic.</p><p>Here’s how it works.</p><p><strong>S — Spot the Pain Point: </strong>Many donor-funded projects in Sub-Saharan Africa receive unsatisfactory outcome ratings, and some of the problems responsible for these outcomes may only become apparent when it is too late to take corrective action.</p><p>Could Machine Learning help identify potential project failure earlier?</p><p><strong>P — Pair It with a Data Science Tool: </strong>Now, I match the identified pain point with an appropriate Data Science method, technique, or model. At this point,</p><p>I begin asking key questions:Which analytical approach, Machine Learning model, or AI method can help solve or predict this problem?</p><p><strong>O — Outline the Limits: </strong>At this stage, I had to get really realistic.</p><p>I needed to define the boundaries of the research, considering data accessibility, computational power, and project scope. After all, there’s no point proposing a research project that sounds impressive but cannot realistically be executed with the resources available.</p><p><strong>T — Title the Research Problem: </strong>Finally, I bring together everything gathered from the S, P, and O stages to develop a clear, structured research topic.</p><p>And there it was!</p><p>The framework gave me a much clearer perspective on how to identify a problem worth solving and turn it into a researchable topic.</p><p>Now, it was time to put it into practice.</p><h3>From a Blank Document to a Real-World Problem</h3><p>I started looking for bottlenecks and unresolved operational challenges in Project Management.</p><p>During my exploration, I stumbled upon World Bank reports on donor-funded projects across the globe. However, I was more interested in Africa, specifically Sub-Saharan Africa.</p><p>Here’s why this caught my attention.</p><p>Sub-Saharan Africa depends heavily on externally financed projects to build roads, power systems, schools, and health services. The World Bank is one of the major financiers of development projects in the region.</p><p>When a project fails to meet its development objectives, the consequences go beyond financial losses.</p><p>Communities lose access to services they were promised. Governments carry debt without achieving the intended results. And scarce implementation capacity is consumed by projects that fail to deliver their expected benefits.</p><p>Now, that was a problem worth exploring!</p><p>I began breaking it down using the SPOT framework.</p><h3>S — Spot the Pain Point</h3><p>Many donor-funded projects in Sub-Saharan Africa receive unsatisfactory outcome ratings, and some of the problems responsible for these outcomes may only become apparent when it is too late to take corrective action.</p><p>Could Machine Learning help identify potential project failure earlier?</p><h3>P — Pair It with a Data Science Tool</h3><p>I considered training classification models, such as <strong>XGBoost and Random Forest</strong>, using project ratings from the World Bank’s Independent Evaluation Group (IEG) alongside data from the World Bank Projects API.</p><p>To add another dimension, I considered incorporating Natural Language Processing (NLP) features extracted from project appraisal documents.</p><p>I also explored the possibility of using <strong>SHAP (SHapley Additive exPlanations)</strong> to explain which factors contribute to a model’s predictions.</p><p>The goal would be to go beyond predicting an outcome and provide insights into why a project might be at risk.</p><p>Now, that sounded interesting!</p><h3>O — Outline the Limits</h3><p>Of course, I had to be realistic.</p><p>Project ratings have limitations, the available dataset might contain only a few thousand relevant projects depending on the selection criteria, and the available information might not capture every factor influencing project outcomes.</p><p>More importantly, a predictive model identifies patterns and associations. It does not automatically establish causation.</p><p>These were some of the limitations I needed to consider when defining the research scope.</p><h3>T — Title the Research Problem</h3><p>After putting the pieces together, I arrived at a proposed research topic:</p><p><strong>“Explainable Machine Learning for Early Prediction of World Bank Project Outcomes in Sub-Saharan Africa.”</strong></p><p>YES!</p><p>With that, I finally had something to work with.</p><p>The SPOT framework checked all the boxes, and the entire process became much easier.</p><p>I continued exploring related problems and discovered two or three more potential research directions I could investigate as I progressed in my journey.</p><p>For the first time that week, I wasn’t staring at a blank document anymore.</p><p>I had a direction.</p><h3>But Is This Research Actually Different?</h3><p>Now, this is where things got even more interesting.</p><p>From my initial exploration of the literature, I found that researchers had already investigated project outcomes using statistical models and structured project data.</p><p>Some of the studies I encountered examined projects across multiple regions, while others focused on predicting outcomes after projects had been completed or relied on information collected during implementation.</p><p>None of these studies address publicly financed development projects. Therefore, no study has yet examined whether modern classifiers using only approval-time information can predict IEG outcome ratings for World Bank projects in Sub-Saharan Africa, nor explained those predictions at the level of individual projects.</p><p>This raised an important question for me:</p><p><strong>What if we could identify projects at risk of unsatisfactory outcomes much earlier, ideally at the approval stage?</strong></p><p>What if we could combine structured project information with text from project appraisal documents and use explainable Machine Learning to understand the factors influencing those predictions?</p><p>Could such an approach provide useful early-warning insights for development projects in Sub-Saharan Africa?</p><p>That became the central direction I wanted to investigate.</p><p>Of course, these were preliminary observations, and I would need a more systematic literature review to establish the precise research gap.</p><p>But at least I now had a research problem that I could investigate, refine, and defend.</p><p>And that was progress!</p><p>I submitted the topic, and after some scrutiny by my mentor, <strong>it was approved!</strong></p><p>You have no idea how good that felt.</p><p>The enemy was beginning to lose the battle.</p><p>But wait…</p><p>The war wasn’t over.</p><h3>The Research Proposal: Where the Real Work Began</h3><p>The next task was to develop a research proposal.</p><p>And this was where the real work began.</p><p>We were provided with a template to guide us through the process. It covered the following sections:</p><ol><li><strong>Title</strong> — The central focus of the research.</li><li><strong>Abstract</strong> — A concise summary of the entire study.</li><li><strong>Introduction/Background</strong> — The context surrounding the research problem.</li><li><strong>Literature Review</strong> — What previous researchers have discovered and where gaps may exist.</li><li><strong>Problem Statement</strong> — The specific problem the study seeks to address.</li><li><strong>Research Questions/Hypotheses</strong> — The questions the study will answer or the hypotheses it will test.</li><li><strong>Objectives</strong> — What the study aims to accomplish, usually outlined in three to five points.</li><li><strong>Methodology</strong> — Typically one of the longest and most scrutinised sections, covering:</li></ol><ul><li>Research design: qualitative, quantitative, or mixed methods.</li><li>Population and sampling strategy.</li><li>Data collection methods and instruments.</li><li>Data analysis approach.</li><li>Ethical considerations and approvals.</li></ul><p><strong>9. Significance/Contribution</strong> — Why the research matters and what it could contribute.</p><p><strong>10. Limitations and Scope</strong> — The boundaries of the study and the constraints that may affect it.</p><p><strong>11. Timeline</strong> — The proposed schedule for completing the research.</p><p><strong>12. References</strong> — The sources that inform and support the study.</p><p>This research outline helped me approach the proposal more systematically.</p><p>One thing that particularly stood out to me was the abstract.</p><p>Although it appears near the beginning of a research proposal, it is often best written last because it summarises the key elements of the entire study.</p><p>Interesting, right?</p><p>I always thought you had to start at the beginning and work your way through to the end.</p><p>Well, apparently, research has its own way of doing things!</p><h3>A Combination of Two Worlds</h3><p>While I cannot share the full details of my research proposal just yet, I can assure you that I have filled my plate, and there is plenty of work to be done.</p><p>I’m willing to give it everything it takes to see this through.</p><p>The model or models I eventually develop will aim to provide early insights into which projects may be at risk of unsuccessful outcomes.</p><p>For me, this is more than just another internship deliverable.</p><p>It is an opportunity to bring together two worlds that I care deeply about: <strong>Project Management and Data Science/Machine Learning.</strong></p><p>One gives me an understanding of the domain, its challenges, and the realities of project delivery.</p><p>The other provides analytical tools and techniques that may help investigate those challenges in new ways.</p><p>My goal is to use these complementary skills to investigate a meaningful problem and contribute something useful to the field.</p><p>I know the road ahead will require extensive reading, careful analysis, experimentation, and probably a few more frustrating moments with a blank document.</p><p>But at least now, I have a direction.</p><p>And sometimes, that’s all you need to get started.</p><h3>Until Next Week…</h3><p>In <em>Game of Thrones</em>, it was said, “Winter is coming.”</p><p>Here, I say…</p><p><strong>WEEK 6 IS COMING!</strong></p><p>Wish me luck as I begin this research journey. I genuinely hope the path ahead will be worth it.</p><p>Cheers!!!</p><p><strong>PS: A Little Help from You Beloved Readers</strong></p><p>Dear readers, at this point, please permit me to ask you something.</p><p><strong>Have you ever written and published a research paper?</strong></p><p>If you have, I’d genuinely appreciate it if you could share a few tips, lessons, or resources that helped you get started.</p><p>What do you wish you had known before writing your first research paper?</p><p>How did you approach your literature review, identify a research gap, or structure your methodology?</p><p>And if you’re currently on the same journey, I’d love to hear how it’s going for you too.</p><p>I would graciously appreciate your contributions, suggestions, and advice.</p><p>We all have to start somewhere, right?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a483d8ba7ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 3: The Week Python Finally Started Making Sense… Until My Math Quiz Broke!]]></title>
            <link>https://medium.com/@helloanuhi/week-3-the-week-python-finally-started-making-sense-until-my-math-quiz-broke-90e2616c3f34?source=rss-e3cec1de8d75------2</link>
            <guid isPermaLink="false">https://medium.com/p/90e2616c3f34</guid>
            <dc:creator><![CDATA[Anuhi Mustapha]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 11:16:14 GMT</pubDate>
            <atom:updated>2026-09-27T11:16:14.245Z</atom:updated>
            <content:encoded><![CDATA[<h4>New here? Catch up on my previous weekly articles for the stories, lessons, and progress that have shaped my journey so far.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sXp32JDZ6O8OlX-_PoFfYA.png" /><figcaption>Dealing with my Errors…</figcaption></figure><p><strong>Allow me to digress a bit on this one.</strong></p><p>Basically, every beautiful structure you see on the landscape of the earth is an aggregation of so many individual components, which perhaps are or can themselves be made up of different individual parts.</p><p>Does this make any sense?</p><p>Okay, let me try another approach and let’s see.</p><p>Every morsel of food you eat is a harmonious combination of several other pieces and constituents that make it what it is. You get the point now…</p><p>The understanding above is how my Week 3 studies, tasks, assignments, and deliverables came to be.</p><p>The first thing they teach you in Python is what a variable is. As you progress, you’ll meet functions, and so help you, you’ll eventually encounter classes, which I got exposed to in Week 2.</p><p>But those are the core building blocks of everything in Python.</p><p>These building blocks are now typically combined together to form something called a <strong>module</strong>.</p><p>When I first opened Week 3’s learning cave, the concept of a module presented itself as a Python file containing lots of different code, classified into functions, classes, or objects.</p><p>These series of code are put together in one place (a file with the .py extension), which is now called a module.</p><p>You see, it’s now making sense with the metaphor I gave earlier about eating a morsel of food.</p><p>To be honest, the concept landed easily. I jumped straight into Python to start implementing it, and it came out so smoothly.</p><p>This was followed by further exploration of relevant modules that are essential for data science tasks.</p><p>The exploration of the <strong>math module</strong> came in handy for mathematical calculations such as sqrt(), ceil(), and even basic mathematical constants such as pi, which can be used in calculating the geometry of circular shapes.</p><p>Dates had their share of attention too. As common as they are, it was no surprise that they would have their own dedicated modules containing everything needed to handle dates and time in Python.</p><p>Their characteristics revolve around manipulating date formats (DD-MM-YYYY) and calculating differences between dates.</p><p>Wait, did I forget about the Almighty dir() function? with this I could see all the function, classes variables that a module has.</p><p>The next time I see from something_important import something, I definitely know what&#39;s going on behind the scenes. The mystery has been demystified!</p><p>It gets even more interesting. <strong>JSON</strong> comes along…</p><p>Initially, it sounded like a guy’s name I knew in high school. Then, Jason.</p><p>It turns out that JSON is actually one of the core data exchange formats between interfaces. In Python, it provides an avenue for data exchange, and it has a module called, well… you know it: import json.</p><p>I thought I was just diving into a few neat Python built-ins — some date formatting, a bit of math, and perhaps a quick peek into standard file formats.</p><p>But as any developer will tell you, the deeper you go into Python, the more you realize that writing code isn’t just about making things work — it’s about making them resilient, structured, and production-ready.</p><p>This week wasn’t just another step forward; it was the week I transitioned from writing scripts that assume everything goes right to writing code that plans for things to go wrong.</p><h3>The Errors, The Frustrations, and The Light at the End of the Tunnel</h3><p>The mental gymnastics I went through in Week 2 while exploring the concept of classes, inheritance, and polymorphism were a force to be reckoned with.</p><p>The series of errors I encountered, or those that hit me straight in the face every time I typed something incorrectly, left me frustrated.</p><p>At some point, running a particular piece of code seemed scary.</p><p>Oh yes, because I feared there would be issues. Yet, be it as it may, my silent hisses would echo through my room as I saw those red-colored lines beneath my result section, prompting me with yet another error.</p><p>This Week 3, I saw the light at the end of the tunnel, as they say.</p><p><strong>Error handling (</strong><strong>try/except)</strong> came along, and step by step, I began to understand what errors are, the different types, and how to handle them.</p><pre># Create a program that asks the user for a number and <br># divides 100 by that number.<br><br># asking users to enter a number<br>try:<br>  xnum = int(input(&quot;Please enter a number: &quot;))<br>  result = 100/xnum<br><br>#  error message when a wrong value is entered<br>except ValueError:<br>  print(&quot;An Error Occured! Please Enter a Valid Number&quot;)<br><br>#  error message when the number is divided by 0<br>except ZeroDivisionError:<br>  print(&quot;You are trying to divide by 0. Not Acceptable!&quot;)<br><br># print when there is no error.<br>else:<br>  print(result)</pre><p>“I wish I knew this last week,” I murmured to myself, letting out a heavy sigh as I continued to download the knowledge.</p><p>The core goal was to master protecting programs from crashing when unexpected inputs occur — like preventing ZeroDivisionError or gracefully handling invalid conversions when parsing user input.</p><p>I strongly believe this will come in very handy.</p><h3>A New Perspective: Relational Databases</h3><p>A thought came to me while I was being introduced to relational databases and taking my first foundational steps into understanding how data is organized, queried, and stored beyond simple flat files.</p><p>Another layer of the data world was beginning to unfold.</p><h3>The Trouble That Taught Me a Lesson!</h3><p>If I am being honest, the learning this week was smooth. The concepts were easily understood, and applying them in practice was more than seamless. It felt like carrying a load of wood to the other side and actually getting it there.</p><p>It stayed. It clicked.</p><h3>What I Built This Week</h3><p>To solidify everything I learned, I worked through several practical implementations and projects:</p><p><strong>1. Student Record JSON Manager</strong></p><p>Built a program that stores a structured list of student records (containing names, ages, and grades) directly in a .json file and seamlessly reads them back into Python objects.</p><p><strong>2. Interactive Math Quiz Engine</strong></p><p>Programmed a dynamic tool that generates five random math questions across core operators, handles user input safely, tracks scores, and evaluates responses.</p><pre>import random<br><br>score = 0<br>operators = [&quot;+&quot;, &quot;-&quot;, &quot;*&quot;, &quot;/&quot;]<br><br>for i in range(1, 6):<br>    num1 = random.randint(1, 10)<br>    num2 = random.randint(1, 10)<br>    operator = random.choice(operators)<br><br>    # Ensure integer division with no remainders<br>    if operator == &quot;/&quot;:<br>        num1 = num1 * num2<br><br>    prompt = f&quot;Question {i}: What is {num1} {operator} {num2}? &quot;<br><br>    # Calculate expected answer based on operator<br>    if operator == &quot;+&quot;:<br>        correct_answer = num1 + num2<br>    elif operator == &quot;-&quot;:<br>        correct_answer = num1 - num2<br>    elif operator == &quot;*&quot;:<br>        correct_answer = num1 * num2<br>    elif operator == &quot;/&quot;:<br>        correct_answer = num1 // num2<br><br>    try:<br>        user_answer = float(input(prompt))<br>        if user_answer == correct_answer:<br>            print(&quot;Correct!\n&quot;)<br>            score += 1<br>        else:<br>            print(f&quot;Incorrect. The correct answer was {correct_answer}.\n&quot;)<br>    except ValueError:<br>        print(f&quot;Invalid input! The correct answer was {correct_answer}.\n&quot;)<br><br>print(f&quot;Quiz Complete! Your final score is {score}/5.&quot;)</pre><p><strong>3. Robust Division &amp; Error System</strong></p><p>Created a system that takes arbitrary user input to divide 100, smoothly catching division-by-zero errors and invalid string inputs while providing user-friendly error prompts.</p><p><strong>4. Countdown &amp; Date Calculators</strong></p><p>Built programs capable of evaluating a user’s birth year and birthday to compute exact ages, calculate date differences, and determine how many days remain until their next birthday.</p><pre># importing datetime module<br><br>import datetime<br><br>current_date = datetime.date.today()<br><br># asking for user&#39;s birthday date<br>ix_dateofbirth = input(&quot;Please enter your next birthday date in yyyy/mm/dd: &quot;)<br><br>#  converting the birthday date to YYYY-MM-DD format<br>dateofbirth = datetime.datetime.strptime(ix_dateofbirth,&quot;%Y/%m/%d&quot;)<br><br># finding the difference<br>days_left =  dateofbirth.date() - current_date<br><br># printing result in days<br>print(f&quot;You have {days_left.days} days remaining till your next birthday!&quot;)<br><br></pre><p><strong>5. Clean CLI Utilities</strong></p><p>Developed small scripts to perform GCD calculations, check positive/negative/zero states, and output clean date representations (DD-MM-YYYY).</p><h3>But… Of Course, There Will Be a But…</h3><p>One thing stressed the hell out of me: one particular thing I built.</p><p>A maths quiz.</p><p>I tried it at first, but the maths quiz was not mathing!</p><pre>import random<br><br>score = 0<br>operators = [&quot;+&quot;, &quot;-&quot;, &quot;*&quot;, &quot;/&quot;]<br><br>for i in range(1, 6):<br>    num1 = random.randint(1, 10)<br>    num2 = random.randint(1, 10)<br>    operator = random.choice(operators)<br><br>    # Ensure integer division with no remainders<br>    if operator == &quot;/&quot;:<br>        num1 = num1 * num2<br><br>    prompt = f&quot;Question {i}: What is {num1} {operator} {num2}? &quot;<br><br>    # Calculate expected answer based on operator<br>    if operator == &quot;+&quot;:<br>        correct_answer = num1 + num2<br>    elif operator == &quot;-&quot;:<br>        correct_answer = num1 - num2<br>    elif operator == &quot;*&quot;:<br>        correct_answer = num1 * num2<br>    elif operator == &quot;/&quot;:<br>        correct_answer = num1 // num2<br><br>    try:<br>        user_answer = float(input(prompt))<br>        if user_answer == correct_answer:<br>            print(&quot;Correct!\n&quot;)<br>            score += 1<br>        else:<br>            print(f&quot;Incorrect. The correct answer was {correct_answer}.\n&quot;)<br>    except ValueError:<br>        print(f&quot;Invalid input! The correct answer was {correct_answer}.\n&quot;)<br><br>print(f&quot;Quiz Complete! Your final score is {score}/5.&quot;)</pre><p>As I pen down my deliverables for this week, I realize that it has been yet another exploration of better ways to approach and solve problems, and not just about writing code.</p><p>I’m looking forward to working in depth with Python’s standard libraries, error resilience, JSON file manipulation, and virtual environments, which are now firmly in my toolkit.</p><p>Let’s see what Week 4 has installed for me…</p><p><strong>Onward to Week 4!</strong></p><p><strong>P.S.</strong> This week’s article might seem a bit off… I’ve been under the weather lately. Regardless, we will continue to show up.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90e2616c3f34" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 2: Oops! It’s Much Deeper Than I Thought — A Dive into Object-Oriented Programming and More…]]></title>
            <link>https://medium.com/@helloanuhi/week-2-oops-its-much-deeper-than-i-thought-a-dive-into-object-oriented-programming-and-more-6b1480d5dbf9?source=rss-e3cec1de8d75------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b1480d5dbf9</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Anuhi Mustapha]]></dc:creator>
            <pubDate>Fri, 18 Sep 2026 16:59:54 GMT</pubDate>
            <atom:updated>2026-09-18T16:59:54.154Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>No, not the “oops, I missed something” kind of Oops.</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8XSQiLzbIdrUKfW8ygrRdg.png" /><figcaption>With My Thought…</figcaption></figure><p>Week 2 notification came in, and with much excitement to see what was next, I anxiously opened VS Code and pulled the latest materials. At this point, I had mixed feelings: excitement and anxiety.</p><blockquote>I loved the way the Week 1 challenges stretched me, because I came out of them a different problem-solver. Then I opened this week’s task, assessment, assignments, and I blurted out… W<strong>hat in the Python world is this?</strong></blockquote><p>Despite my growing knowledge of Python, I was surprised to encounter several terminologies and concepts that felt completely unfamiliar. Well, not completely unfamiliar.</p><p>I had seen some of them before. I just never really paid attention to them. Words like <strong>Class, Object, Inheritance, Polymorphism, Iterators, and Scope</strong> suddenly became the main characters of my week.</p><p>And honestly? It was much deeper than I thought. Uncomfortable as I was with these concepts, discomfort is part of the process — and there was no escaping it.</p><h3>First Stop: Object-Oriented Programming</h3><p>One thing about me, even since university, is that I like understanding the <em>crux</em> of things whenever time and context permit. I believe every concept is built from smaller concepts. If you understand the seeds, you eventually understand the entire infrastructure.</p><p>So I brought that same approach into learning OOP. I love learning new concepts by connecting them to things I already understand — whether from life, engineering, or another subject entirely.</p><p>It makes it easier for me to process, evaluate, and comprehend them.</p><p>However, this time, I turned to a very good friend and mentor of mine(ChatGPT), who has been enormously helpful in breaking down technical jargon and gibberish into something that actually makes sense.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Thowm8J6md6qHORQ6lmhQA.png" /></figure><h4>Classes and Objects</h4><p>We started with what a <em>class</em> is, and I got the best scenario I could ask for. As a civil engineer by profession, the analogy mapped perfectly. I was told to think of a class in OOP as the blueprint or plan of a house. Based on that plan, the house is designed to have a door, windows, an exit, and so on. And from that single plan, several houses can be built — each one exhibiting the characteristics defined in the plan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ze1yAQsGPPGdioy32jPpRA.png" /><figcaption>Relatable Concept with the Blueprint of a House</figcaption></figure><p>Everything was going smoothly until I hit rock bottom with __init__ and self. Like… <strong>What exactly do you do? Who <em>are</em> you?</strong> I struggled with those two for a while, until my learning mentor finally made them click.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*8_gCvpI6pqOt8MAb8HM3xQ.png" /><figcaption>Innit?….</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*iBNcZ5hMketUPUgS04-X6A.png" /><figcaption>Try to figure out what self really mean</figcaption></figure><blockquote><strong>__init__</strong> is used to initialize the attributes of an object when the object is created, while <strong>self</strong> refers to the particular instance of the class we are working with.</blockquote><blockquote>It sounds simple now. Suddenly, OOP wasn’t looking so scary anymore</blockquote><blockquote>It did <strong>not</strong> feel simple then.</blockquote><p>… and that was an important lesson in itself: sometimes a concept only becomes “easy” after you’ve struggled with it enough to understand why it works.</p><h4>Inheritance Was Surprisingly Easy</h4><p>Then I got to <strong>inheritance </strong>and funny enough it turned out to be the most enthralling and the easiest to grasp. I treated it like a literal inheritance — inheriting your father’s property.</p><p>Here is how I understood it:</p><p>Dad already has a well-established company called Company, and everything runs fine:</p><pre>class Company:<br>    # characteristics and methods</pre><p>Then I inherit that company:</p><pre>class MyCompany(Company):<br>    # I can define my own characteristics,<br>    # while retaining — or overriding — my dad&#39;s</pre><p>I automatically get the characteristics and methods of the parent company, while I can also introduce my own or override some of what I inherited. That’s inheritance. <strong><em>Dad has the company. I inherit it. I can build on it</em>. </strong>Simple.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*mrkB87lN_ZpmWTzp6b1nXw.png" /><figcaption>Inheritance at Play… Rectangle &amp; Circle both inherited from the class Shape</figcaption></figure><h4>Polymorphism: The Guy with Many Forms</h4><p>Once the concept of inheritance clicked, I headed straight to polymorphism, and I call it <strong>“The man of many forms.”</strong></p><p>I think of polymorphism like a chameleon. The same chameleon behaves differently depending on the environment. Yes — once again, I related it to something I already knew, because that’s how I learn best. Nothing is new under the sky, innit?</p><p>Similarly, in Python, different objects can use the same method name while producing different behavior depending on the object involved.</p><p>The concept itself is that two or more functions can share the same name yet do different things depending on the context in which they’re called.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tcGr9HqabXlAanwWQAKKrA.png" /><figcaption>Dealing with Polymorphism with the method make_sound()</figcaption></figure><p>My challenge here was staying rigidly focused and paying attention to detail so I didn’t mix things up — and when I built my first polymorphic example, I ran into several errors doing exactly that. Overall, though, it was relatively easy to understand.</p><h3>Then Came My Nightmare: Iterators and Scope</h3><p>If OOP was a challenge, <strong>iterators and scope were my real boss battles.</strong></p><p>On the surface, I could understand what they meant and how to use them. The trouble started with creating them — applying methods like __iter__() and __next__() soon became confusing, and my thinking faculty began to sink.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*nQ1e_-w-kEke-e5dSzDtXQ.jpeg" /><figcaption>Just trying to understand this thing called scope</figcaption></figure><p>For scope, <em>local</em> and <em>global</em> were relatively straightforward, until the concepts of nonlocal and global entered the chat.</p><p>At this point, my good friend ChatGPT came to my rescue — or so I thought. It cleared the path a little, but I still felt overwhelmed. I had to consult several other resources, like w3schools.com and geeksforgeeks.org, until the scope of things finally dawned on me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eJxC-6KMVIMcoAdnc6KbYA.png" /><figcaption><a href="https://www.w3schools.com/python/python_scope.asp">https://www.w3schools.com/python/python_scope.asp</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0nM9dmMwLD8fzb-hz-KuqQ.png" /><figcaption><a href="https://www.geeksforgeeks.org/python/python-nonlocal-keyword/">https://www.geeksforgeeks.org/python/python-nonlocal-keyword/</a></figcaption></figure><h4>When Understanding Meets Application</h4><p>The real test of my understanding came with <strong>Library Management Systems </strong>on these concepts. It’s one thing to read and understand; it’s a whole different ball game to apply it — analytically, logically, and imperatively — to the problem in front of you.</p><p>It was time-consuming and demanding, and there were moments when I genuinely had no idea why my code wasn’t working. But I started realizing something important:</p><blockquote><strong>The errors were not the problem. My reasoning was.</strong></blockquote><p>To tackle the problem, I went back to the fundamentals of scope: I ran basic practice exercises and even prompted the AI to quiz me on my foundational understanding. Only once I was satisfied that I truly got it did I return to the problem itself. And that made a huge difference</p><h3>The Ultimate Challenge: Building a Library Management System</h3><p>The ultimate achievement of the week was building a complete <strong>Library Management System</strong> — the application of everything I’d learned: classes, objects, inheritance, polymorphism, scope, and more. It tested a deeper understanding of each concept, because it mimics real-world practice.</p><p>At first it was going extremely well… until I hit a stone wall on iterators and scope. Again. My nightmare stood right in front of me, staring me down, cold in the eyes. I panicked — I’m not even going to lie about that.</p><p>I paused.</p><p>I took a deep breath, and I closed my laptop. Wait… you thought I continued? No! Not in that state. I had to unwind.</p><p>A friend once told me that programming is <strong>80% reasoning and 20% coding</strong>.</p><p>A mentor told me something similar back when I was learning SQL in data analytics — that it’s a lot like the English language, but with a sprinkle of logic.</p><p>Which means the majority of my errors came down to one thing: I wasn’t reasoning it through the way I should. So I took a step back and tried to understand the whole scenario of what the Library Management System was actually trying to achieve:</p><ul><li>What is the goal?</li><li>What elements do I need?</li><li>What has been provided?</li><li>What hasn’t been provided?</li><li>How do I build relationships between these concepts to form solid components?</li></ul><p>A reality check jogged my memory. Imagine a man gets enlisted in the army and is trained on how to use different arsenals. When he’s called to the warfront, he is not told which weapon to pick and which one he’ll use. That battle is the real test of his months — or years — of training. He’s expected to show his skill set and put it to work to win the fight.</p><p>I faced my own share of battle while building the methods for the Member class. At first I assumed my way through it, but after several errors and no results, I went back to cool down and reason it out properly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*gXQP-SDexGx-QwDJBv5kcw.png" /></figure><h3>What OOP Has Changed for Me</h3><p>As someone moving toward <strong>Data Science and Machine Learning</strong>, this week was particularly important.</p><p>I’ve come to understand that classes and objects are fundamental parts of Python and that understanding them properly helps me appreciate how larger Python programs are structured.</p><p>Before this week, whenever I saw an object in Python, I mostly thought:</p><p><em>“Okay, that’s an object.”</em></p><p>Now, I think differently. I understand that behind that object are attributes, methods, behaviors, and mechanisms that determine how it works.</p><p>That might seem like a small thing, but for me, it’s a major shift in thinking. I’m beginning to look beyond <em>what the code does</em> and ask:</p><p><strong>Why does it work this way? What is happening underneath? How are these components connected?</strong></p><p>That curiosity is probably one of the most valuable things Week 2 gave me.</p><h3>What I’m Looking Forward To</h3><p>Week 2 has officially come to an end… and honestly?</p><p><strong>I can’t wait to see what Week 3 has in store for me.</strong></p><p>If Week 1 changed how I approached problem-solving and Week 2 pushed me deeper into how Python works, I’m genuinely curious about what comes next.</p><p>Week 2 was deeper than I thought. It tested my understanding. It tested my patience. It tested my reasoning. And, in all honesty, I’m extremely glad it did. Because every time I struggle through something and eventually understand it, I don’t just gain another Python skill.</p><p><strong>I become a better problem solver... a</strong>nd perhaps that’s the real goal. I’m not just learning how to write code. <strong>I’m learning how to think like someone who can use code to solve problems.</strong></p><p>This internship is making me comfortable with being uncomfortable. And that, I’m learning, is exactly where the real growth happens.</p><p><strong>Week 3, I’m ready. </strong>Well… <em>As ready as one can be.</em> <em>Cheers!!!</em> 🥂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b1480d5dbf9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Genesis at DataraFlow: A Confession of My First Week in a 6-Month Data Science Journey]]></title>
            <link>https://medium.com/@helloanuhi/my-genesis-at-dataraflow-a-confession-of-my-first-week-in-a-6-month-data-science-journey-50692fd9086b?source=rss-e3cec1de8d75------2</link>
            <guid isPermaLink="false">https://medium.com/p/50692fd9086b</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Anuhi Mustapha]]></dc:creator>
            <pubDate>Thu, 10 Sep 2026 09:13:12 GMT</pubDate>
            <atom:updated>2026-09-10T09:13:12.358Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jEfD7wSghk7g6icJG7-jfQ.png" /><figcaption>The Genesis: The Beginning of Something More…</figcaption></figure><h3>The Birth: Stepping Out of the Comfort Zone</h3><p>I have always wanted something more — a structured environment that pushes me far beyond my current limits soI can explore and grow. I love challenges, and I love the idea of continuous learning. For the past three years, I’ve been working in Data Analytics. While I’ve had my share of wins and continuous growth in that space, I felt a strong pull to dive deeper.</p><p>Last year, I started exploring data science as a stepping stone. I dabbled here and there, picking up pieces of information along the way, but I still felt completely lost. My ultimate goal is to become a Machine Learning Engineer. Despite exploring countless online roadmaps and free resources, I felt a lack of direction. That is where DataraFlow came in — my literal “messiah” at this turning point.</p><p>I stumbled upon this program in a job-sharing WhatsApp channel (you know, those groups that post endless opportunities and internships). The program’s description was both mind-blowing and terrifying. I’m not going to lie: I felt a wave of self-doubt. But I reminded myself of a key rule for growth:</p><blockquote><strong>if you want to scale, you must get comfortable being uncomfortable.</strong></blockquote><p>Embrace the pain and sacrifice now; they will become the stories we tell later.</p><p>Then came the email: <strong>You’re in — Welcome to DataraFlow!</strong></p><p>My immediate reaction? A mix of disbelief and sheer panic. The essay questions during the application process had truly tested my intelligence, readiness, and preparation. But here I am, ready to take on the challenge.</p><p>Fast forward to August 29th, 2026: we held our virtual orientation session, which gave us a detailed breakdown of what to expect over this intensive 24-week (6-month) curriculum. It was a reality check of the mountain we are about to climb, and honestly, it only made me more excited.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WKimQJMGEmDMN_IbreK4Lg.png" /><figcaption>24 Weeks curriculum provided by DataraFlow</figcaption></figure><h4>Week 1: The Beginning of the Journey</h4><p>They say Week 1 sets the tone for everything to come, and they weren’t lying. We started with a virtual setup session to get our development environments ready. We installed and configured:</p><ul><li><strong>VS Code</strong> (our primary IDE)</li><li><strong>Git &amp; GitHub</strong> (for version control and collaboration)</li><li><strong>Anaconda &amp; Jupyter Notebooks</strong> (for interactive data analysis)</li></ul><p>We also set up our first Python virtual environment (.venv). Fortunately, this part went smoothly for me, and seeing my workspace clean and ready was incredibly satisfying.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*4BiuSpWNQpuupwHSbBr_fQ.png" /><figcaption>My Virtual Environment Setup</figcaption></figure><p>But the real challenge began when we dive into Python. Variables, data types, and syntax fundamentals seemed straightforward enough. But then, the welcome party ended, and we were hit with tasks, assignments, and assessments. I guess what Spider-Man Grandpa said is true:</p><blockquote><strong><em>“With Great Powers Comes Great Responsibility”</em></strong></blockquote><h4>What I Learnt: Reinforcing the Foundation</h4><p>Even with three years of data analytics experience and a working knowledge of Python, going back to the fundamentals was incredibly eye-opening. It reinforced core concepts that I sometimes took for granted.</p><p>This week, we mastered:</p><ul><li><strong>Data Types &amp; Characteristics:</strong> Understanding how Python handles different structures under the hood.</li><li><strong>Advanced Control Flows:</strong> Diving deep into list comprehensions, lambda functions, and mapping/filtering data.</li><li><strong>While Loops vs. For Loops:</strong> A concept that took some conscious effort to fully internalize, but now makes perfect sense in terms of conditional execution versus iteration.</li></ul><h4>Challenges Faced &amp; How I Overcame Them</h4><p>After the welcome party of going through the Python Crash Course, I found myself staring at a blank screen, facing assignments designed to test my logic. I kid you not, but as they say, every expert was once a novice, right?As any developer will tell you, <em>the syntax is the easy part — the logic is where the real battle is won</em>.</p><p>One of our orientation speakers shared a slide that stayed with me: <strong>“Python will not save you. The tool is not the product. The problem you solve is.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PxP39YssEly3mI4zdcREqw.png" /><figcaption>— Python will not save you indeed —</figcaption></figure><p>When I got stuck on the coding logic, I realized I couldn’t just throw code at the screen. I had to step away from the IDE, grab a pen and paper, and physically dissect the problem into bite-sized logic steps. Once I understood the logic of <em>how</em> to solve the problem humanly, translating it into Python was a breeze.</p><h4>What I Built This Week</h4><p>To put our learning into practice, we built several foundational programs:</p><p>1. Multiplication Table Generator</p><p>A program that takes a user’s input and prints out a dynamically formatted multiplication table from 1 to 12.</p><pre># User can input any number<br>y = int(input(&quot;Enter a number: &quot;))<br>i = 1<br>while i &lt;= 12:<br>print(f&quot;{y} x {i} = {y * i}&quot;)<br>i = i + 1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7UfvpE0w-pem3T9KRdhIPA.png" /></figure><p>2. The Dynamic Calculator</p><p>A versatile calculator program that performs addition, subtraction, multiplication, and division based on dynamic user input. I wanted to make this as user-friendly and robust as possible.</p><pre>def calc(e, b):<br>    z = input(&quot;What calculation do you want to perform? (add, subtract, multiply, divide): &quot;).strip().lower()<br>    if z in [&#39;sum&#39;, &#39;add&#39;, &#39;addition&#39;, &#39;summation&#39;]:<br>        print(f&quot;Result: {e + b}&quot;)<br>    elif z in [&#39;subtract&#39;, &#39;subtraction&#39;, &#39;minus&#39;, &#39;difference&#39;]:<br>        print(f&quot;Result: {e - b}&quot;)<br>    elif z in [&#39;times&#39;, &#39;multiply&#39;, &#39;multiplication&#39;, &#39;product&#39;]:<br>        print(f&quot;Result: {e * b}&quot;)<br>    elif z in [&#39;divide&#39;, &#39;quotient&#39;, &#39;division&#39;]:<br>        if b == 0:<br>            return &quot;Error: Division by zero is not allowed.&quot;<br>        print(f&quot;Result: {e / b}&quot;)<br>    else:<br>        return &quot;Wrong Input or No Calculation Selected&quot;</pre><p>3. Interactive Shopping Cart</p><p>This was by far the toughest challenge of the week for. The goal was to build a program where a user could continuously add items and prices to a shopping cart and then get a formatted total. After some serious head-scratching and internet research, I unlocked the power of <strong>Python Dictionaries</strong> to manage the data dynamically.</p><pre>shopping_cart = {}<br><br>while True:<br>    item = input(&quot;Enter item name (or type &#39;done&#39; to finish): &quot;).strip()<br>    <br>    if item.lower() == &quot;done&quot;:<br>        break<br>        <br>    try:<br>        price = float(input(f&quot;Enter the price of {item}: ₦&quot;))<br>        shopping_cart[item] = price<br>    except ValueError:<br>        print(&quot;Invalid price. Please enter a number.&quot;)<br><br>print(&quot;\n--- Shopping Cart ---&quot;)<br>for item, price in shopping_cart.items():<br>    print(f&quot;{item}: ₦{price:,.2f}&quot;)<br><br>total_cost = sum(shopping_cart.values())<br>print(f&quot;\nTotal Cost: ₦{total_cost:,.2f}&quot;)</pre><h4>Conclusion: It’s all about impact</h4><p>Week 1 has completely shifted my perspective on what it means to be a data scientist. I used to think of data science as a more advanced version of data analytics, you know just heavier models and fancier algorithms. But after diving into some industry content this week, I realized it’s really about <strong>impact</strong>.</p><p>Coding, modeling, and algorithms are just tools. The real value of a data scientist lies in being a strategist who can navigate ambiguity, dissect complex business problems, and guide leadership toward data-driven decisions that move the needle.</p><p>I am not saying the coding and modelling are not important but they are just the tools to get things done.</p><blockquote>The tool doesn’t make the man but the man make use of the tools.</blockquote><p>The real goal is to guide a business toward the right decisions</p><p>As the program progresses, the Python work is only going to get deeper. My game plan for the next 23 weeks is simple: <em>stay curious, stay resilient, and make documentation and research my best friends</em><strong><em>.</em></strong> I can’t wait to see what exciting challenges Week 2 has in store for us.</p><p>Until next time… hats off!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50692fd9086b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>