<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kelvin Ndirangu</title>
    <description>The latest articles on DEV Community by Kelvin Ndirangu (@kelvin_ndirangu_6c99081b3).</description>
    <link>https://dev.to/kelvin_ndirangu_6c99081b3</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3078450%2Fef0323f3-ebbf-41b8-a3d1-63ddcac4c524.jpg</url>
      <title>DEV Community: Kelvin Ndirangu</title>
      <link>https://dev.to/kelvin_ndirangu_6c99081b3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kelvin_ndirangu_6c99081b3"/>
    <language>en</language>
    <item>
      <title>Integrating Jupyter Notebooks, PostgreSQL, and Power BI in Modern Data Workflows</title>
      <dc:creator>Kelvin Ndirangu</dc:creator>
      <pubDate>Sun, 18 May 2025 19:16:09 +0000</pubDate>
      <link>https://dev.to/kelvin_ndirangu_6c99081b3/integrating-jupyter-notebooks-postgresql-and-power-bi-in-modern-data-workflows-2gf2</link>
      <guid>https://dev.to/kelvin_ndirangu_6c99081b3/integrating-jupyter-notebooks-postgresql-and-power-bi-in-modern-data-workflows-2gf2</guid>
      <description>&lt;p&gt;Organizations are currently drowning in a sea of information in this information age. But data itself is not power, what we do with it that makes all the difference. For a lot of contemporary businesses, there is simply more to successful data transformation than easily available tools can offer. It requires a smart combination of technologies responsible for the whole journey. gathering, cleaning, stocking and analyzing the data before the final visualizing of the data. This is where the trio of Jupyter Notebooks, PostgreSQL, and Power BI excels.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Real-World Need: From Raw to Insight
&lt;/h2&gt;

&lt;p&gt;Imagine working for a real estate company in Kenya. You have thousands of listings: each with details like price, number of bedrooms, location, and size. But not all entries are complete. Some lack key information, others have inconsistent formatting, and a few are just messy. Your task is to turn this scattered data into meaningful dashboards your team can use to make real business decisions.&lt;/p&gt;

&lt;p&gt;Where do you start?&lt;/p&gt;

&lt;p&gt;That’s where modern data workflows come in. Let’s break it down with tools that many data professionals already know and love.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Data Wrangling with Jupyter Notebooks (The “E” and “T” in ETL)
&lt;/h2&gt;

&lt;p&gt;Jupyter Notebooks have become a favorite playground for data scientists. With the help of Python libraries like Pandas, data wrangling becomes efficient and transparent.&lt;br&gt;
You start by importing your CSV or JSON files into Jupyter. Using code, you clean up your dataset, removing null values, splitting text like “4 Bedrooms” into the number 4, converting price fields into the numeric format, or even detecting duplicates.&lt;/p&gt;

&lt;p&gt;But it’s more than just cleaning. You might engineer new features like calculating price per square meter or categorizing locations into zones (e.g., urban, suburban, rural). With a few lines of Python, you’re reshaping data to make it analysis-ready.&lt;br&gt;
In technical terms, this is the Extract and Transform part of the ETL (Extract, Transform, Load) pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Structured Storage in PostgreSQL (The “L” in ETL)
&lt;/h2&gt;

&lt;p&gt;Once your data is clean, the next step is storing it in a reliable database. PostgreSQL, a powerful open-source relational database is a natural choice. It’s stable, scalable, and handles structured data like a charm.&lt;br&gt;
Using libraries like SQLAlchemy or psycopg2, you can write your cleaned data from Jupyter directly into a PostgreSQL table. Now, your data isn’t just floating around in Excel sheets—it’s secure, queryable, and ready to serve a growing team.&lt;br&gt;
The beauty of PostgreSQL? It allows you to write powerful SQL queries, join data from multiple tables, enforce data validation rules, and prepare filtered views specifically for reporting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Visualizing with Power BI
&lt;/h2&gt;

&lt;p&gt;With your data safely stored and structured, it’s time to bring it to life.&lt;br&gt;
Power BI is a top-tier visualization tool. It connects directly to your PostgreSQL database (either via a live connection or scheduled import), letting you pull in the latest data in just a few clicks.&lt;br&gt;
Here’s where business decisions happen. &lt;br&gt;
You create:&lt;br&gt;
•A heatmap of Kenya showing the most expensive areas.&lt;br&gt;
•Scatter plots showing the relationship between price and bedrooms.&lt;br&gt;
•Bar charts ranking locations by average price.&lt;br&gt;
•KPI cards that show how many listings are missing key data like size or price.&lt;/p&gt;

