<?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 Nderitu Ndirangu on Medium]]></title>
        <description><![CDATA[Stories by Nderitu Ndirangu on Medium]]></description>
        <link>https://medium.com/@nderitu_ndirangu?source=rss-ae0e1735f55b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XLsFxDNIxKcFeXingxMv1w.jpeg</url>
            <title>Stories by Nderitu Ndirangu on Medium</title>
            <link>https://medium.com/@nderitu_ndirangu?source=rss-ae0e1735f55b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 08:40:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nderitu_ndirangu/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[Strategic Price Scraping for Market Intelligence: A Samsung Case Study]]></title>
            <link>https://medium.com/@nderitu_ndirangu/strategic-price-scraping-for-market-intelligence-a-samsung-case-study-b65ccc828c23?source=rss-ae0e1735f55b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b65ccc828c23</guid>
            <category><![CDATA[web-scraping]]></category>
            <category><![CDATA[pricing-strategy]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[web-applications]]></category>
            <dc:creator><![CDATA[Nderitu Ndirangu]]></dc:creator>
            <pubDate>Fri, 30 Aug 2024 08:46:25 GMT</pubDate>
            <atom:updated>2024-09-02T08:19:04.423Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*81e7Mxwfk5h3rWIlVmFqvg.jpeg" /></figure><p>In today’s fast-paced digital marketplace, staying ahead of the competition requires more than just innovative products and services — it demands real-time, actionable insights. One of the most valuable sources of such insights is price data. By tracking competitor prices, businesses can make informed decisions about their own pricing strategies, ensuring they remain competitive while maximizing profit margins. In this article, I’ll walk you through how I used web scraping to monitor the pricing of Samsung products on Jumia.</p><h4><strong>Why Price Scraping matters:</strong></h4><ol><li><strong>Real-Time Market Insight</strong>: Markets change quickly. Competitors may adjust their prices daily, if not hourly. By scraping prices in real-time, you get an up-to-the-minute view of the market, allowing for swift reactions.</li><li><strong>Trend Analysis</strong>: Over time, collecting historical pricing data helps in identifying trends. For example, do competitors lower prices during certain times of the year? Are there patterns before product launches? This knowledge can be instrumental in planning your own sales strategies.</li><li><strong>Competitive Benchmarking</strong>: Price scraping allows businesses to benchmark their prices against those of their competitors. This not only helps in positioning your product but also in understanding where you stand in the market.</li></ol><h4><strong>Case Study: Scraping Samsung Products on </strong><a href="https://www.jumia.co.ke/mlp-samsung-shop/"><strong>Jumia</strong></a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xGgSlHZd80viwj7AaJwAVw.png" /></figure><p>To illustrate the power of web scraping in competitive intelligence, Let me take you through a project I recently completed. The goal was simple: scrape the prices of Samsung products on their official Jumia store at regular intervals &amp; and get email notifications in the event of any price drops</p><p><strong>Tools of the Trade: Scrapy, Prefect &amp; smtplib</strong></p><p>For this project, I used<a href="https://docs.scrapy.org/en/latest/"> <strong>Scrapy</strong></a>, a popular web scraping framework, to extract pricing data. Scrapy is efficient, fast, and allows for easy customization — perfect for a project of this nature. However, the real magic happened when I combined Scrapy with<a href="https://docs-3.prefect.io/3.0rc/get-started/index?deviceId=292fd366-c28f-4a01-bc69-b02caf70b950"> <strong>Prefect</strong></a>, a workflow orchestration tool.</p><p>With Prefect, I automated the scraping process to run at regular intervals. This meant that I could set it up once and forget about it, knowing that I would receive timely updates via email using <a href="https://docs.python.org/3/library/smtplib.html"><strong>smtplib</strong></a> whenever there is a discount on Samsung products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uW--0PTR_FsYXFEfWsSqsw.png" /><figcaption>screenshot of detected discounts sent via email</figcaption></figure><p><strong>Visualizing Data with </strong><a href="https://streamlit.io/"><strong>Streamlit</strong></a></p><p>Collecting data is only part of the equation. The real value comes from interpreting that data and turning it into actionable insights. To make this data accessible and easy to understand, I created a simple web application using Streamlit. check it out <a href="https://samsung-price-tracker-dashboard.streamlit.app/"><strong>here</strong></a></p><p>The app makes it easy to visualize the price history of Samsung products over time, allowing me to easily identify trends, spikes, and drops.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tZj6aOLuMsXE0MMESOVmtA.png" /><figcaption>screenshot of the streamlit app showing the price history of a product</figcaption></figure><h4>Conclusion: The Strategic Edge</h4><p>Automating the scraping and analysis of competitor pricing data gives businesses a considerable strategic advantage. As a savvy consumer, the insights I’ve gained from monitoring Samsung products on Jumia could be incredibly valuable. Not only will I receive notifications when prices drop, but with enough data and the application of machine learning, it’s also possible to predict when discounts are likely to occur.</p><p>If you’re interested in building similar projects or want to dive deeper into the technical aspects, feel free to<strong> </strong><a href="https://www.linkedin.com/in/nderitu-ndirangu-60442b2b7/"><strong>reach out</strong></a>. Check out my other <a href="https://medium.com/@nderitu_ndirangu/from-sentiment-to-strategy-what-lor%C3%A9al-s-garnier-reviews-reveal-about-customer-sentiments-5bf817403e7e"><strong>article</strong></a> on how companies through Natural Language Processing(NLP) can turn customer sentiment into actionable insights.</p><p>Thank you! the complete code can be found in this <a href="https://github.com/daniel-ndirangu/Jumia-Price-Tracker"><strong>repository</strong></a></p><p><strong>Important Note</strong>: Before replicating this project, I strongly advise you to review and adhere to the robots.txt file of any website you intend to interact with. The robots.txt file contains essential guidelines on how web crawlers should behave on the site, including which pages are off-limits for automated access. Respecting these directives is crucial to ensuring ethical and legal practices when working on web-based projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b65ccc828c23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Sentiment to Strategy: What L’Oréal’s Garnier Reviews Reveal About Customer Sentiments]]></title>
            <link>https://medium.com/@nderitu_ndirangu/from-sentiment-to-strategy-what-lor%C3%A9al-s-garnier-reviews-reveal-about-customer-sentiments-5bf817403e7e?source=rss-ae0e1735f55b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bf817403e7e</guid>
            <category><![CDATA[customer-reviews]]></category>
            <category><![CDATA[bertopic]]></category>
            <category><![CDATA[topic-modelling]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <dc:creator><![CDATA[Nderitu Ndirangu]]></dc:creator>
            <pubDate>Mon, 12 Aug 2024 09:09:33 GMT</pubDate>
            <atom:updated>2024-08-12T09:13:24.862Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*e5zf6ljMC-wVr0p20WVFjw.png" /></figure><p>In today’s digital age, understanding consumer sentiment is crucial for any brand looking to maintain a competitive edge. Sentiment analysis, which involves examining customer feedback to gauge overall sentiment and uncover underlying themes, offers valuable insights into consumer opinions and experiences. For companies, this means the ability to proactively address concerns, enhance product offerings, and ultimately build stronger customer relationships.</p><p>In this article, we’ll delve into the world of sentiment analysis by exploring Garnier’s reviews on their <a href="https://www.jumia.co.ke/mlp-garnier-store/">Official Jumia store</a>. This project was particularly intriguing as it allowed me to step outside my usual domain and tackle the beauty industry — an area I hadn’t previously explored. The challenge of analyzing sentiment and uncovering recurring themes in this industry provided an exciting venture into a new field. Let’s get started.</p><p><strong>Step 1: Data!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9yUqPIZFNopYJnic-53I5w.png" /></figure><p>The first crucial step was gathering the data. For this, I turned to<a href="https://scrapy.org/"> Scrapy</a>, a powerful and versatile Python library specifically designed for web scraping. Scrapy allowed me to efficiently extract 5,000+ reviews for Garnier products listed on <a href="https://www.jumia.co.ke/mlp-garnier-store/">Jumia</a>, covering a broad timeframe from May 2018 to July 2024.</p><p>The process involved setting up a Scrapy spider, which is essentially a script that navigates through web pages, extracts the desired information, and stores it in a structured format. Here’s how I approached it:</p><ol><li><strong>Setting Up the Spider:</strong> I configured the spider to crawl through the product pages on Jumia’s website targeting the review section of each product, ensuring that I captured every available review.</li><li><strong>Handling Pagination:</strong> Jumia, like many e-commerce platforms, spreads its reviews across multiple pages. To ensure comprehensive coverage, the spider is programmed to follow pagination links, thereby scraping reviews from all available pages.</li><li><strong>Data Extraction:</strong> For each review, I extracted key details such as the review text, date of the review and additional metadata that could be useful for analysis. I then stored the information extracted in a JSON file, making it easy to manipulate and analyze later on.</li></ol><p>By the end of this step, I had a comprehensive dataset of Garnier reviews spanning six years, providing a rich foundation for the subsequent sentiment analysis and topic modeling. This data would serve as the backbone of my project, offering valuable insights into consumer opinions.</p><h4><strong>Step 2: Sentiment Analysis:</strong></h4><p>With the data in hand, the next step was to analyze the sentiment of the reviews. Sentiment analysis is a powerful tool that allows us to categorize the reviews into positive, negative, or neutral sentiments, giving us a clear picture of how customers feel about Garnier’s products.</p><p>For this task, I used the <a href="https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest">cardiffnlp/twitter-roberta-base-sentiment-latest</a> model from <a href="https://huggingface.co/">Hugging Face.</a> This model is part of the RoBERTa family, a robust and highly regarded variant of the BERT (Bidirectional Encoder Representations from Transformers) model. It&#39;s specifically fine-tuned for sentiment analysis, particularly on social media data, making it well-suited for handling the kind of informal, customer-generated content found in reviews.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ngBnhtyySrnQNL0Rn8E_A.png" /></figure><p>The chart displays the sentiment trend for Garnier’s products over the years from 2018 to 2023, based on customer reviews on Jumia. Here’s an analysis of the key insights:</p><ol><li><strong>Positive Sentiment Dominance:</strong> The green line representing positive sentiment shows a significant upward trend over the years, indicating that more customers are expressing satisfaction with Garnier products. This trend is particularly noticeable after 2020, where the number of positive reviews sharply increases, peaking at 1,270 in 2023.</li><li><strong>Steady Negative and Neutral Sentiment:</strong> Both the red line (negative sentiment) and the blue line (neutral sentiment) show relatively stable trends over the years.</li><li><strong>Growth in Customer Feedback:</strong> The overall number of reviews appears to have increased over time, with the positive sentiment growing most notably. This indicates that Garnier’s customer base on Jumia has expanded, leading to more feedback — mostly positive.</li><li><strong>Implications for Garnier:</strong> The growing positive sentiment trend is a strong indicator that Garnier’s products are increasingly meeting customer expectations. However, the slight increase in negative reviews suggests that there may be specific issues or areas for improvement that should be addressed to maintain customer satisfaction.</li></ol><h4><strong>Step 3: Topic Modelling</strong></h4><p>After performing sentiment analysis, the next logical step was to dig deeper into the negative reviews. This allows us to understand the specific issues that customers are facing with Garnier products and identify recurring themes that might need attention.</p><ol><li><strong>Identify the Product with the Highest Percentage of Negative Reviews</strong></li></ol><p>To start, I narrowed down the focus to the top five Garnier products based on the number of reviews. Among these products, I identified the one with the highest percentage of negative reviews. This approach ensured that the analysis would be both targeted and impactful, addressing the most pressing concerns of the customer base.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5VhUW8r2oINMBOsBmPRUOg.png" /></figure><p>From the chart above:</p><ul><li><strong>Garnier Even &amp; Matte Dark Spot Corrector</strong>: has the highest percentage of negative reviews among the top 5, at 25.6%, despite a relatively strong average rating of 4.0. This suggests that while the majority of users are satisfied, there is a significant portion of the customer base expressing dissatisfaction.</li><li><strong>Garnier Pure Active 3 In 1 Charcoal Anti-Blackhead</strong>: has the lowest percentage of negative reviews among the top 5, at 6.5% with an average rating of 4.4, indicating that it is generally well-received by users</li></ul><p><strong>2. Perform Topic Modeling</strong></p><p>Once i identified the product with the highest percentage of negative reviews, I performed topic modeling using <a href="https://maartengr.github.io/BERTopic/index.html">BERTopic</a> to uncover the recurring themes within Garnier’s Even &amp; Matte Dark Spot Corrector<strong> </strong>negative<strong> </strong>reviews. Topic modeling is a technique in Natural Language Processing (NLP) that helps in discovering the abstract topics that occur in a collection of documents or reviews in this case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-q7N32L-6_khiTzr29cCLA.png" /></figure><p>Topics:</p><p><strong>a. Product inefficacy:</strong> This is the most common topic, with 50.7%. it revolves around the product being ineffective. Customers express disappointment that the dark spot corrector does not deliver the expected results, with key phrases like “doesnʼt work,” “didnʼt work,” and “ineffective.” This highlights a significant concern about the product’s ability to meet its primary purpose of correcting dark spots, leading to frustration among users.</p><p><strong>b. Insufficient Quantity:</strong> The second most prevalent issue with 49.3% pertains to dissatisfaction with the product quantity. Customers feel that the tube or packaging is inadequate, often describing it as “empty” , “little quantity” &amp; “filled with air”. This suggests that users are not only concerned with the productʼs performance but also with the perceived value for money, as they feel they are not getting enough product for the price they pay.</p><h4>Implications for Product Development</h4><ol><li><strong>Strengthen Product Quality</strong> — Conduct research and development to ensure consistently high-quality formulations and address any identified performance and ineffectiveness issues.</li><li><strong>Review and Adjust Packaging — </strong>Conduct an evaluation of Garnier’s Even &amp; Matte Dark spot corrector current packaging to ensure that it meets customer expectations. If feasible increase product quantity without significantly raising costs to enhance perceived value.</li></ol><h4>Conclusion and Recommendations</h4><ol><li><strong>Actionable Insights — </strong>ArtificiaI Intelligence through sentiment analysis and topic modeling has uncovered valuable insights that can guide L’Oréal’s product development and marketing strategies.</li><li><strong>Competitive Advantage</strong> — By addressing the key pain points, L’Oréal can differentiate itself in the market and strengthen its position as a trusted and innovative brand.</li></ol><p>Thank you! the complete code can be found in <a href="https://github.com/daniel-ndirangu/Garnier-Sentiment-Analysis">this repository</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bf817403e7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>