<?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 Joyce Kimaiyo on Medium]]></title>
        <description><![CDATA[Stories by Joyce Kimaiyo on Medium]]></description>
        <link>https://medium.com/@joy.kimaiyo?source=rss-8e921c118bf2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*qdmMMfWNLwQmuHt5</url>
            <title>Stories by Joyce Kimaiyo on Medium</title>
            <link>https://medium.com/@joy.kimaiyo?source=rss-8e921c118bf2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 19:35:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joy.kimaiyo/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[Why Would I do that?]]></title>
            <link>https://medium.com/@joy.kimaiyo/why-would-i-do-that-beb1abf6b08b?source=rss-8e921c118bf2------2</link>
            <guid isPermaLink="false">https://medium.com/p/beb1abf6b08b</guid>
            <category><![CDATA[poetry]]></category>
            <category><![CDATA[poetry-on-medium]]></category>
            <category><![CDATA[poem]]></category>
            <dc:creator><![CDATA[Joyce Kimaiyo]]></dc:creator>
            <pubDate>Wed, 02 Jul 2025 12:58:20 GMT</pubDate>
            <atom:updated>2025-07-02T12:58:20.089Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9VvH96WOcvadxINlUI4tZw.png" /></figure><p>You could say that I knew, knew my way around a sketch, and maybe everyone did, knew their way around the sketches</p><p>Then later, you could say much better now, I knew my way around the canvas, a canvas so voluminous, but you would appreciate the surface,</p><p>rich dotted canvas with a wise, intelligent wordings and sleek doings that commanded respect, and you could see, every canvas at no penny</p><p>That is why I said you would appreciate it, who wouldn&#39;t? It&#39;s a live canvas. Every kid loves a miracle, more so adults</p><p>With painted mythologies, even the Greeks would appreciate, with painted doings with justifications that could bedazzle the rabbis.</p><p>Yes, canvas, they needed that, better than cotton, canvas made from trees, took much time to break, more so voluminous canvas covered in wise words and sleek doings</p><p>Who would break it? a beast, an angel, a wiseman, a minion, a clown?, It was tough days by the time I knew my way around the canvas, pinpointing would be hard</p><p>Sometimes it would break itself, surprising! With its extended lengths, it would either break or heal. It was half good, half bad; no canvas got to choose, some broke, some healed</p><p>I would have thought what a sad way! Then realized if I could, they could too, see my rich dotted canvas with wise wordings and sleek doings, fearful of those tough days, maybe I was also made of wood</p><p>In a room full of beautiful canvas, anxious that I would break or heal in half bad half good. Now, you could say I never knew my way around the canvas, why would I do that?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=beb1abf6b08b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Real Time Data Processing with Kafka, AWS cloud, MySQL, and Looker Studio]]></title>
            <link>https://medium.com/@joy.kimaiyo/real-time-data-processing-with-kafka-aws-cloud-mysql-and-looker-studio-285314c3a518?source=rss-8e921c118bf2------2</link>
            <guid isPermaLink="false">https://medium.com/p/285314c3a518</guid>
            <category><![CDATA[looker-studio]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[real-time-analytics]]></category>
            <dc:creator><![CDATA[Joyce Kimaiyo]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 08:40:16 GMT</pubDate>
            <atom:updated>2025-06-26T08:40:16.178Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XbNQO3EjV0BE9JJykXh8NQ.png" /></figure><p>In this project, I scraped data from the tech niche on YouTube, then used a Kafka producer to stream the data and a consumer to process, clean, and load it into MySQL on AWS Cloud. Finally, I connected the AWS MySQL database to Looker Studio to create an analytics dashboard.</p><p>The dashboard visualizes:</p><ul><li>Channels with the most views and likes</li><li>Keywords with the highest views</li><li>Niches with the greatest number of views</li></ul><p>Check the repository for consumer and producer and clone <a href="https://github.com/JoyKimaiyo/youtubetechvideos">https://github.com/JoyKimaiyo/youtubetechvideos</a>, then cd youtubetechvideos</p><pre>git clone https://github.com/JoyKimaiyo/youtubetechvideos<br>cd youtubetechvideos</pre><p>Next, create a virtual environment and activate it</p><pre>python3 -m venv env<br>source env/bin/activate  <br>pip install -r requirements.txt</pre><p>First, I created a database go to AWS on the search type rds, click create database, choose MySQL, choose engine version (8.0.42), click free tier, choose a password, note down the password, wait for the database to finish creating (keep refreshing) then double click on the database and copy the endpoint.</p><p><strong>Connecting AWS MySQL cloud from the local terminal</strong></p><pre>mysql -h paste your endpoint here -u admin -p<br></pre><p>When prompted, enter your AWS database password, then create the database.</p><pre>CREATE DATABASE youtube;</pre><p><strong>Now to Kafka</strong></p><p>To download and install Kafka, go to <a href="https://kafka.apache.org/downloads">https://kafka.apache.org/downloads</a>, download the zip, then unzip it</p><pre>tar -xvzf kafka-4.0.0-src.tgz</pre><p>Open the terminal, navigate to the folder with the unzipped Kafka, and start the zookeeper and server</p><pre>cd Downloads<br>bin/zookeeper-server-start.sh config/zookeeper.properties</pre><p>Next, we start the server</p><pre>cd Downloads<br>bin/kafka-server-start.sh config/server.properties</pre><p>A Kafka server, a broker, acts as an intermediary in a Kafka cluster, facilitating communication between producers and consumers. It receives messages from producers, stores them in partitions within topics, and delivers them to consumers when requested.</p><h4>Next to our configuration</h4><p>Create a file config.py and put your DB credentials</p><pre># config.py<br>KAFKA_TOPIC = &quot;youtube_videos&quot;<br>KAFKA_BROKER = &quot;localhost:9092&quot;<br><br>DB_CONFIG = {<br>    &#39;host&#39;: &#39;your-aws-endpoint&#39;,<br>    &#39;user&#39;: &#39;admin&#39;,<br>    &#39;password&#39;: &#39;your-awsdb-password&#39;,<br>    &#39;database&#39;: &#39;youtube&#39;,<br>    &#39;charset&#39;: &#39;utf8mb4&#39;<br>}</pre><p>Open producer.py and on the terminal</p><pre>python producer.py</pre><p>Then split the terminal open the consumer.py and run</p><pre>python consumer.py</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2qy8_9fI6DmJ4dmTvTnqKQ.png" /></figure><p>Next, we connect the cloud MySQL to Looker. Open Looker Studio, and provide your AWS database credentials to connect. Drag and drop a field in the data source and select a chart from the charts.</p><p>Every time your database is updated, the Looker Studio dashboard will update itself.</p><h3>Live Dashboard</h3><p>View the interactive dashboard:<br>🔗 <a href="https://lookerstudio.google.com/s/nNfz0HhiObY">https://lookerstudio.google.com/s/nNfz0HhiObY</a></p><p>Like, Comment, and Follow</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=285314c3a518" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Batch Data Processing with Python, MySQL, Docker, Airflow, and Streamlit]]></title>
            <link>https://medium.com/@joy.kimaiyo/batch-data-processing-with-python-mysql-docker-airflow-and-streamlit-0ce8237cadda?source=rss-8e921c118bf2------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ce8237cadda</guid>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[batch-processing]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[reddit-scraper]]></category>
            <category><![CDATA[streamlit]]></category>
            <dc:creator><![CDATA[Joyce Kimaiyo]]></dc:creator>
            <pubDate>Thu, 15 May 2025 12:14:49 GMT</pubDate>
            <atom:updated>2025-05-15T12:14:49.565Z</atom:updated>
            <content:encoded><![CDATA[<h4>Streamlit app</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*_BYARA1RcdJRBr0yhoFajw.gif" /></figure><p>In this project, I will web scrape Reddit subreddit posts, store them in MySQL, and finally build a web app that displays the most recent posts to users. Reddit is a dynamic platform for keeping up with the latest trends and discussions in technology. Its community-driven nature fosters real-time conversations and valuable insights. Whether you’re an experienced professional or just getting started, Reddit provides a unique way to engage with the tech world.</p><p>With this app, users can:</p><ul><li>Discover trending news in data science and tech.</li><li>Explore discussions from top subreddits.</li><li>Get AI-powered explanations for complex terms.</li></ul><p><a href="https://joykimaiyo-reddit-news-newsbotnewsbot-khpeeh.streamlit.app/"><strong><em>Check the app here</em></strong></a></p><h4>Installing Docker</h4><p>Docker simplifies application development and deployment by packaging applications and their dependencies into lightweight, portable containers. This ensures consistent execution across different environments, speeding up development, improving reliability, and enabling efficient continuous integration and delivery (CI/CD) pipelines.</p><p>Our batch-processing pipeline will include:</p><p>Web scraping from Reddit (using the praw package).</p><p>Storing the data in MySQL (requiring MySQL and a connector).</p><p>Building a Streamlit app (using Streamlit and Pandas).</p><p>Automating the workflow with Airflow.</p><p>In a traditional setup, we would create a virtual environment, install all necessary packages, and configure Airflow’s database and environment. Docker handles all of this for us seamlessly.</p><p>Downloading and Installing go to <a href="https://docs.docker.com/desktop/setup/install/linux/ubuntu/">https://docs.docker.com/desktop/setup/install/linux/ubuntu/</a> download the desktop version so you can a version to monitor your containers. Follow the installation instructions.</p><h4>Cloning the Repository</h4><p>First, clone the repo in your terminal</p><pre>git clone https://github.com/JoyKimaiyo/Reddit_News<br>cd Reddit_News</pre><p>Inside the Reddit_News directory, we have two subfolders:</p><ul><li><strong>scraper</strong> – Handles Reddit data extraction and processing.</li><li><strong>newsbot</strong> – Manages the Streamlit web app and user interface.</li></ul><p>Each folder contains:</p><ul><li>requirements.txt – Lists Python dependencies.</li><li>Dockerfile – Defines the container setup, including base image, dependencies, and initialization.</li></ul><p>The Dockerfile for the <strong>scraper</strong> container does the following:</p><ol><li><strong>Base Image</strong>: Uses apache/airflow:2.7.3-python3.9 for workflow automation.</li><li><strong>System Dependencies</strong>: Installs default-mysql-client and gcc (needed for MySQL connectivity).</li><li><strong>Python Dependencies</strong>: Installs packages from requirements.txt, including:</li></ol><ul><li>praw==7.7.1 (Reddit API wrapper)</li><li>python-dotenv==1.0.0 (environment variables)</li><li>requests==2.31.0 (HTTP requests)</li><li>Pillow==10.1.0 (image processing)</li><li>pymysql==1.1.0 &amp; mysql-connector-python==8.1.0 (MySQL database access)</li></ul><p><strong>File Setup</strong>:</p><ul><li>Copies scraper.py into Airflow’s dags folder (for scheduled execution).</li><li>Copies and runs entrypoint.sh, which sets up Airflow user permissions and initializes the environment (airflow db migrate, webserver and scheduler).</li></ul><p>This setup ensures that the scraper runs in an isolated, reproducible environment with all dependencies managed by Docker. The same logic applies to the newsbot container, which will host the Streamlit app.</p><h4>Reddit Scraper</h4><p>Our script will scrape data from different Subreddit and we will use airflow to automate the process to run daily. We will start by importing our packages.</p><pre>from airflow import DAG<br>from airflow.operators.python import PythonOperator<br>from airflow.utils.dates import days_ago<br>from datetime import datetime, timedelta<br>import os<br>from dotenv import load_dotenv<br>import praw<br>import mysql.connector<br>import pandas as pd</pre><p>PRAW (The Python Reddit API Wrapper) is a Python package that allows you to interact with Reddit’s API, making it easy to scrape data from subreddits. It’s straightforward to set up and use. Additionally, we’ll use python-dotenv to securely load our API credentials from environment variables.</p><h4>Getting Reddit API Credentials</h4><p>To access Reddit’s API, follow these steps:</p><p>Go to <a href="https://www.reddit.com/prefs/apps">https://www.reddit.com/prefs/apps</a>.</p><p>Click “Create App” or “Create Another App”.</p><p>Fill in the details:</p><p>Name: Choose any name (e.g., “Reddit Scraper”).</p><p>App type: Select “script”.</p><p>Redirect URI: Enter <a href="http://localhost:8080/">http://localhost:8080</a> (this is required but won’t be actively used).</p><p>Click “Create”.</p><p>Once created, you’ll see:</p><p>Client ID (under “personal use script”) — This is your client_id.</p><p>Client Secret (labeled “secret”) — This is your client_secret.</p><h4>Database configuration</h4><p>Next, we will create the database and then create a table with columns. Log into MySQL.</p><pre>mysql -u root -p<br>CREATE DATABASE reddit_posts;<br>CREATE TABLE reddit_posts (<br>                post_id VARCHAR(20) PRIMARY KEY,<br>                title TEXT,<br>                selftext TEXT,<br>                url TEXT,<br>                author VARCHAR(50),<br>                score INT,<br>                publish_date DATETIME,<br>                num_of_comments INT,<br>                permalink TEXT,<br>                flair TEXT,<br>                subreddit VARCHAR(50),<br>                created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,<br>                full_text TEXT<br>            )</pre><p>Next, go back to the script and provide your MySQL credentials, put the password in the .env</p><pre># Database configuration<br>DB_CONFIG = {<br>    &quot;host&quot;: &quot;localhost&quot;,<br>    &quot;user&quot;: &quot;root&quot;,<br>    &quot;password&quot;: os.getenv(&quot;DB_PASSWORD&quot;),<br>    &quot;database&quot;: &quot;reddit_posts&quot;,<br>    &quot;auth_plugin&quot;: &quot;mysql_native_password&quot;<br>}</pre><p><strong>Your .env should look like</strong></p><pre>REDDIT_CLIENT_ID=client_id<br>REDDIT_SECRET=secret<br>REDDIT_APP_NAME=newsbot<br>REDDIT_USERNAME=ExistingManner4433<br>REDDIT_PASSWORD=…..<br>DB_PASSWORD=…..<br>GEM_API=…..</pre><h4>Getting Gemini API Key</h4><p>In the Streamlit web app, we will be using Gemini AI to help the user understand a complex term.</p><p>To get Gemini API key, go to Google AI studio <a href="https://aistudio.google.com/app/apikey">https://aistudio.google.com/app/apikey</a> and create an API key</p><p>Finally, run</p><pre>docker-compose up --build</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ppUyPQuWV59hWtg7YtBKhA.png" /></figure><h4>Subreddits to scrape</h4><pre># Subreddits to scrape<br>SUBREDDITS = [<br>    &#39;datascience&#39;,<br>    &#39;MachineLearning&#39;,<br>    &#39;LanguageTechnology&#39;,<br>    &#39;deeplearning&#39;,<br>    &#39;datasets&#39;,<br>    &#39;visualization&#39;,<br>    &#39;dataisbeautiful&#39;,<br>    &#39;learnpython&#39;<br>]</pre><p>The script will also connect to Reddit</p><pre>def get_reddit_client():<br>    try:<br>        reddit = praw.Reddit(<br>            client_id=REDDIT_CLIENT_ID,<br>            client_secret=REDDIT_SECRET,<br>            user_agent=REDDIT_APP_NAME,<br>            username=REDDIT_USERNAME,<br>            password=REDDIT_PASSWORD<br>        )<br>        reddit.user.me()  # test credentials<br>        print(&quot;Successfully authenticated with Reddit.&quot;)<br>        return reddit<br>    except Exception as e:<br>        print(f&quot;Reddit authentication failed: {e}&quot;)<br>        raise</pre><pre>def export_to_csv():<br>    conn = mysql.connector.connect(<br>        host=&#39;localhost&#39;,<br>        user=&#39;root&#39;,<br>        password=os.getenv(&quot;DB_PASSWORD&quot;),<br>        database=&#39;reddit_posts&#39;,<br>    )<br>    <br>    df = pd.readed to clean_news.csv&quot;)<br>    conn.close()</pre><p>We are limiting to 20 posts, we will be running it daily anyway and exporting to csv because to deploy on Streamlit we will need a cloud MySQL and I don&#39;t have one.</p><p>Next, we define our tasks in the DAG. The tasks includes, creating a table if it does not exist, scraping tasks, and exporting to csv.</p><pre>with DAG(<br>    dag_id=&#39;reddit_scraper_automation&#39;,<br>    default_args=default_args,<br>    description=&#39;Scrapes hot posts from specified subreddits and stores them in a database&#39;,<br>    schedule_interval=&#39;@daily&#39;,<br>    catchup=False,<br>) as dag:<br>    <br>    create_table_task = PythonOperator(<br>        task_id=&#39;create_reddit_posts_table&#39;,<br>        python_callable=create_table,<br>    )<br><br>    scrape_tasks = []<br>    for subreddit in SUBREDDITS:<br>        scrape_task = PythonOperator(<br>            task_id=f&#39;scrape_{subreddit}&#39;,<br>            python_callable=scrape_subreddit,<br>            op_kwargs={&#39;subreddit_name&#39;: subreddit, &#39;limit&#39;: 20},<br>        )<br>        scrape_tasks.append(scrape_task)<br><br>    export_csv_task = PythonOperator(<br>        task_id=&#39;export_to_csv&#39;,<br>        python_callable=export_to_csv,<br>    )<br><br>    create_table_task &gt;&gt; scrape_tasks &gt;&gt; export_csv_task</pre><h4>Now to Streamlit app</h4><p>You can check the script at <a href="https://github.com/JoyKimaiyo/Reddit_News/blob/main/newsbot/newsbot.py">https://github.com/JoyKimaiyo/Reddit_News/blob/main/newsbot/newsbot.py</a></p><p>Follow me on GitHub <a href="https://github.com/JoyKimaiyo">https://github.com/JoyKimaiyo</a></p><p>Like Share and Comment</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ce8237cadda" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Streaming Real-Time Crypto Prices to MySQL Using Apache Kafka]]></title>
            <link>https://medium.com/@joy.kimaiyo/streaming-real-time-crypto-prices-to-mysql-using-apache-kafka-d3986d62cbe7?source=rss-8e921c118bf2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3986d62cbe7</guid>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[real-time-streaming-data]]></category>
            <category><![CDATA[zookeeper]]></category>
            <dc:creator><![CDATA[Joyce Kimaiyo]]></dc:creator>
            <pubDate>Sat, 12 Apr 2025 08:20:02 GMT</pubDate>
            <atom:updated>2025-04-12T08:20:02.865Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building a live crypto data pipeline using Kafka, CoinCap, and CoinGecko APIs</h4><h4>Kafka Installation</h4><p>To install Kafka go to <a href="https://kafka.apache.org/downloads">https://kafka.apache.org/downloads</a> download the zip then unzip it</p><pre>tar -xvzf kafka-4.0.0-src.tgz</pre><p>For the project, I am using vscode as the ide. Click the terminal navigate to the folder with the unzipped Kafka and start the zookeeper and server</p><pre>bin/zookeeper-server-start.sh config/zookeeper.properties </pre><p>Next, we start the server</p><pre>bin/kafka-server-start.sh config/server.properties </pre><p>A Kafka server, a broker, acts as an intermediary in a Kafka cluster, facilitating communication between producers and consumers. It receives messages from producers, stores them in partitions within topics, and delivers them to consumers when requested.</p><h4>Why Zookeeper?</h4><p>It’s a good idea to run ZooKeeper together with Kafka in production because ZooKeeper helps Kafka work more reliably and smoothly. Here’s how:</p><p>Fault Tolerance — If one machine goes down, ZooKeeper helps keep things running by using backup machines. This makes the system more reliable.</p><p>Consistency — ZooKeeper keeps everyone (Kafka and its clients) on the same page by giving them a clear and up-to-date view of the system.</p><p>Coordination — In a big system with many parts, ZooKeeper helps them talk to each other and stay organized — like a team manager making sure everyone knows their role and works together. <a href="https://medium.com/@roopa.kushtagi/understanding-the-evolution-of-zookeeper-in-apache-kafka-eb8dbeed460f">https://medium.com/@roopa.kushtagi/understanding-the-evolution-of-zookeeper-in-apache-kafka-eb8dbeed460f</a></p><p>Next, let&#39;s create the topic (crypto-data)</p><pre>bin/kafka-topics.sh --create --topic crypto-data --bootstrap-server localhost:9092</pre><p>Create a new file and call it crypto_producer.py then let&#39;s create a producer that reads data from from coin gecko or coin cap</p><pre>import requests<br>from kafka import KafkaProducer<br>import json<br>import time<br><br>producer = KafkaProducer(<br>    bootstrap_servers=&#39;localhost:9092&#39;,<br>    value_serializer=lambda v: json.dumps(v).encode(&#39;utf-8&#39;)<br>)<br><br>def fetch_coincap():<br>    try:<br>        response = requests.get(&quot;https://api.coincap.io/v2/assets?ids=bitcoin,ethereum&quot;)<br>        response.raise_for_status()<br>        data = response.json()<br>        if isinstance(data.get(&quot;data&quot;), list):<br>            return {asset[&#39;id&#39;]: {&#39;usd&#39;: float(asset[&#39;priceUsd&#39;])} for asset in data[&quot;data&quot;]}<br>    except Exception as e:<br>        print(&quot;CoinCap Error:&quot;, e)<br>    return None<br><br>def fetch_coingecko():<br>    try:<br>        response = requests.get(&quot;https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&amp;vs_currencies=usd&quot;)<br>        response.raise_for_status()<br>        data = response.json()<br>        return {coin: {&#39;usd&#39;: price[&#39;usd&#39;]} for coin, price in data.items()}<br>    except Exception as e:<br>        print(&quot;CoinGecko Error:&quot;, e)<br>    return None<br><br>while True:<br>    prices = fetch_coincap() or fetch_coingecko()<br>    <br>    if prices:<br>        producer.send(&#39;crypto-data&#39;, value=prices)<br>        print(&quot;Sent:&quot;, prices)<br>    else:<br>        print(&quot;Failed to fetch prices from all APIs&quot;)<br><br>    time.sleep(10)</pre><p>go to the terminal, log in to your MySQL, and provide a password</p><pre>mysql -u root -p</pre><p>Then create a database named crypto_data</p><pre>CREATE DATABASE crypto_data;</pre><p>Go back to the ide and create another file called crypto_consumer.py that saves data to the SQL database using MySQL connecter</p><pre>from kafka import KafkaConsumer<br>import mysql.connector<br>import json<br>from datetime import datetime<br><br>consumer = KafkaConsumer(<br>    &#39;crypto-data&#39;,<br>    bootstrap_servers=&#39;localhost:9092&#39;,<br>    value_deserializer=lambda m: json.loads(m.decode(&#39;utf-8&#39;))<br>)<br><br>conn = mysql.connector.connect(<br>    host=&#39;localhost&#39;,<br>    user=&#39;root&#39;,<br>    password=&#39;your password&#39;,<br>    database=&#39;crypto_data&#39;<br>)<br>cursor = conn.cursor()<br><br>cursor.execute(&quot;&quot;&quot;<br>CREATE TABLE IF NOT EXISTS crypto_prices (<br>    id INT AUTO_INCREMENT PRIMARY KEY,<br>    coin VARCHAR(50),<br>    price_usd FLOAT,<br>    timestamp DATETIME<br>)<br>&quot;&quot;&quot;)<br><br>for message in consumer:<br>    data = message.value<br>    now = datetime.now()<br>    for coin, info in data.items():<br>        price = info[&#39;usd&#39;]<br>        cursor.execute(<br>            &quot;INSERT INTO crypto_prices (coin, price_usd, timestamp) VALUES (%s, %s, %s)&quot;,<br>            (coin, price, now)<br>        )<br>        conn.commit()<br>    print(&quot;Saved to DB:&quot;, data)</pre><p>Replace password and user</p><p>Now run the producer.py and then consumer.py</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jvabw3ilCn9psgNakm-rXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZYdp6LgVndrfSm5vOtaXjQ.png" /></figure><p>You’re now streaming live Bitcoin and Ethereum prices straight into a database</p><p>Follow me on GitHub <a href="https://github.com/JoyKimaiyo">https://github.com/JoyKimaiyo</a></p><p>Full code <a href="https://github.com/JoyKimaiyo/Streaming-real-time-crypto-prices-using-kafka-and-storing-in-Mysql">https://github.com/JoyKimaiyo/Streaming-real-time-crypto-prices-using-kafka-and-storing-in-Mysql</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3986d62cbe7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Social Media Sentiments Analysis Dashboard with Streamlit]]></title>
            <link>https://medium.com/@joy.kimaiyo/creating-social-media-sentiments-analysis-dashboard-with-streamlit-e4e47b62b069?source=rss-8e921c118bf2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4e47b62b069</guid>
            <category><![CDATA[plotly]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[streamlit]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[dashboard]]></category>
            <dc:creator><![CDATA[Joyce Kimaiyo]]></dc:creator>
            <pubDate>Fri, 28 Mar 2025 12:19:15 GMT</pubDate>
            <atom:updated>2025-04-01T07:41:59.267Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KF5a4bImubZfwgEmCihM8A.gif" /></figure><h3>Creating a Social Media Sentiment Analysis Dashboard with Streamlit</h3><p>Streamlit provides a platform where ordinary Python code can magically turn into an interactive web application. Imagine wanting to share your analysis or a prototype model with a non-technical stakeholder. Instead of navigating through Jupyter Notebooks or sharing static visuals, Streamlit offers a way to make these insights dynamic, interactive, and web-ready.</p><p>Whether you’re using Windows or Linux, Streamlit is incredibly easy to install — just run pip install streamlit, import it like any other Python package, and launch the app with streamlit run app.py.</p><h3>Streamlit Basics</h3><p>The entire script reruns when the code changes or when a user interacts with widgets. Widgets function like slicers in Power BI.</p><p>You can create a sidebar with st.sidebar, write markdown with st.markdown, and add radio tabs and other widgets with st.tabs, among others.</p><h4>Display Widgets Include:</h4><ul><li>st.title: Adds a title to your page.</li><li>st.header: Adds a header to your page.</li><li>st.subheader: Adds a subheader.</li><li>st.write, st.text: Adds text to your page.</li><li>st.markdown: Adds markdown-formatted text.</li><li>st.caption: Places text in a caption.</li><li>st.code: Adds a code block.</li><li>st.latex: Displays complex mathematical equations.</li><li>st.divider: Adds a horizontal divider.</li><li>st.json: Displays JSON data.</li></ul><p>Streamlit supports Python visualization tools like Plotly, Seaborn, and Matplotlib. It runs in a local environment, and you can also connect it to a database to visualize data. This means that when the database updates and you rerun your script, all visualizations refresh automatically.</p><p>Another important feature is st.cache_data, which allows you to create dynamic pages and handle progressive processes. Additional useful functions include:</p><ul><li>st.title: Adds a dashboard title.</li><li>st.map: Creates an interactive map.</li><li>st.sidebar: Organizes elements in the sidebar.</li><li>st.columns: Splits the page into columns.</li><li>st.tabs: Divides content into tabs.</li><li>st.expander: Adds expandable sections.</li><li>st.empty: Creates an empty container (useful for placeholders that can be populated dynamically)</li></ul><h3>Social Media Sentiment Analysis Dashboard</h3><h4>Problem Definition</h4><p>This project uses the Kaggle Social Media Sentiment Analysis dataset. The dataset includes user-generated content such as text, timestamps, hashtags, countries, likes, and retweets. Our goals are:</p><ul><li>Discover popular content and user preferences.</li><li>Examine variations in content across different platforms using the “Platform” column.</li><li>Identify recurring or popular hashtags.</li><li>Understand regional variations in sentiment and topic preferences.</li></ul><h4>Getting Started</h4><p>First, download the CSV file, create a folder, and open it in an IDE (I’m using VS Code, but you can use any — though Jupyter Notebook is a bit more complicated). Then, import the necessary libraries:</p><h4>Social Media Sentiments Analysis Dashboard</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EUjJlgg919Ch-Nyyu2GWYg.png" /></figure><pre>import pandas as pd #for data loading and manipulation<br><br>import streamlit as st #for our dashboard<br><br>from wordcloud import wordcloud<br><br>import plotly.express as px #for visualization<br>import plotly.graph_objects as go</pre><p>Next, we are going to set our dashboard and run streamlit run media.py I have saved my file as media.py</p><pre><br>st.title(&quot;Social Media Sentiments Analysis Dashboard&quot;)<br><br>st.sidebar.title(&quot;Social Media Sentiments Analysis&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*auO9f6ek-lCpjA5vSmeUBA.png" /></figure><h4>Loading the Data</h4><p>We’ll write a function to load the data. If the data were dirty, we’d clean it here (e.g., dropping NA values or duplicates), but since it’s clean, we’ll proceed directly:</p><pre>csv_path = &quot;/home/joy/Documents/media/sentimentdataset.csv&quot;<br># Load Data<br>@st.cache_data<br>def load_data():<br>    df = pd.read_csv(csv_path, encoding=&quot;utf-8&quot;)<br>    return df<br><br>df = load_data()<br>st.write(df.head())</pre><h4>Sidebar Filters</h4><p>On the sidebar, we’ll let users filter text by platform. First, we’ll display unique platforms, then use an if statement to filter posts by platform and show a success or warning message if no texts exist for that platform. We’ll also display one random most-liked post per platform:</p><pre>unique_platforms = sorted(df[&quot;Platform&quot;].unique()) <br><br># Find the most liked post for each platform<br>most_liked_by_platform = df.loc[df.groupby(&quot;Platform&quot;)[&quot;Likes&quot;].idxmax()]<br><br># Sidebar - Radio selection for platforms<br>st.sidebar.subheader(&quot;Most Liked Post by Platform&quot;)<br>selected_platform_radio = st.sidebar.radio(<br>    &quot;Select Platform to View Top Post&quot;,<br>    options=unique_platforms,<br>    key=&quot;platform_radio&quot;<br>)<br><br># Display the most liked post for the selected platform<br>platform_post = most_liked_by_platform[most_liked_by_platform[&quot;Platform&quot;] == selected_platform_radio]<br>if not platform_post.empty:<br>    post = platform_post.iloc[0]<br>    st.sidebar.success(<br>        f&quot;**{selected_platform_radio}** (Most Liked Post):\n\n&quot;<br>        f&quot;**👍 Likes:** {post[&#39;Likes&#39;]}\n\n&quot;<br>        f&quot;**📝 Post:** {post[&#39;Text&#39;]}\n\n&quot;<br>        f&quot;**👤 User:** {post[&#39;User&#39;]}&quot;<br>    )<br>else:<br>    st.sidebar.warning(f&quot;No posts found for {selected_platform_radio}.&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*139R5ID3GHnXs3vgIUNpQw.png" /></figure><p>We can add more widgets in our sidebar to filter our data by country, by month year and day</p><pre>selected_country = st.sidebar.selectbox(&quot;Filter by Country&quot;, df[&quot;Country&quot;].dropna().unique())<br>filtered_df = df[df[&quot;Country&quot;] == selected_country]<br><br>selected_year = st.sidebar.slider(&quot;Select Year&quot;, int(df[&quot;Year&quot;].min()), int(df[&quot;Year&quot;].max()), int(df[&quot;Year&quot;].max()))<br>selected_month = st.sidebar.selectbox(&quot;Select Month&quot;, df[&quot;Month&quot;].unique())<br>selected_day = st.sidebar.slider(&quot;Select Day&quot;, 1, 31, 1)<br><br>filtered_df = df[(df[&quot;Year&quot;] == selected_year) &amp; (df[&quot;Month&quot;] == selected_month) &amp; (df[&quot;Day&quot;] == selected_day)]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CwiQ23lR1ClAyriojbDhHQ.png" /></figure><h4>Main Dashboard Visualizations</h4><p>Now, let’s move to the main dashboard to plot and answer our questions:</p><pre># Top 10 sentiments<br>top_10_sentiments = df[&quot;Sentiment&quot;].value_counts().nlargest(10).index<br>sentiment_filtered_df = df[df[&quot;Sentiment&quot;].isin(top_10_sentiments)]<br><br># Sentiment distribution plot (Top 10)<br>st.subheader(&quot;Sentiment Distribution (Top 10)&quot;)<br>fig1 = px.bar(<br>    sentiment_filtered_df,<br>    x=&quot;Sentiment&quot;,<br>    title=&quot;Sentiment Distribution (Top 10)&quot;,<br>    category_orders={&quot;Sentiment&quot;: top_10_sentiments},<br>    color_discrete_sequence=px.colors.sequential.Viridis  # Changed to sequential<br>)<br>fig1.update_layout(xaxis_title=&quot;Sentiment&quot;, yaxis_title=&quot;Count&quot;)<br>st.plotly_chart(fig1)<br><br># Posts by platform<br>st.subheader(&quot;Posts by Platform&quot;)<br>fig2 = px.bar(<br>    df,<br>    x=&quot;Platform&quot;,<br>    title=&quot;Posts by Platform&quot;,<br>    color_discrete_sequence=px.colors.qualitative.Pastel  # This one is correct<br>)<br>fig2.update_layout(xaxis_title=&quot;Platform&quot;, yaxis_title=&quot;Count&quot;)<br>st.plotly_chart(fig2)<br><br># Average likes per platform<br>st.subheader(&quot;Average Likes per Platform&quot;)<br>platform_likes = df.groupby(&quot;Platform&quot;, as_index=False)[&quot;Likes&quot;].mean()<br>fig3 = px.bar(<br>    platform_likes,<br>    x=&quot;Platform&quot;,<br>    y=&quot;Likes&quot;,<br>    title=&quot;Average Likes per Platform&quot;,<br>    color_discrete_sequence=px.colors.qualitative.Set3  # Better for categorical data<br>)<br>fig3.update_layout(yaxis_title=&quot;Average Likes&quot;)<br>st.plotly_chart(fig3)<br><br># Average likes per sentiment<br>st.subheader(&quot;Average Likes per Sentiment (Top 10)&quot;)<br>sentiment_likes = sentiment_filtered_df.groupby(&quot;Sentiment&quot;, as_index=False)[&quot;Likes&quot;].mean()<br>fig4 = px.bar(<br>    sentiment_likes,<br>    x=&quot;Sentiment&quot;,<br>    y=&quot;Likes&quot;,<br>    title=&quot;Average Likes per Sentiment (Top 10)&quot;,<br>    category_orders={&quot;Sentiment&quot;: top_10_sentiments},<br>    color_discrete_sequence=px.colors.sequential.Plasma  # Good sequential alternative<br>)<br>fig4.update_layout(yaxis_title=&quot;Average Likes&quot;)<br>st.plotly_chart(fig4)<br><br># Sentiment-platform summary table<br>st.subheader(&quot;Sentiment Distribution by Platform&quot;)<br>sentiment_platform_counts = df.pivot_table(index=&quot;Platform&quot;, columns=&quot;Sentiment&quot;, aggfunc=&quot;size&quot;, fill_value=0)<br>st.dataframe(sentiment_platform_counts)<br><br># Map Visualization - Sentiment by Country<br>st.header(&quot;Sentiment Distribution by Country&quot;)<br><br># Create a country-sentiment count dataframe<br>country_sentiment = df.groupby([&#39;Country&#39;, &#39;Sentiment&#39;]).size().unstack(fill_value=0)<br><br># Calculate total posts per country and top sentiment<br>country_sentiment[&#39;Total&#39;] = country_sentiment.sum(axis=1)<br>country_sentiment[&#39;Top_Sentiment&#39;] = country_sentiment.drop(&#39;Total&#39;, axis=1).idxmax(axis=1)<br><br># Reset index for Plotly<br>country_sentiment = country_sentiment.reset_index()<br><br># Create the choropleth map<br>fig_map = px.choropleth(country_sentiment,<br>                        locations=&quot;Country&quot;,<br>                        locationmode=&#39;country names&#39;,<br>                        color=&quot;Total&quot;,<br>                        hover_name=&quot;Country&quot;,<br>                        hover_data=country_sentiment.columns[1:-2],<br>                        color_continuous_scale=px.colors.sequential.Plasma,<br>                        title=&quot;Social Media Sentiment by Country&quot;)<br><br># Adjust map layout<br>fig_map.update_layout(geo=dict(showframe=False, <br>                              showcoastlines=True,<br>                              projection_type=&#39;equirectangular&#39;),<br>                     margin={&quot;r&quot;:0,&quot;t&quot;:30,&quot;l&quot;:0,&quot;b&quot;:0})<br><br># Display the map<br>st.plotly_chart(fig_map, use_container_width=True)<br><br># Add a bar chart showing sentiment breakdown for selected country<br>st.subheader(&quot;Sentiment Breakdown by Country&quot;)<br><br># Let user select a country to see detailed sentiment distribution<br>selected_map_country = st.selectbox(&quot;Select Country to View Sentiment Details&quot;, <br>                                   sorted(country_sentiment[&#39;Country&#39;].unique()))<br><br># Filter data for selected country<br>country_data = country_sentiment[country_sentiment[&#39;Country&#39;] == selected_map_country]<br><br># Melt the dataframe for plotting<br>melted_data = country_data.melt(id_vars=[&#39;Country&#39;], <br>                               value_vars=country_sentiment.columns[1:-2],<br>                               var_name=&#39;Sentiment&#39;, <br>                               value_name=&#39;Count&#39;)<br><br># Create bar chart<br>fig_country = px.bar(melted_data,<br>                     x=&#39;Sentiment&#39;,<br>                     y=&#39;Count&#39;,<br>                     color=&#39;Sentiment&#39;,<br>                     title=f&quot;Sentiment Distribution in {selected_map_country}&quot;,<br>                     color_discrete_sequence=px.colors.qualitative.Pastel)<br><br>st.plotly_chart(fig_country, use_container_width=True)<br><br></pre><p>We can also add wordcloud</p><h4>From a simple this</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*auO9f6ek-lCpjA5vSmeUBA.png" /></figure><p>To this</p><h3>Final Dashboard</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KF5a4bImubZfwgEmCihM8A.gif" /></figure><h4>Word Cloud</h4><p>We can also add a word cloud to visualize common terms.</p><h4>Final Dashboard</h4><p>Next, create a GitHub repository, initialize Git (git init), add a remote (git remote add origin [URL]), and push your code.</p><p>To deploy:</p><ol><li>Click “Deploy” in Streamlit.</li><li>Select the first option (don’t change anything).</li><li>Click “Deploy” again and wait for the app to launch.</li></ol><p><strong>Live App:</strong><br><a href="https://joykimaiyo-streamlit-social-media-sentiment-anlysi-media-etmc4t.streamlit.app/">Streamlit Social Media Sentiment Analysis Dashboard</a></p><h4>Notes:</h4><ul><li>Before deploying, add a requirements.txt file with all necessary libraries.</li><li>Instead of a hardcoded CSV path, use just the filename.</li><li>Check the full code <a href="https://github.com/JoyKimaiyo/Streamlit-Social-Media-Sentiment-Analysis-Dashboard">here</a>.</li></ul><p><strong>GitHub Repo:</strong><br><a href="https://github.com/JoyKimaiyo/Streamlit-Social-Media-Sentiment-Analysis-Dashboard">JoyKimaiyo/Streamlit-Social-Media-Sentiment-Analysis-Dashboard</a></p><h4>Check the full code HERE</h4><p><a href="https://github.com/JoyKimaiyo/Streamlit-Social-Media-Sentiment-Anlysis-Dashboard">GitHub - JoyKimaiyo/Streamlit-Social-Media-Sentiment-Anlysis-Dashboard: Sentiment analysis is the process of analyzing large volumes of text to determine whether it expresses a positive, negative or neutral sentiment.</a></p><p>Like, Comment and Follow</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4e47b62b069" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scheduling with Apache Airflow: Moving Away from CRON]]></title>
            <link>https://medium.com/@joy.kimaiyo/scheduling-with-apache-airflow-moving-away-from-cron-2982754d02d4?source=rss-8e921c118bf2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2982754d02d4</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[webserver-configuration]]></category>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[scheduler]]></category>
            <dc:creator><![CDATA[Joyce Kimaiyo]]></dc:creator>
            <pubDate>Wed, 19 Mar 2025 12:25:51 GMT</pubDate>
            <atom:updated>2025-03-21T08:29:32.520Z</atom:updated>
            <content:encoded><![CDATA[<h4>Automating Our Data Analysis Process with Apache Airflow</h4><p><strong>Apache Airflow</strong> (or simply Airflow) is a platform to programmatically author, schedule, and monitor workflows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I07fL6BXBOHc9DG4bZaX-w.png" /></figure><h3>Why Use Airflow to Automate Tasks Instead of Cron?</h3><p>Cron “thinks” in time-based statements and is not truly a workflow engine but a job scheduler. In contrast, Airflow “thinks” in job-based statements and is designed as a workflow driver, specializing in data processing. For instance, in this project, we will extract, load, clean, and visualize data. Airflow will execute these tasks in the specified order.</p><h4>Apache Airflow Installation</h4><p>I am using the Linux Ubuntu version. You can check the airflow quickstart at <a href="https://airflow.apache.org/docs/apache-airflow/stable/start.html#quick-start">https://airflow.apache.org/docs/apache-airflow/stable/start.html#quick-start</a></p><pre><br>python3 -m venv airflow_env #create an environment<br><br>source airflow_env/bin/activate #activate the environment<br><br>pip install --upgrade pip #install pip or upgrade<br><br>pip install apache-airflow <br><br>#we also need to install other packages<br><br>pip install numpy pandas seaborn matplotlib kagglehub<br> <br>#kagglehub is for kaggle api<br><br></pre><h4>Running Airflow</h4><p>Now, let’s run the scheduler and web server for Airflow. First, we create credentials that will allow us to log in at the specified port. You will be prompted to enter a password. Next, we initialize the database, where you can set Postgres or MySQL, but for now, we will use the default option. The Airflow scheduler monitors all tasks and DAGs, triggering task instances whose dependencies have been met. Finally, we start the Airflow webserver, which provides a web-based UI for managing DAGs and administrative settings.</p><pre>#first you set username and password<br><br>airflow users create \<br>    --username admin \<br>    --firstname Joy \<br>    --lastname Kimaiyo \<br>    --role Admin \<br>    --email joy.kimaiyo25@gmail.com<br>#then we initialize database<br><br>airflow db init<br><br>#next we start our scheduler<br><br>airflow scheduler<br><br>#next we start our webserver<br><br>airflow webserver<br></pre><p>It will provide a link right click on it then open it in the browser. You can also do all this after writing your script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rA3jENsrI8r5qGOXgRtOsA.png" /></figure><h4>Python Code</h4><p>For this project, we will automate the data analysis process. We will fetch the Global Music Streaming Trends &amp; Listener Insights dataset from Kaggle using the Kaggle API. This dataset provides insights into music streaming trends from 2018 to 2024 across platforms like Spotify, Apple Music, and YouTube. It includes listener demographics, streaming habits, genre preferences, and engagement metrics. We will load the data using Pandas, clean it by removing null values and duplicates, visualize the data, and save the cleaned dataset as a CSV and visualizations as PNG files.</p><pre>from airflow import DAG<br>from airflow.operators.python import PythonOperator<br>from datetime import datetime<br>import kagglehub<br>import pandas as pd<br>import os<br>import seaborn as sns<br>import matplotlib.pyplot as plt<br>import warnings<br><br>warnings.simplefilter(&quot;ignore&quot;)<br>def download_data():<br>    path = kagglehub.dataset_download(&quot;atharvasoundankar/global-music-streaming-trends-and-listener-insights&quot;)<br>    print(&quot;Path to dataset files:&quot;, path)<br>download_data()<br>Path to dataset files: /home/joy/.cache/kagglehub/datasets/atharvasoundankar/global-music-streaming-trends-and-listener-insights/versions/1<br>def load_data():<br>    dataset_path = &quot;/home/joy/.cache/kagglehub/datasets/atharvasoundankar/global-music-streaming-trends-and-listener-insights/versions/1&quot;<br>    file_path = os.path.join(dataset_path, &quot;Global_Music_Streaming_Listener_Preferences.csv&quot;)<br>    df = pd.read_csv(file_path)<br>    df.to_csv(&quot;/tmp/music_data.csv&quot;, index=False)<br>load_data()<br>    <br>def data_cleaning():<br>    df = pd.read_csv(&quot;/tmp/music_data.csv&quot;)<br>    <br>    # Drop rows with null values<br>    df.dropna(inplace=True)<br>    <br>    # Drop duplicate rows<br>    df.drop_duplicates(inplace=True)<br><br>    save_path = &quot;/home/joy/Documents/music_data&quot;<br>    os.makedirs(save_path, exist_ok=True)  # Ensure directory exists<br><br>    # Save cleaned data<br>    cleaned_data_path = os.path.join(save_path, &quot;music_data_cleaned.csv&quot;)<br>    df.to_csv(cleaned_data_path, index=False)<br>    print(f&quot;Cleaned data saved to {cleaned_data_path}&quot;)<br>data_cleaning()<br>Cleaned data saved to /home/joy/Documents/music_data/music_data_cleaned.csv<br>def exploratory_analysis():<br>    df = pd.read_csv(&quot;/home/joy/Documents/music_data/music_data_cleaned.csv&quot;)<br>    print(df.head())<br>exploratory_analysis()<br>  User_ID  Age    Country Streaming Platform Top Genre  \<br>0   U1000   34      Japan              Tidal    Reggae   <br>1   U1001   24    Germany             Deezer   Country   <br>2   U1002   49    Germany             Deezer       Pop   <br>3   U1003   55  Australia            YouTube    Reggae   <br>4   U1004   13    Germany       Amazon Music    Reggae   <br><br>   Minutes Streamed Per Day  Number of Songs Liked Most Played Artist  \<br>0                       295                    138              Adele   <br>1                        86                    388         Ed Sheeran   <br>2                       363                    368        Post Malone   <br>3                       348                    349           Dua Lipa   <br>4                        30                    328              Adele   <br><br>  Subscription Type Listening Time (Morning/Afternoon/Night)  \<br>0              Free                                Afternoon   <br>1           Premium                                    Night   <br>2           Premium                                Afternoon   <br>3           Premium                                  Morning   <br>4              Free                                    Night   <br><br>   Discover Weekly Engagement (%)  Repeat Song Rate (%)  <br>0                           47.42                 16.74  <br>1                           12.06                 69.25  <br>2                           47.19                 67.38  <br>3                           31.27                 76.51  <br>4                           30.68                 43.41  <br>def visualize_data():<br>    df = pd.read_csv(&quot;/home/joy/Documents/music_data/music_data_cleaned.csv&quot;)<br>    save_path = &quot;/home/joy/Documents/music_data&quot;<br>    <br>    # Create a figure with 3 rows and 3 columns<br>    fig, axes = plt.subplots(3, 3, figsize=(20, 18))  # 3 rows, 3 columns<br>    axes = axes.flatten()  # Flatten the axes array for easy indexing<br><br>    # First Visualization: Streaming Platform Distribution (Pie Chart)<br>    plat_count = df[&#39;Streaming Platform&#39;].value_counts()<br>    axes[0].pie(plat_count, labels=plat_count.index, autopct=&#39;%1.1f%%&#39;, startangle=140, <br>                colors=sns.color_palette(&quot;pastel&quot;, len(plat_count)))<br>    axes[0].set_title(&quot;Streaming Platform Distribution&quot;)<br><br>    # Second Visualization: Age Group vs Top Genre (Stacked Bar Plot)<br>    age_bins = [13, 18, 23, 28, 33, 38, 43, 48, 53, 58, 60]<br>    age_labels = [&#39;13-18&#39;, &#39;18-23&#39;, &#39;23-28&#39;, &#39;28-33&#39;, &#39;33-38&#39;, &#39;38-43&#39;, &#39;43-48&#39;, <br>                  &#39;48-53&#39;, &#39;53-58&#39;, &#39;58-60&#39;]<br>    df[&#39;Age Group&#39;] = pd.cut(df[&#39;Age&#39;], bins=age_bins, labels=age_labels, right=False)<br>    df.groupby([&#39;Age Group&#39;, &#39;Top Genre&#39;]).size().unstack().plot(kind=&#39;bar&#39;, stacked=True, <br>                                                                  colormap=&#39;coolwarm&#39;, ax=axes[1])<br>    axes[1].set_xlabel(&quot;Age Group&quot;)<br>    axes[1].set_ylabel(&quot;Count&quot;)<br>    axes[1].set_title(&quot;Age Group vs Top Genre&quot;)<br>    axes[1].tick_params(axis=&#39;x&#39;, rotation=45)<br><br>    # Third Visualization: Most Played Artists (Bar Chart)<br>    artist_count = df[&#39;Most Played Artist&#39;].value_counts().sort_values(ascending=False)<br>    sns.barplot(x=artist_count.index, y=artist_count.values, palette=&quot;viridis&quot;, ax=axes[2])<br>    axes[2].set_xlabel(&quot;Artist&quot;)<br>    axes[2].set_ylabel(&quot;Play Count&quot;)<br>    axes[2].set_title(&quot;Most Played Artists&quot;)<br>    axes[2].tick_params(axis=&#39;x&#39;, rotation=45)<br><br>    # Fourth Visualization: Top Genre vs Avg Minutes Streamed Per Day<br>    avg_minutes_per_genre = df.groupby(&#39;Top Genre&#39;)[&#39;Minutes Streamed Per Day&#39;].mean().sort_values(ascending=False)<br>    avg_minutes_per_genre.plot(kind=&#39;bar&#39;, color=sns.color_palette(&#39;pastel&#39;), ax=axes[3])<br>    axes[3].set_xlabel(&quot;Top Genre&quot;)<br>    axes[3].set_ylabel(&quot;Avg Minutes Streamed Per Day&quot;)<br>    axes[3].set_title(&quot;Top Genre vs Avg Minutes Streamed&quot;)<br>    axes[3].tick_params(axis=&#39;x&#39;, rotation=45)<br><br>    # Fifth Visualization: Country vs Streaming Platform (Count Plot)<br>    sns.countplot(data=df, x=&#39;Country&#39;, hue=&#39;Streaming Platform&#39;, palette=&quot;Set2&quot;, ax=axes[4])<br>    axes[4].set_xlabel(&quot;Country&quot;)<br>    axes[4].set_ylabel(&quot;Count&quot;)<br>    axes[4].set_title(&quot;Country vs Streaming Platform&quot;)<br>    axes[4].tick_params(axis=&#39;x&#39;, rotation=45)<br>    axes[4].legend(title=&quot;Streaming Platform&quot;)<br><br>    # Sixth Visualization: Country vs Most Played Artist (Count Plot)<br>    sns.countplot(data=df, x=&#39;Country&#39;, hue=&#39;Most Played Artist&#39;, palette=&quot;tab10&quot;, ax=axes[5])<br>    axes[5].set_xlabel(&quot;Country&quot;)<br>    axes[5].set_ylabel(&quot;Count&quot;)<br>    axes[5].set_title(&quot;Country vs Most Played Artist&quot;)<br>    axes[5].tick_params(axis=&#39;x&#39;, rotation=45)<br>    axes[5].legend(title=&quot;Most Played Artist&quot;, bbox_to_anchor=(1.05, 1), loc=&#39;upper left&#39;)<br><br>    # Seventh Visualization: Subscription Type vs Minutes Streamed (Pie Chart)<br>    total_minutes = df.groupby(&#39;Subscription Type&#39;)[&#39;Minutes Streamed Per Day&#39;].sum()<br>    total_minutes.plot(kind=&#39;pie&#39;, autopct=&#39;%1.1f%%&#39;, colors=sns.color_palette(&#39;magma&#39;), <br>                       startangle=90, ax=axes[6])<br>    axes[6].set_title(&quot;Minutes Streamed Per Day by Subscription Type&quot;)<br>    axes[6].set_ylabel(&quot;&quot;)  # Remove default ylabel<br><br>    # Hide extra subplots (axes[7] and axes[8] since we only have 7 plots)<br>    axes[7].set_visible(False)<br>    axes[8].set_visible(False)<br><br>    # Adjust layout for better readability<br>    plt.tight_layout()<br><br>    # Save the figure before showing it<br>    visualization_path = os.path.join(save_path, &quot;music_visualizations.png&quot;)<br>    plt.savefig(visualization_path)<br>    print(f&quot;Visualizations saved to {visualization_path}&quot;)<br><br>    # Show the figure<br>    plt.show()<br><br># Call the function<br>visualize_data()<br>Visualizations saved to /home/joy/Documents/music_data/music_visualizations.png<br><br>default_args = {<br>    &#39;owner&#39;: &#39;airflow&#39;,<br>    &#39;depends_on_past&#39;: False,<br>    &#39;start_date&#39;: datetime(2025, 3, 14),<br>    &#39;retries&#39;: 4,<br>}<br>dag = DAG(<br>    &#39;music_data_analysis&#39;,<br>    default_args=default_args,<br>    schedule_interval=&#39;@daily&#39;,<br>    catchup=False,<br>)<br>download_task = PythonOperator(<br>    task_id=&#39;download_data&#39;,<br>    python_callable=download_data,<br>    dag=dag,<br>)<br>load_task = PythonOperator(<br>    task_id=&#39;load_data&#39;,<br>    python_callable=load_data,<br>    dag=dag,<br>)<br>clean_task = PythonOperator(<br>    task_id=&#39;data_cleaning&#39;,<br>    python_callable=data_cleaning,<br>    dag=dag,<br>)<br>visualize_task = PythonOperator(<br>    task_id=&#39;visualize_data&#39;,<br>    python_callable=visualize_data,<br>    dag=dag,<br>)<br>download_task &gt;&gt; load_task &gt;&gt; clean_task &gt;&gt; visualize_task<br>&lt;Task(PythonOperator): visualize_data&gt;</pre><p>In the above task, we define functions to extract, load, clean, and visualize the data, scheduling them to run daily. Then, we set up our DAG with <strong>Task Groups</strong>, which help organize tasks hierarchically within a DAG. This structure not only simplifies the Airflow UI but also improves logical partitioning, making large workflows more manageable.</p><p>Next, we download our code as py script click on file download as a python script.</p><p>Now we move our py script from downloads to dags in airflow</p><pre>airflow config get-value core dags_folder #check where your dags are located<br><br>/home/joy/airflow/dags<br><br>mv /home/joy/Downloads/data_auto.py /home/joy/airflow/dags <br><br>#moving my py script to dag path</pre><p>Now let&#39;s run the scheduler and webserver and run our dag</p><pre>airflow scheduler &amp;  # Start scheduler  <br>airflow webserver &amp;  # Start web UI<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RRBqV1-1Gc2iBCW-UBA1dg.png" /></figure><p>Check for your Python script in the <strong>DAGs</strong> category, click on it, trigger the DAG, and monitor the process through the <strong>Graph</strong> or <strong>Logs</strong> views.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XVg0sWNFo_C_TYt-MbC3NQ.png" /></figure><h3>Conclusion</h3><p>Apache Airflow is a powerful tool for automating and orchestrating data workflows. Unlike traditional <strong>Cron jobs</strong>, Airflow provides enhanced control over dependencies, scheduling, and monitoring. In this project, we demonstrated how to use Airflow to automate the process of downloading, cleaning, analyzing, and visualizing music streaming data. This setup ensures that our analysis runs seamlessly daily, reducing manual intervention and improving efficiency. By leveraging Airflow’s capabilities, we can scale and manage complex workflows effortlessly.</p><p>Code at <a href="https://github.com/JoyKimaiyo/music_data_analysis">https://github.com/JoyKimaiyo/music_data_analysis</a></p><p>Follow Like and Comment</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2982754d02d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step Guide to Install Zookeeper and Kafka on Windows]]></title>
            <link>https://medium.com/@joy.kimaiyo/step-by-step-guide-to-install-zookeeper-and-kafka-on-windows-1c61c505fcb3?source=rss-8e921c118bf2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c61c505fcb3</guid>
            <category><![CDATA[real-time-analytics]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[zookeeper-in-kafka]]></category>
            <category><![CDATA[zookeeper]]></category>
            <dc:creator><![CDATA[Joyce Kimaiyo]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 07:36:50 GMT</pubDate>
            <atom:updated>2025-02-24T07:36:50.928Z</atom:updated>
            <content:encoded><![CDATA[<h4>Installing Zookeeper and Kafka Server</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*c3iIcOrrffEf4ZJnD_vLOQ.png" /></figure><h4>What is Kafka?</h4><p>Apache Kafka is a free, open-source platform for processing and storing data streams in real-time. It’s designed to handle large volumes of data reliably and efficiently. Kafka is primarily used to build real-time streaming data pipelines and applications that adapt to the data streams. It combines messaging, storage, and stream processing to allow storage and analysis of both historical and real-time data.</p><h4>Java Download and Installation</h4><p>Apache Kafka runs on the Java Virtual Machine (JVM) because it is built using Java and Scala. To install Kafka we need to install it first. First, check if it is installed before you download it. Then download and follow the installation process</p><pre>C:\Users\USER&gt;java --version<br>java 23.0.2 2025-01-21<br>Java(TM) SE Runtime Environment (build 23.0.2+7-58)<br>Java HotSpot(TM) 64-Bit Server VM (build 23.0.2+7-58, mixed mode, sharing)<br><br>C:\Users\USER&gt;</pre><p>Download path for Java (JDK 23) <a href="https://www.oracle.com/ke/java/technologies/downloads/#jdk23-windows">https://www.oracle.com/ke/java/technologies/downloads/#jdk23-windows</a></p><p>Add JDK 23 to your system variables. If you want Kafka (and other Java applications) to recognize it, you must correctly configure your system environment variables.</p><p>Press the Windows key + X, go to System, Advanced System Settings, and click Environmental Variables.</p><p>Under System Variables, click New, and for the name, enter Java_Home. For the value, provide the path to your Java installation—mine is &quot;C:\Program Files\Java\jdk-23&quot;—then click OK. Next, also add this to the Path variable. Go back to System Variables, find Path, click Edit, then New, and add the path. Click OK to save.</p><p>3. Now we need to download Apache Kafka <a href="https://kafka.apache.org/downloads">https://kafka.apache.org/downloads</a> download the one I have selected in blue</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*67n2gsLYlMXR1Gg4ubH2oQ.png" /></figure><p>Then, you’ll need to extract the files using WinRAR or whatever app you typically use to unzip .zip or .tgz files. It’s important to extract the files directly to the local disk (C:) and rename the folder. I named mine simply &quot;Kafka&quot; because the default &quot;user downloads&quot; path can get too long, which might cause errors during installation.</p><pre>C:\Users\USER\Downloads\kafka_2.13-3.9.0&gt;.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties<br>The input line is too long.<br>The syntax of the command is incorrect</pre><h4><strong>Configuring Zookeeper and Server properties</strong></h4><p>To config zookeeper properties click on the Kafka file, then click on config</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Snp0q1udSr_1wavSKSUyg.png" /></figure><p>When you click on the Zookeeper file, it will open in your default IDE — for example, Notepad, but in my case, it’s VS Code. Change the dataDir path to your Kafka file path, then save the file by pressing Ctrl + S.</p><pre>dataDir=C:\kafka\zookeeper</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UMdKnKq-UH4XIlxdnbhGdw.png" /></figure><p>Then we do the same to server properties. We change log. dirs and then save (ctrl + s)</p><pre>log.dirs=C:\\kafka\\kafka-logs</pre><h4>Starting Zookeeper</h4><p>To start Zookeeper, open PowerShell and navigate to the Kafka file with cd (change directory) and file path cd C:\kafka. Then, enter the following</p><pre>.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h-YrMG5-jAaHuLezE0BrkA.png" /></figure><p>Next, we start the server on another new Powershell window do not close the previous one. Navigate to the Kafka file as above then paste</p><pre>.\bin\windows\kafka-server-start.bat .\config\server.properties</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hdgm_-JYP9RXrH2RAq0Hyw.png" /></figure><h4>Checking Kafka Services</h4><p>To check Kafka status we can try listing the topics currently we have none so it will return empty</p><pre>.\bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092</pre><p>Let&#39;s create a topic</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n26lppkFnLQWhEK6OxW33Q.png" /></figure><p>If you found this helpful like and follow</p><p>If you have encountered any problems you can comment and I will get back to you.</p><p>Thanks for reading 🧡</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c61c505fcb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyzing Superstore Data with Python and Power BI (Project Portfolio)]]></title>
            <link>https://medium.com/@joy.kimaiyo/analyzing-superstore-data-with-python-and-power-bi-project-portfolio-c39da60a7ffd?source=rss-8e921c118bf2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c39da60a7ffd</guid>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[superstore]]></category>
            <category><![CDATA[dax]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Joyce Kimaiyo]]></dc:creator>
            <pubDate>Tue, 18 Feb 2025 08:46:44 GMT</pubDate>
            <atom:updated>2025-02-18T08:46:44.546Z</atom:updated>
            <content:encoded><![CDATA[<h4>In this project, we will analyze Superstore data sourced from <a href="https://www.kaggle.com/datasets/ishanshrivastava28/superstore-sales/data">Kaggle</a>. Our goal is to transform data into actionable insights by leveraging Python for data analysis and Power BI for visualization.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qDVeYClGV4VhFYwzuq79DQ.png" /></figure><h4>Business Question</h4><p>The analysis aims to address the following key business questions:</p><p><strong>Sales Performance</strong>:</p><ul><li>What are the overall sales trends, and how have they evolved? Are there any significant fluctuations that need to be addressed?</li></ul><p><strong>Product Categories</strong>:</p><ul><li>Which product categories contributed the most to the company’s sales? Which categories are underperforming, if any?</li></ul><p><strong>Geographic Insights</strong>:</p><ul><li>How does sales performance vary across the regions? Are there promising geographical regions or areas requiring improved marketing?</li></ul><p><strong>Profitability</strong>:</p><ul><li>Which products are more profitable and which are not? With the available data, what factors affected the company’s profit? How is the company’s profitability during the period?</li></ul><p>The analysis also aims to discover other valuable insights about the dataset. Ultimately, this analysis intends to provide actionable insights to guide decision-making and enhance overall business performance.</p><p><strong>Data Cleaning and Exploratory Analysis</strong></p><p>For data cleaning and exploratory analysis, we are going to use pandas in Python. I find pandas easier to use when checking for null values and duplicates and exploring data for better understanding and effective analysis.</p><p>First, we are going to import pandas as pd, import our data, and then check the first 5 rows.</p><pre>import pandas as pd<br><br>df = pd.read_csv(r&quot;C:\Users\USER\Downloads\Superstore.csv&quot;, encoding=&#39;latin1&#39;)<br>df.head()</pre><p>Next, let&#39;s check for null values with .isna and drop duplicated values with .drop_duplicates(). By default, drop_duplicates() scans the entire DataFrame for duplicate rows and removes all subsequent occurrences, retaining only the first instance is the simple and efficient method.</p><pre># null values<br>df.isna().sum()<br><br># duplicates values<br>df.drop_duplicates()<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JPyWanwAngXp_NXeeXalCg.png" /></figure><p>Next, we need to change the date format. The best date format for Power BI is generally considered to be “YYYY-MM-DD” (year-month-day), which aligns with the ISO 8601 standard, ensuring clarity and compatibility across different systems and regions; this format is also recommended for data analysis and avoids potential confusion with different date formatting conventions. Our dates are 09–11–2013 we want to change them to 2013–09–11.</p><pre>df[&#39;Order Date&#39;]=pd.to_datetime(df[&#39;Order Date&#39;],format=&#39;%d-%m-%Y&#39;)<br>df[&#39;Ship Date&#39;]=pd.to_datetime(df[&#39;Ship Date&#39;],format=&#39;%d-%m-%Y&#39;)</pre><p>We can do other exploratory analysis</p><pre>df.info() #to check for columns non nulls data type<br><br>df.size #to check the number of rows<br><br>df.shape #how many rows and columns are there<br><br>df.describe() #to calculate basic statistics (mean, mode, median)</pre><p>Then next we export the CSV file</p><pre>df.to_csv(r&quot;C:\Users\USER\Downloads\Superstore2_modified.csv&quot;, index=False, encoding=&#39;latin1&#39;)</pre><p><strong>Data Visualization</strong><br>Next, we open a blank Power BI report and import data from Excel, then load it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qDVeYClGV4VhFYwzuq79DQ.png" /></figure><ol><li><strong>What are the overall sales trends, and how have they evolved? Are there any significant fluctuations that need to be addressed?</strong><br>To analyze how sales have evolved, we use a line chart, as it effectively visualizes trends over time. We click on the line chart visualization, drag the order date (year) to the x-axis, and sales to the y-axis. From the visualization, we observe that sales fluctuated in 2012, followed by a steady rise from 2013 to 2014.</li><li><strong>Which product categories contributed the most to the company’s sales? Which categories are underperforming, if any?</strong><br>We select the pie chart visualization, drag the category field to the legend, and sales to the values. The pie chart reveals that office supplies contribute the least to sales, while technology contributes the most.</li><li><strong>How does sales performance vary across regions? Are there promising geographical regions or areas requiring improved marketing?</strong><br>For this analysis, we use a bar chart. We drag the region field to the x-axis and sales to the y-axis. The visualization shows that the West performs the best, while the South performs the least. The East region is promising, ranking second in sales performance.</li><li><strong>Which products are more profitable, and which are not?</strong><br>We use a multi-row card visualization to evaluate product performance. We drag the subcategory and profit fields into the card, add a title in the format tab, and sort the data in ascending order. The visualization indicates that accessories are the most profitable, while tables are not profitable at all.</li><li><strong>With the available data, what factors affected the company’s profit?</strong><br>We conduct multiple analyses here:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G5BPoAnPDClgQKeimO8-1g.png" /></figure><ul><li>First, we examine the ship mode and find that standard shipping contributes the highest profit, while same-day shipping contributes less.</li><li>Next, we analyze the relationship between customer segments and profit. Consumers contribute the highest profit.</li><li>Then, we look at state-wise profit and see that California generates the highest profit.</li><li>Finally, we check for seasonal variations and find that quarters 3 and 4 of every year consistently yield the highest profits.</li></ul><p><strong>6. How is the company’s profitability during the period?</strong><br>The company’s profit has been rising steadily from 2011 to 2014.</p><p><strong>Other Valuable Insights</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*itJKMlfPNuvGuh2alRAjDw.png" /></figure><ul><li><strong>Operational Efficiency:</strong><br>We assess operational efficiency by calculating the average delivery time. Using a calculated column, we determine the difference between the order date and ship date. In table view, we create a new column with the formula:</li></ul><pre>DeliveryTime = DATEDIFF(&#39;Superstore2_modified&#39;[Order Date], &#39;Superstore2_modified&#39;[Ship Date], DAY)</pre><p>Next, we add a card visualization, drag the average delivery time to the fields, and find that the company’s average delivery time is almost 4 days.</p><p><strong>Customer Loyalty:</strong><br>We evaluate customer loyalty by identifying repeated customers. Using a DAX calculation, we create a new measure with the formula:</p><pre>RepeatCustomers = <br>CALCULATE(<br>    DISTINCTCOUNT(Superstore2_modified[Customer Name]),<br>    FILTER(<br>        Superstore2_modified,<br>        COUNTROWS(FILTER(Superstore2_modified, Superstore2_modified[Customer Name] = EARLIER(Superstore2_modified[Customer Name]))) &gt; 1<br>    )</pre><ul><li>From this, we find there are 788 repeated customers.</li></ul><p>We can also analyze the average delivery time by ship mode and explore how delivery time impacts sales and profits.</p><p>GitHub <a href="https://github.com/JoyKimaiyo">https://github.com/JoyKimaiyo</a></p><p>Like 👍</p><p>Comment</p><p>Follow</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c39da60a7ffd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step Shell Scripting for Beginners]]></title>
            <link>https://medium.com/@joy.kimaiyo/step-by-step-shell-scripting-for-beginners-0d8e680bca3f?source=rss-8e921c118bf2------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d8e680bca3f</guid>
            <category><![CDATA[linux-commands]]></category>
            <category><![CDATA[bash-scripting]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[shellscripting]]></category>
            <dc:creator><![CDATA[Joyce Kimaiyo]]></dc:creator>
            <pubDate>Mon, 27 Jan 2025 10:55:18 GMT</pubDate>
            <atom:updated>2025-02-05T08:06:07.046Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*K-sr8SMNHGxVXqjslcuDQA.png" /></figure><p><strong>Installing Sublime Text</strong></p><p>We will use Sublime Text because it has an auto-complete function and a sophisticated editor. To install Sublime Text, open the terminal and run the following commands:</p><pre>sudo apt update<br># then<br>sudo apt install apt-transport-https ca-certificates curl software-properties-common<br># then<br>curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | sudo tee /etc/apt/trusted.gpg.d/sublimehq.asc<br># then<br>sudo apt update<br># then<br>sudo apt install sublime-text<br># then to run<br>subl</pre><p>To get a better understanding of the full tutorial, you can visit <a href="https://www.sublimetext.com/docs/linux_repositories.html">Sublime Text’s official documentation</a>.</p><p><strong>How to Use Sublime Text for Shell Scripting</strong></p><p>After running subl, Sublime Text will open. Click on <strong>Tools</strong> &gt; <strong>Build System</strong> &gt; <strong>New Build System</strong>. This will open a new file. Replace the existing content with the following:</p><pre>{<br>  &quot;cmd&quot;: [&quot;bash&quot;, &quot;$file&quot;],<br>  &quot;selector&quot;: &quot;source.shell&quot;,<br>  &quot;shell&quot;: true<br>}</pre><p>Save the file by clicking <strong>File</strong> &gt; <strong>Save</strong>. Then, go to <strong>Tools</strong> again, select <strong>Build System</strong>, and check <strong>Bash</strong>. Click <strong>Ctrl + B</strong>.</p><p>Now, create a new file, save it (I’m saving mine as text.sh, as Bash scripts end in .sh), and add the<strong> shebang line</strong>. Its function is simple: it tells the system which binary to use to execute the script. For ours, it is #!/bin/bash. Also, permit the execution of the file chmod and change it from read-only.</p><p>Let’s do a simple <strong>Hello World</strong>:</p><pre>#!/bin/bash<br>chmod +x text.sh<br>echo &quot;hello world&quot;<br># Ctrl + B to run</pre><p><strong>Variables</strong></p><p>Variables allow us to store information to reference and use later, often multiple times. In any programming language, you first need to learn how to define a variable and print the output. In Bash, we also have data types: strings are defined with quotes, and integers are not.</p><p><strong>Defining a variable</strong>:</p><pre>greetings=&quot;hello&quot; # no spaces</pre><p><strong>Printing the variable</strong>:</p><pre>echo $greetings</pre><p><strong>You can even print two variables</strong>:</p><pre>name=&quot;joy&quot;<br>echo &quot;$greetings my name is $name&quot;<br># It will print &quot;hello my name is joy&quot;</pre><p>To delete a variable, we use unset:</p><pre>unset greetings<br># When you echo it, it will return an empty line</pre><p><strong>User Input and Comments</strong></p><p>User input allows you to get a value from a user. For instance, in Python, we use the input() function:</p><pre>name = input(&quot;Enter your name: &quot;)<br>print(&quot;Welcome &quot; + name)<br># It will print &quot;Welcome name&quot;</pre><p>In Bash, it is similar. Comments are used to explain what the code does, and we use # for comments in shell scripts. The shell ignores whatever comes after #.</p><pre># This is a comment explaining the next command<br>read -p &quot;Enter your name: &quot; name<br>echo &quot;Welcome $name&quot;<br># -p prompts the user to enter the name, which is stored in the &#39;name&#39; variable</pre><p>We can even do multiple inputs:</p><pre>read -p &quot;Please enter your name: &quot; name<br>read -p &quot;Enter your age: &quot; age<br>read -p &quot;Enter your favorite color: &quot; color<br>echo &quot;Welcome $name, you are $age and your favorite color is $color&quot;</pre><p>We cannot run user input in Sublime Text, so after writing the input script, open the terminal and run the script using:</p><pre>./text.sh</pre><p>You can also use echo to prompt for input:</p><pre>echo &quot;What is your name?: &quot;<br>read name<br>echo &quot;Welcome, $name&quot;</pre><p><strong>Conditional Statements</strong></p><p>In Python, we have if and else statements:</p><pre>if 8 &gt; 3:<br>    print(&quot;wow&quot;)<br>else:<br>    print(&quot;nooo&quot;)</pre><p>In SQL, we use CASE WHEN:</p><pre>CASE<br>    WHEN birth_year &lt;= 1990 THEN &#39;Millennial&#39;<br>    ELSE &#39;Gen-Z&#39;<br>END;</pre><p>In Shell scripting, we also have if and else statements:</p><pre>if [[ 8 &gt; 3 ]]; then<br>    echo &quot;wow&quot;<br>else<br>    echo &quot;nooo&quot;<br>fi</pre><p>If the condition is true (which in this case it is), Bash executes the statements in statement_block_1 before exiting the conditional block of code. If the condition is false, Bash runs the statements in statement_block_2 under else, then exits the block and continues with any commands after the closing fi.</p><p>We can also use conditional statements with user input:</p><pre>echo &quot;Enter your age: &quot;<br>read age</pre><pre>if (( $age &lt;= 12 )); then<br>    echo &quot;You are not allowed to access the app&quot;<br>else<br>    echo &quot;Welcome to our app&quot;<br>fi</pre><p>You can also perform arithmetic calculations:</p><pre>a=2<br>b=3<br>echo $((a + b))</pre><p><strong>Tests</strong></p><p>The test command is used to evaluate expressions within a shell script. It checks the validity of a condition and returns either:</p><ul><li>0 for true (successful)</li><li>1 for false (unsuccessful)</li></ul><p>Let’s check whether the directory linux_commands still exists:</p><pre>if [ -d /home/joy/linux_commands ]; then<br>    echo &quot;Yes, the directory exists.&quot;<br>else<br>    echo &quot;No, it does not exist.&quot;<br>fi</pre><p>You can also check whether a number is greater or less than another number:</p><pre>a=8</pre><pre>if (( a == 9 )); then<br>    echo &quot;Yes, it&#39;s equal to 9.&quot;<br>else<br>    echo &quot;It&#39;s not equal to 9.&quot;<br>fi</pre><p><strong>Loops</strong></p><p>The for loop is one of the most powerful loops in Bash scripting. It allows us to iterate over a list of items. Each loop will use a different item in the list in sequential order. Here&#39;s an example with a list of words:</p><pre>words=&quot;I love bash scripting&quot;<br>for word in $words; do<br>    echo &quot;The word is: $word&quot;<br>done</pre><p><strong>Functions</strong></p><p>A function is a block of code that only runs when it is called. You can pass data, known as parameters, into a function, and a function can return data as a result.</p><p>In Bash, functions are defined almost the same as in Python. Here’s an example:</p><pre>my_function() { # Define the function<br>    echo &quot;hello world&quot; # This prints &quot;hello world&quot;<br>}</pre><pre>my_function # Then we call the function</pre><p>We can also do an if-else statement in a function to check if a file exists:</p><pre>check_file() {<br>    if [ -e /home/joy/Documents/password_generator.sh ]; then<br>        echo &quot;Yes, it exists&quot;<br>    else<br>        echo &quot;No, it does not exist&quot;<br>    fi<br>}</pre><pre>check_file</pre><p><strong>Practical Examples</strong></p><p>What can we do with shell scripting?</p><p><strong><em>Password Generator</em></strong></p><p>Since common words or phrases are easy for a cybercriminal to crack, using a password generator combats dictionary attacks. We can write a script that generates a password using OpenSSL:</p><pre>echo &quot;This script will help you create random passwords for your accounts&quot;<br>read -p &quot;Enter the length of the password: &quot; pass_length<br>read -p &quot;Enter the number of passwords you need: &quot; num_passwords</pre><pre># Create a loop to generate passwords<br>for i in $(seq 1 &quot;$num_passwords&quot;); do<br>    openssl rand -base64 48 | cut -c1-&quot;$pass_length&quot;<br>done</pre><p>You can redirect the output to a .txt file for later use:</p><pre>echo &quot;This will help you generate passwords&quot;<br>read -p &quot;Enter the length of your passwords: &quot; pass_length<br>read -p &quot;Enter the number of passwords to generate: &quot; num_passwords</pre><pre>for i in $(seq 1 &quot;$num_passwords&quot;); do<br>    openssl rand -base64 48 | cut -c1-&quot;$pass_length&quot; &gt;&gt; passwords.txt<br>done</pre><pre># Check the passwords using &#39;cat&#39;<br>cat passwords.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nj8pE1Afbf-frNpHWLc0OQ.png" /></figure><p><strong><em>Automation</em></strong></p><p>We can automate a task to run at a specific time using cron jobs. Cron jobs follow a specific syntax for scheduling, allowing users to specify when and how often a task should be executed. Here’s an example:</p><pre># To check existing cron jobs:<br>crontab -l</pre><pre># To edit a crontab:<br>crontab -e</pre><pre># To delete all cron jobs:<br>crontab -r</pre><p>Set up a cron job that echoes “Welcome to cron” and stores the output in joy.txt:</p><pre># Edit the crontab<br>crontab -e<br>export VISUAL=nano<br>crontab -e</pre><pre># Set up the cron job:<br>25 12 * * * echo &quot;Welcome to cron&quot; &gt;&gt; joy.txt</pre><p>Press <strong>Ctrl + X</strong>, then <strong>Y</strong>, and hit <strong>Enter</strong>. Check if the job exists with crontab -l, and view the contents of the file with cat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kNLe88lT0_hLacKui5OhTg.png" /></figure><p><strong>File Encrypting and Decrypting</strong></p><p>File encryption ensures that unauthorized users cannot access private files. The sender encrypts the file using a public key, and the recipient uses a private key to decrypt it.</p><p>Here’s a simple script for encryption and decryption:</p><pre>echo &quot;This is a simple encrypter/decrypter&quot;<br>echo &quot;Please choose what you want to do&quot;<br>choices=&quot;encrypt decrypt&quot; # Provides options</pre><pre>select option in $choices; do<br>    if [ &quot;$REPLY&quot; -eq 1 ]; then<br>        echo &quot;You have selected encryption&quot;<br>        echo &quot;Please enter the file name&quot;<br>        read file<br>        gpg -c &quot;$file&quot;<br>        echo &quot;File has been encrypted&quot;<br>    elif [ &quot;$REPLY&quot; -eq 2 ]; then<br>        echo &quot;You have selected decryption&quot;<br>        echo &quot;Please enter the file name&quot;<br>        read file2<br>        gpg -d &quot;$file2&quot;<br>        echo &quot;The file has been decrypted&quot;<br>    else<br>        echo &quot;Invalid option, please select either &#39;encrypt&#39; or &#39;decrypt&#39;&quot;<br>    fi<br>    break<br>done</pre><p>Save and run the script. It will prompt you to either encrypt or decrypt. Choose <strong>1</strong> for encryption, provide the file name, and enter the passphrase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tt0qy8zfD5TvZNl99IKVUw.png" /></figure><p><strong>Notes:</strong></p><ul><li>To change a file’s permission to read-only, use chmod -x test.sh.</li><li>For a cheat sheet on shell scripting, check out <a href="https://github.com/JoyKimaiyo/Shell-Scripting-basics">this link</a>.</li></ul><p><strong>Shortcuts:</strong></p><ul><li><strong>Ctrl + S</strong> to save a script.</li><li><strong>Ctrl + B</strong> to run the script.</li><li>If you already know Python, Bash scripting is very easy to pick up!</li><li>Follow me like and comment I am in a learning journey help here and there will be helpful and appreciated</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d8e680bca3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10+ Essential Linux Commands Every User Should Know]]></title>
            <link>https://medium.com/@joy.kimaiyo/10-essential-linux-commands-every-user-should-know-363e7814edf7?source=rss-8e921c118bf2------2</link>
            <guid isPermaLink="false">https://medium.com/p/363e7814edf7</guid>
            <category><![CDATA[linuxworld]]></category>
            <category><![CDATA[linux-tutorial]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[linux-commands]]></category>
            <category><![CDATA[computer-network]]></category>
            <dc:creator><![CDATA[Joyce Kimaiyo]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 10:27:07 GMT</pubDate>
            <atom:updated>2025-01-22T10:17:11.349Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*YssOjyYerz_JA7p_J1EOwQ.jpeg" /></figure><p>As a programmer, Linux is the best OS for almost everything. If you want to web scrape, you can use curl. If you&#39;re looking to install an app, you can do so with sudo apt install. If you want to automate boring tasks, like reading emails, Linux can handle that too. Want to create a file? Use touch. As I explore Linux, I realize I’ve been surviving on Windows. Let’s explore some commands to get you started with Linux.</p><p>I am using Linux on VirtualBox. To install Ubuntu on a virtual machine, download VirtualBox from <a href="https://www.virtualbox.org/wiki/Downloads">https://www.virtualbox.org/wiki/Downloads</a> and follow the installation guide. Then, download the Ubuntu ISO image from <a href="https://ubuntu.com/download/desktop">https://ubuntu.com/download/desktop</a>. Save the path and follow the installation instructions on VirtualBox at <a href="https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox#1-overview">https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox#1-overview</a>.</p><p>After installation, we’ll use it vim as our command-line interface, similar to CMD in Windows. Vim can also be used as a graphical user interface, like Visual Studio Code. Vim comes pre-installed with Ubuntu. To openvim, go to show apps and search forvim, and then click on the terminal.</p><h3>Linux File and Directory Management Commands</h3><p>In our daily use of computers, we often need to create a file or a directory. Some directories, such as Documents, Downloads, and Music, are pre-created by the operating system. In Windows, you can create folders within these pre-created directories. For instance, if you want to add a folder in the Documents directory, that’s possible. But in Linux, you can create standalone directories. For example, to create a directory calledlinux_commands, use:</p><pre>mkdir linux_commands</pre><p>Now, I need to navigate to my directory and create a file called lfdmc.txt to store Linux files and directory management commands in a text format. To do this, I will use cd (short for &quot;change directory&quot;). Currently, I am in the home directory:</p><pre>cd linux_commands</pre><p>Next, I will use touch to create an empty file called lfdmc.txt:</p><pre>touch lfdmc.txt</pre><p>We can also add other files like lfdnc.txt, facc.txt, nc.txt, and new.txt.</p><p>To remove a file from the directory, use rm followed by the file name:</p><pre>rm new.txt</pre><p>The the rm -r command removes an entire directory with its files. However, you should only use it rm -r when you are sure you no longer need the directory.</p><p>Now let’s add content to the file lfdmc.txt. We’ll use cat or echo. We’ll use it cat to add content to lfdmc.txt and echo for lfdnc.txt. When you use cat &gt; lfdmc.txt, it writes the content in one line. If you want to append more lines, use &gt;&gt;:</p><pre>cat &gt;&gt; lfdmc.txt</pre><p>You can write the following:</p><pre>cd is used to change the directory<br>mkdir is used to create a directory<br>touch is used to create an empty file<br>rm is used to remove a file from a directory<br>cat is used to add and view file contents</pre><p>When finished, press CTRL + D to exit.</p><p>Using echo is similar. Echo prints the output. For instance, in Python, you useprint(&quot;hello world&quot;), or in JavaScript, console.log(&quot;hello world&quot;). With echo, you can do something like this but specify where you want the output to be stored otherwise it prints on the terminal :</p><pre>echo &quot;cd is used to change the directory<br>mkdir is used to create a directory<br>touch is used to create an empty file<br>rm is used to remove a file from a directory<br>cat is used to add and view file contents&quot; &gt;&gt; lfdnc.txt</pre><p>To view the content of the file, use cat:</p><pre>cat lfdmc.txt</pre><p>Other commands to view files include head, tail, and more.</p><h3>Other Useful Commands</h3><ul><li>date -r display the time a file was created. For example:</li></ul><pre>date -r lfdmc.txt</pre><ul><li>cp copies files. Use cp -r to copy a directory with its contents. For example:</li></ul><pre>cp lfdmc.txt backup_lfdmc.txt</pre><pre>cp -r linux_commands backup_linux_commands</pre><ul><li>mv moves files and directories or renames them:</li></ul><pre>mv lfdmc.txt documents</pre><pre>mv lfdmc.txt new.txt</pre><ul><li>chmod changes file permissions. For instance:</li></ul><pre><br>chmod 700 new.txt<br>#Make a file readable and writable for everyone<br>chmod 666 new.txt<br>#Add execute permission for the owner<br>chmod u+x new.txt<br>#use it to grant read, write, and execute permissions to the owner</pre><p>To view the contents of a directory, use ls. For more information, use ls -l:</p><pre>ls<br>ls -l</pre><p>The pwd command prints the working directory, showing you where you are before changing directories.</p><p>The the find command helps in finding files and directories. For example, to find new.txt:</p><pre>find . -name &quot;new.txt&quot;</pre><h3>Wrangling Text Files</h3><p>Let’s create a new file with random names, some repeated, called names.txt in the linux_commands directory:</p><pre>touch names.txt</pre><p>Add names using cat:</p><pre>cat &gt;&gt; names.txt<br>Sophia Anderson  <br>Liam Carter  <br>Isabella Johnson  <br>Ethan Reynolds  <br>Amelia Brooks  <br>Mason Taylor  <br>Olivia Scott  <br>Noah Hughes  <br>Ava Bennett  <br>William Morgan  <br>Mia Patterson  <br>Benjamin Hayes  <br>Charlotte Turner  <br>James Coleman  <br>Alexander Price  <br>Sophia Bennett  <br>Liam Hayes  <br>Isabella Turner  <br>Ethan Carter  <br>Amelia Scott #exit using ctrl + d</pre><p>To check the content, use cat:</p><pre>cat names.txt</pre><p>You can use the sort command to sort names alphabetically:</p><pre>sort names.txt</pre><p>To reverse the order, use sort -r:</p><pre>sort -r names.txt</pre><p>The uniq command filters out duplicate content in consecutive lines. It has to follow each other for instance apple, apple, banana, apple when you do uniq it will return apple, banana, apple. This makes uniq seem a little bit useless in some cases but you can combine sort and uniq and place the output in a new file this is called a pipe.</p><p>In Linux, pipes allow you to use the output of one command as the input for another. For example, consider a file that contains names, some of which are repeated. If we want to sort the names and store only the unique ones in a new file called names_unique.txt, we can use the following pipeline:</p><pre>sort names.txt | uniq &gt; names_unique.txt</pre><p>In this pipeline, the sort command first arranges the names in alphabetical order a-z. The output is then passed touniq, which filters out any duplicates. Finally, the unique names are saved into the names_unique.txt file. By combining commands like sort and uniq, we can efficiently organize and filter the contents of a text file.</p><p>You can check the content of the unique file:</p><pre>cat names_uniq.txt</pre><p>To search for a pattern in the file, use grep. For example, to find names with &quot;Hayes&quot;:</p><pre>grep &#39;Hayes&#39; names.txt</pre><p>To make the search case-insensitive, use grep -i:</p><pre>grep -i &#39;hayes&#39; names.txt</pre><p>To separate first and last names, use the cut command. t can be used to cut parts of a line by byte position, character, and field. The cut command slices a line and extracts the text. It is necessary to specify an option with a command otherwise it gives an error:</p><pre>cut -d &#39; &#39; -f1 names.txt &gt; first_names.txt<br>cut -d &#39; &#39; -f2- names.txt &gt; second_names.txt<br># -d specifies the delimiter -f extracts the first words to delimiter <br>or -f- the last words from the delimiter</pre><p>To merge the two files, use paste:</p><pre>paste first_names.txt second_names.txt</pre><h3>Networking Commands</h3><p>Computer networks are essential for communication and data transfer between devices, and in Linux, we have various commands to configure and troubleshoot network-related issues. To use networking commands in Linux you need to install the net tool</p><pre>sudo apt install net-tools<br>#sudo is like pip</pre><ul><li>ifconfig shows communication device info.</li><li>hostname shows the device name.</li><li>curl retrieves HTML content from a website. You get a webpage returned in your terminal window. The entire HTML document this URL identifies. All HTTP replies contain a set of response headers that are normally hidden, use curl’s — include ( -i ) option to display them and the rest of the document. Let&#39;s get the HTML content of <a href="https://joykimaiyo.github.io/">https://joykimaiyo.github.io/</a> and store it in joy.html. For example:</li></ul><pre># without hidden response headers<br>curl https://joykimaiyo.github.io/ -o joy.html<br># with<br>curl -i https://joykimaiyo.github.io/ -o joy.html</pre><ul><li>ping checks the network connection to a server:</li></ul><pre>ping www.google.com</pre><p>To stop the ping, press CTRL + C.</p><ul><li>wget downloads files from a URL. For example, to download Tesla’s historical data:</li></ul><pre>wget &quot;https://query1.finance.yahoo.com/v7/finance/download/TSLA?period1=1696118400&amp;period2=1737417600&amp;interval=1d&amp;events=history&quot; -O tesla.csv</pre><h3>File Archiving and Compression Commands</h3><p>Normally, in Windows to archive, compress, or zip, need to use third-party tools or search on Google for some tools. To decompress or unzip third-party tools such as WinRAR which is cool it&#39;s free forever but in Linux, you can use some commands. In Linux, you don’t need third-party tools to compress, archive, or unzip files. You can use built-in commands like tar and zip.</p><ul><li>tar creates, compresses, and extracts archives. For example:</li></ul><pre>tar -cf archive.tar nc.txt names.txt<br>tar -czf archive1.tar.gz new.txt first_names.txt</pre><ul><li>zip creates a zip archive:</li></ul><pre>zip archive.zip joy.html lfdmc.txt</pre><ul><li>unzip extracts the contents of a zip archive:</li></ul><pre>unzip archive.zip</pre><h3>Final Notes</h3><p>With Linux, you can do many things that would otherwise require third-party tools on Windows. A shell is an interactive user interface where you use commands to navigate and work with files and directories.</p><p>Some key commands include:</p><ul><li>curl and wget to download files.</li><li>cat and tail to view file contents.</li><li>echo to print text or variables.</li><li>ls, cd, and find for file management.</li><li>ping for network diagnostics.</li><li>tar and zip for compression.</li></ul><p>For more information about any command, use the man command.</p><p>Follow me on LinkedIn: <a href="https://www.linkedin.com/in/joy-kimaiyo-185684225/">Joy Kimaiyo</a></p><p>Follow me on GitHub <a href="https://github.com/JoyKimaiyo">https://github.com/JoyKimaiyo</a></p><p>Check my portfolio website <a href="https://joykimaiyo.github.io/">https://joykimaiyo.github.io/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=363e7814edf7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>