&lt;p&gt;The best part? Power BI dashboards are interactive. A manager can filter to view only listings in Nairobi or only apartments with at least 3 bedrooms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building an Automated, End-to-End Pipeline
&lt;/h2&gt;

&lt;p&gt;The magic happens when you automate this entire process.&lt;br&gt;
•A new dataset arrives every week.&lt;br&gt;
•Your Jupyter notebook cleans and transforms the data.&lt;br&gt;
•The transformed data is automatically written to PostgreSQL.&lt;br&gt;
•Power BI refreshes the dashboard daily.&lt;/p&gt;

&lt;p&gt;No more late nights manually cleaning spreadsheets. No more “Where’s the latest file?” emails. Instead, you have built a workflow that runs like a well-oiled machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Human Side of the Workflow
&lt;/h2&gt;

&lt;p&gt;This is not just about tools. It’s about trust. Decision-makers need to trust the data they see. Automation and structure reduce human error. Clean dashboards increase confidence. Teams collaborate better when everyone sees the same source of truth.&lt;/p&gt;

&lt;p&gt;As the analyst or data scientist behind the scenes, you become more than a number cruncher; you become a translator of data into decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Modern data workflows are not a luxury they are a necessity. Jupyter Notebooks give you the flexibility and control to clean data intelligently. PostgreSQL provides a strong backbone for storing and querying structured data. Power BI turns those numbers into stories that executives can act on.&lt;br&gt;
When integrated properly, these three tools empower teams to move from chaos to clarity and from data to direction.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mastering SQL Through a Real-World Project: Building a Student Course Management System By Kelvin Ndirangu</title>
      <dc:creator>Kelvin Ndirangu</dc:creator>
      <pubDate>Sat, 03 May 2025 21:18:11 +0000</pubDate>
      <link>https://dev.to/kelvin_ndirangu_6c99081b3/mastering-sql-through-a-real-world-project-building-a-student-course-management-system-by-kelvin-2d63</link>
      <guid>https://dev.to/kelvin_ndirangu_6c99081b3/mastering-sql-through-a-real-world-project-building-a-student-course-management-system-by-kelvin-2d63</guid>
      <description>&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Why SQL Projects Matter
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Learning SQL through tutorials is helpful, but nothing beats applying it to a real project. I built a Student Course Management System from scratch using SQL. This project helped me understand how real-world databases are structured, how data flows between tables, and how to write powerful queries to extract insights.&lt;br&gt;
In this blog post, I’ll Walk you through how I applied key SQL concepts like schema design, joins, aggregate functions, views, indexes, and triggers throughout this project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Overview: Student Course Management System&lt;/strong&gt;&lt;br&gt;
This system was designed for an EdTech school to manage:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Students&lt;/li&gt;
&lt;li&gt;Courses&lt;/li&gt;
&lt;li&gt;Instructors&lt;/li&gt;
&lt;li&gt;Enrollments and Grades&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Designing the Database Schema&lt;/strong&gt;&lt;br&gt;
The first challenge was designing a relational schema with the right relationships.&lt;br&gt;
Here are the main tables:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;students
student_id (PK)
first_name, last_name, email, date_of_birth&lt;/li&gt;
&lt;li&gt;instructors
instructor_id (PK)
first_name, last_name, email&lt;/li&gt;
&lt;li&gt;courses
course_id (PK)
course_name, description, instructor_id (FK)&lt;/li&gt;
&lt;li&gt;enrollments
enrollment_id (PK)
student_id, course_id (FKs)
enrollment_date, grade&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Schema Lesson:&lt;/strong&gt;&lt;br&gt;
Design your foreign keys to enforce data consistency. This prevents students from enrolling in courses that don’t exist or instructors from teaching phantom subjects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Populating the Database&lt;/strong&gt;&lt;br&gt;
I created sample data using INSERT statements for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;10 students&lt;/li&gt;
&lt;li&gt;3 instructors&lt;/li&gt;
&lt;li&gt;5 courses&lt;/li&gt;
&lt;li&gt;15 enrollments with grades
This gave me a realistic dataset to work with in the next step queries!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Writing Real-World SQL Queries&lt;/strong&gt;&lt;br&gt;
Here’s where it got exciting. I wrote a series of queries that simulate the actual reporting needs of an EdTech platform.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Students who enrolled in at least one course:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;SELECT DISTINCT s.first_name, s.last_name&lt;br&gt;
FROM students s&lt;br&gt;
JOIN enrollments e ON s.student_id = e.student_id;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Students enrolled in more than two courses:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;SELECT s.first_name, s.last_name, COUNT(e.course_id) AS course_count&lt;br&gt;
FROM students s&lt;br&gt;
JOIN enrollments e ON s.student_id = e.student_id&lt;br&gt;
GROUP BY s.student_id&lt;br&gt;
HAVING COUNT(e.course_id) &amp;gt; 2;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Courses with number of enrolled students:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;SELECT c.course_name, COUNT(e.student_id) AS total_students&lt;br&gt;
FROM courses c&lt;br&gt;
LEFT JOIN enrollments e ON c.course_id = e.course_id&lt;br&gt;
GROUP BY c.course_name;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Average grade per course:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;SELECT c.course_name,&lt;br&gt;
       AVG(CASE grade&lt;br&gt;
             WHEN 'A' THEN 4&lt;br&gt;
             WHEN 'B' THEN 3&lt;br&gt;
             WHEN 'C' THEN 2&lt;br&gt;
             WHEN 'D' THEN 1&lt;br&gt;
             WHEN 'F' THEN 0&lt;br&gt;
           END) AS avg_gpa&lt;br&gt;
FROM enrollments e&lt;br&gt;
JOIN courses c ON e.course_id = c.course_id&lt;br&gt;
GROUP BY c.course_name;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Top 3 students by average grade:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;SELECT s.first_name, s.last_name,&lt;br&gt;
       AVG(CASE grade&lt;br&gt;
             WHEN 'A' THEN 4&lt;br&gt;
             WHEN 'B' THEN 3&lt;br&gt;
             WHEN 'C' THEN 2&lt;br&gt;
             WHEN 'D' THEN 1&lt;br&gt;
             WHEN 'F' THEN 0&lt;br&gt;
           END) AS avg_gpa&lt;br&gt;
FROM students s&lt;br&gt;
JOIN enrollments e ON s.student_id = e.student_id&lt;br&gt;
GROUP BY s.student_id&lt;br&gt;
ORDER BY avg_gpa DESC&lt;br&gt;
LIMIT 3;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQL Lessons:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use CASE statements for custom logic like grade conversion.&lt;/li&gt;
&lt;li&gt;JOIN is your best friend for combining data across tables.&lt;/li&gt;
&lt;li&gt;GROUP BY + HAVING is essential for filtering aggregates.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Hosting on GitHub&lt;/strong&gt;&lt;br&gt;
I wrapped everything into a public GitHub repository with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;SQL scripts&lt;/li&gt;
&lt;li&gt;README.md with setup instructions&lt;/li&gt;
&lt;li&gt;Entity Relationship Diagram (ERD)
GitHub link: &lt;a href="https://github.com/KELVINNDIRANGU/SQL-PROJECT-2" rel="noopener noreferrer"&gt;https://github.com/KELVINNDIRANGU/SQL-PROJECT-2&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Key Learnings&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Schema Design matters normalize wisely.&lt;/li&gt;
&lt;li&gt;Foreign Keys keep your data sane.&lt;/li&gt;
&lt;li&gt;Views simplify repeated queries.&lt;/li&gt;
&lt;li&gt;Triggers help with automation and audit logging.&lt;/li&gt;
&lt;li&gt;Indexing is crucial for performance as your data grows.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
This project transformed how I view SQL not as a list of commands, but as a tool to build real, functional systems. Whether you're preparing for a job, managing data, or automating reports, SQL is foundational.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Unlocking Excel’s Power: Master Data Analysis with Real-World Examples</title>
      <dc:creator>Kelvin Ndirangu</dc:creator>
      <pubDate>Sun, 27 Apr 2025 19:56:31 +0000</pubDate>
      <link>https://dev.to/kelvin_ndirangu_6c99081b3/unlocking-excels-power-master-data-analysis-with-real-world-examples-4k9f</link>
      <guid>https://dev.to/kelvin_ndirangu_6c99081b3/unlocking-excels-power-master-data-analysis-with-real-world-examples-4k9f</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Microsoft Excel isn’t just a spreadsheet tool; it’s your secret weapon for transforming raw data into actionable insights! Whether you're tracking sales, managing budgets, or analyzing trends, mastering Excel can elevate your data game. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s dive into how Excel can make data analysis faster, clearer, and more interactive with some real-world examples.&lt;br&gt;
Charts &amp;amp; Graphics: Turn Numbers into Stories&lt;br&gt;
Want to showcase your monthly sales or track performance over time?&lt;/p&gt;

&lt;p&gt;Excel's charts are your go to for visualizing data effectively:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Column Charts: Imagine you’re comparing total sales across products  the Column Chart will help you clearly see which product performs best.&lt;/li&gt;
&lt;li&gt;Line Charts: Looking to track sales growth over several months? A Line Chart will show you exactly where you’re gaining or losing momentum. For example, if you sell notebooks, this can help you spot seasonal trends.&lt;/li&gt;
&lt;li&gt;Pie Charts: Need to show how much each category contributes to total sales? Use a Pie Chart to see the percentage breakdown – think "what portion of my sales come from electronics versus stationery?"&lt;/li&gt;
&lt;li&gt;Scatter Charts: Ever wondered if there's a relationship between price and stock levels? A Scatter Chart is perfect for visualizing price vs. inventory to see if your product prices align with stock availability.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sparklines &amp;amp; Data Bars: Data At a Glance&lt;br&gt;
Sometimes you need a quick way to see trends without cluttering your worksheet. Sparklines and Data Bars let you display mini charts within cells, perfect for fast decision-making. For instance, with Sparklines, you can quickly track monthly sales trends next to each product's data. Data Bars visually represent sales volume, allowing you to instantly compare which products are driving the most revenue.&lt;/p&gt;

&lt;p&gt;PivotTables &amp;amp; Pivot Charts: Summary and Insights at Your Fingertips&lt;br&gt;
Managing large datasets is a breeze with PivotTables. Imagine you’re managing sales data across different regions, you can easily summarize and group by region, category, or product. Need a dynamic visual? Convert your PivotTable into a PivotChart to instantly see trends and comparisons.&lt;/p&gt;

&lt;p&gt;Bonus: Slicers add interactivity! Filter your data with just a click to focus on specific regions, categories, or periods, perfect for creating dashboards or reports.&lt;/p&gt;

&lt;p&gt;Data Cleaning: Prepare Your Data for Analysis&lt;br&gt;
Before diving into analysis, clean your data to ensure accuracy. Let’s say you have a list of customers, but there are duplicates and inconsistent names. With Remove Duplicates, TRIM(), and PROPER(), you can ensure that names are properly formatted and that no duplicate entries mess up your analysis. Use IF(ISBLANK()) to handle missing values – replace them with zeros or placeholders to ensure calculations are correct.&lt;/p&gt;

&lt;p&gt;Real-Life Example: Track Product Sales&lt;br&gt;
Let’s say you’re a sales manager for a retail company. Your team tracks product sales across different regions, and you need to create a report for an upcoming meeting. Here’s how Excel can help:&lt;br&gt;
1.Use PivotTables to summarize total sales by region and product category.&lt;br&gt;
2.Generate a PivotChart to show a visual breakdown of sales by region.&lt;br&gt;
3.Add Sparklines in the adjacent columns to display monthly trends for each product.&lt;br&gt;
4.Create a Column Chart to compare the total sales per product.&lt;br&gt;
With just these simple steps, you’ve not only summarized your data but made it interactive and easy to understand.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Excel Is Your Data Superpower&lt;br&gt;
Excel is an essential tool for anyone handling data. Whether you’re organizing finances, tracking sales, or analyzing performance, learning how to use its powerful features like charts, PivotTables, and data cleaning techniques will help you unlock a world of possibilities.&lt;br&gt;
Keep experimenting, and soon, Excel will become your go-to tool for all your data analysis needs. Ready to master it? Let’s get started!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
  </channel>
</rss>
