<?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 Felix Njogu on Medium]]></title>
        <description><![CDATA[Stories by Felix Njogu on Medium]]></description>
        <link>https://medium.com/@felixnjogu?source=rss-e22d09d08234------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rnGKZYkNVnHGpbseGT13Fg.jpeg</url>
            <title>Stories by Felix Njogu on Medium</title>
            <link>https://medium.com/@felixnjogu?source=rss-e22d09d08234------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 01:04:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@felixnjogu/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[Exploring Food Crop Production in Kenya using Power BI]]></title>
            <link>https://medium.com/@felixnjogu/exploring-food-crop-production-in-kenya-using-power-bi-c7a7063f4b8d?source=rss-e22d09d08234------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7a7063f4b8d</guid>
            <dc:creator><![CDATA[Felix Njogu]]></dc:creator>
            <pubDate>Thu, 28 Mar 2024 18:44:42 GMT</pubDate>
            <atom:updated>2024-03-28T18:44:42.873Z</atom:updated>
            <content:encoded><![CDATA[<p>This report is based on data published by the Food and Agriculture Organization of the United Nations and published on <a href="https://data.world/agriculture/crop-production">Data.World</a>.</p><p>While the report contains data from across multiple countries, this project sought to show the most important food crops in Kenya and trends in their production.</p><p>Based on local knowledge, I picked maize, wheat, dry beans, rice, potatoes, bananas, and sweet potatoes as the crops to focus on for the exploration. They are the most common food items on a typical Kenyan household’s menu.</p><p>The report provides annual crop production volume in tonnes.</p><p>Here are some findings.</p><ol><li>Maize is the most important food crop in the country. It is farmed in 90% of all farms in the country, whether large-scale or small-scale.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QMu851BLOqYt1_vedAaZWQ.png" /><figcaption>Total volume produced since 1961 in tonnes</figcaption></figure><p>In comparison to the rest of the crops in this study, maize accounted for 45.59% of total production volume in tonnes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*4IsjdCM_t7p-MZBZv88IPg.png" /><figcaption>Maize is king of the food crops in Kenya</figcaption></figure><p>2. Annual production for of has risen almost ten-fold since 1961. Other crops have not seen similar production volume growth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Oi2Y4_2jTtYDjoS4TFyag.png" /><figcaption>Maize production growth has been rising</figcaption></figure><p>3. Agriculture in Kenya is heavily dependent on rain. When the rains fail, production in subsequent years is always affected. See years when maize production is below the 5-year rolling average.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5o5v0M3UoItE7icYz3uW8A.png" /></figure><p>4. Lastly, it was remarkable that rice production is as not as high as I expected, given its importance in the typical Kenyan menu. Some digging indicated that the country imports <a href="https://www.millingmea.com/paddy-rice-production-in-kenya-jumped-22-in-2023-says-ministry-of-water-and-irrigation/#:~:text=Currently%2C%20Kenya%20imports%2080%25%20of,billion%20(US%24252.9%20million).">over 80%</a> of all rice consumed in the country.</p><p>Drilling further into rice production trends reveals a shape increase in production after 2008. This could be explained by more land being put under irrigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rk5Q97mUhcOF81cIcJa3yA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7a7063f4b8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyzing In-Office and Work-From-Home Trends Using Power BI]]></title>
            <link>https://medium.com/@felixnjogu/analyzing-in-office-and-work-from-home-trends-using-power-bi-3ecb9efb07fd?source=rss-e22d09d08234------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ecb9efb07fd</guid>
            <category><![CDATA[power-bi-tutorials]]></category>
            <category><![CDATA[power-bi-training]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Felix Njogu]]></dc:creator>
            <pubDate>Sun, 24 Mar 2024 13:39:05 GMT</pubDate>
            <atom:updated>2024-03-24T13:39:05.352Z</atom:updated>
            <content:encoded><![CDATA[<p>This project uses anonymized 3-month data from a real company to uncover insights into work attendance patterns in a company that allows staff to pick days to work from home.</p><p>The questions to answer are:-</p><ol><li>What is the overall work attendance rate?</li><li>What is the work-from-home rate?</li><li>What is the sick leave rate?</li><li>How have these metrics changed over the last 3 months?</li></ol><h4>Steps in the Analysis Process</h4><ol><li>Data loading and transformation using Power Query</li><li>Data exploration and creation of metrics</li><li>Dashboard creation</li></ol><p><strong>The Raw Data</strong></p><p>The Data is in an Excel file with 4 sheets, 3 containing employee attendance data for every month. The fourth sheet is an Attendance Key explaining what the values in the other 3 mean. Take time to study the data.</p><p>The data is in wide format with at least 46 columns per sheet. The first two columns contain the unique employee code and employee name respectively. The rest of the carry data for each day of the particular month.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1d0wwVYP8jeslcphgZPFwg.png" /><figcaption>raw data in wide format</figcaption></figure><h4>Loading and Transforming the Data</h4><p>Open a new Power BI report and use the Get data command. Choose the Excel file option and select your raw data file. When the load or transform data window pops up in Power BI, do not select any sheet under the Display Options menu. Instead, right-click on the entire xls file and opt to transform it as a whole.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6jyw03GoyP4VIkryc7dGZg.png" /></figure><p>This opens up Power Query, a data transformation engine in Power BI. Here, you can duplicate your initial query so that you can carry out your transformations. This is a useful precautionary step when carrying out any data transformation, should you want to return to your initial query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sAPpu3FfyOW2Rv7zrCVYUQ.png" /><figcaption>duplicate your query to carry out transformations on the copy</figcaption></figure><p>Rename the copy of your query as ‘Template’. Filter out the Attendance Key sheet because you do not need it anymore. You can always reference it in your raw Excel file anyway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ekuVIjrxUStt2HcFd2z6BA.png" /><figcaption>filter out the Attendance Key sheet from the template query</figcaption></figure><p>Remove all other columns containing metadata about your tables/sheets, leaving only the column containing data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yJRpKa_E_BcItd_3KHC_gg.png" /><figcaption>removing all other columns</figcaption></figure><p>Select one of the tables and click to open it in Power Query. On the right side of the screen, you have the Applied Steps section. This summarizes each step of the transformation you make on your query. Delete the Changed Type step that Power Query had automatically made on the query.</p><p>The current column names do not represent anything. You want to make the first row of the table to become headers. The ‘use the first row as headers’ command is on the Transform ribbon of the Home Tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_sfCE_3dPgKchveN4Qo0zg.png" /><figcaption>use first row as headers</figcaption></figure><p>Rename the first two column headers as Employee Code and Employee Name respectively. The new first row does not represent any useful information so you can delete it. The rest of the column headers represent the dates of the month.</p><p>As highlighted, the raw data was in wide format. This is not useful for our intended analysis. It would be difficult to merge the three sheets in Power BI because they have different column names. The solution is to unpivot all other columns apart from the Employee Code and Employee Name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oVabktRt4vPumZUmM0x5lA.png" /><figcaption>Select the first two columns, then pick the unpivot other columns command found in the Transform tab of Power BI</figcaption></figure><p>You now have your data in a long format, with 4 columns. Rename the third column as ‘Date’ to make it more descriptive.</p><p>Next, you need to set the Data Types for the 4 columns. This command is available on the Transform ribbon of the Home Table. The data type for Employee Code, Employee Name, and Value column should be ‘Text’. Choose the ‘Date’ type for the date column.</p><p>Scrolling through the date column, you will realize there are errors on some rows. This calls for some investigation. There may have been some erroneous entries in the source file. A closer inspection of the source file can confirm this to be true.</p><p>To fix this, right-click on the column name and remove errors as shown in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5LpFLTe_TDbr_c7nCa_PzA.png" /><figcaption>remove errors on the date column</figcaption></figure><p>Next, on the parameters ribbon, click on new Parameter. Create a new parameter that will enable you to use this template to transform similar data in the future (succeeding months).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ctoR_Fjm0EXWQq2dfXlRQ.png" /></figure><p>Next, you can roll up all the transformations carried out on the template into a function. This can be invoked on raw data files to prepare them for analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mJJwxx0zkoCaYiKWGtF2WQ.png" /></figure><p>Save your function with a descriptive name. Next, go back to the original query you had before creating and remaining the copy. On the Add Column of Power Query, choose the Invoke Custom Function command. This will enable you to carry out all the transformations done in the template using a single function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F_9OXgEf_OpjvtfdM3c-Cg.png" /><figcaption>invoke the custom function</figcaption></figure><p>A new expandable column name after your function name is now available. Next, delete the Name, Kind, and Hidden columns because they are not necessary (they are metadata columns).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_k8oVBGizpj6ZuX0ipy7Ag.png" /></figure><p>Expand the new column to reveal the transformed data. Rename the columns to remove the prefix. Next, change data types to text and date appropriately.</p><p>The data is now ready for transformation. On the queries field, disable the load option on the template so that you only load what you need onto Power BI for visualization and subsequent dashboarding. Close and apply the transformation so that the cleaned and transformed data can load on Power BI. You can rename the query descriptively.</p><h4>Creating Measures and Visualizations</h4><p>Once the cleaned query opens in Power BI, create a new table called ‘measures table’ to help you track the measures you create in the analysis process.</p><p>The first measure will be the total number of working days in the period under review. This is done by writing the following DAX code. This formula excludes all days marked as either ‘holiday off’ or ‘weekend off’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fInJHRRaI4uF_yc0VXwhfA.png" /><figcaption>creating the total working days measure</figcaption></figure><p>The next metric to create is the total number of days when an employee was present. It is critical to note that days when an employee was working from home should included as present. There are also instances where an employee is marked as ‘half work from home’. How do you account for all of this?</p><p>The solution is to create a new calculated column called ‘work from home’ which assigns the number 1 when an employee was working from home and 0.5 if they only worked half the time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3XLuVGmg6YXseppYn6npcw.png" /><figcaption>creating a column to help you account for working from home days properly</figcaption></figure><p>Now you can complete the present days measure as follows;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yfuc4o_oGAofqK-xzFp3FQ.png" /><figcaption>calculating present days</figcaption></figure><p>With this, you can now create new measures to track the proportion of present days as a percentage of the total working days. You can also calculate a ‘working from-home measure’ as a percentage of total working days.</p><p>Create two card visuals to represent these two.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fZi8S8Q0nKqrF-cbwSn8TA.png" /><figcaption>creating card visuals to display your metrics thus far</figcaption></figure><p>The two card visuals do not tell much. You can add the table with all employee names which will help you drill down to see the metrics for each employee.</p><p>You can then create a new measure to track the number of sick days. You will need a calculated column to help sum up sick days, and half-day sick leave.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x0b2zLMFTdBzkXzrudQCPQ.png" /></figure><p>It is now possible to calculate the sick leave days as a percentage and add it as a card visualization to the canvas.</p><p>We want to see how these days&#39; present and work-from-home percentage have changed over the last 3 months. A line chart is perhaps the best visualization to show this.</p><p>To smooth out your chart, apply a page-level filter to exclude weekends off. You could also another filter to only evaluate data up-to a particular date, in this case 19–06–2022.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oHcCTgyweJ_Clw_oDd9jFw.png" /><figcaption>adding a line chart to show changes in days present and working-from-home trends over the 3 months</figcaption></figure><p>Using one y axis for the two charts is not very visually appealing. We may also want to add a trend line for each measure. A better implementation would be to use two different charts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HqPwtq6C8hq5TLn8nYfxVA.png" /><figcaption>adding two separate charts and a trend line to show change over time.</figcaption></figure><p>It seems that work-from-home is on an uptick while the employee absence from work is rising slightly. This might be due to seasonality, as people tend to take more days off during certain months of the year. It may be worth investigating the paid leave trend.</p><p>There were also two particular days when a lot of staff were not present — May 3rd and May 13. Were there major events happening on those days?</p><p>Adding a slicer gives you the ability to drill further into the data. It would be useful to see the statistics for each month.</p><p>At this point, you have answered questions from the stakeholders. Add an appropriate title and pick a useful theme for your work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gy7tIzoUV5b9V1X5WLZFCw.png" /></figure><p>Credit to Codebasics.io for inspiring this project. Here is a link to the raw data <a href="https://codebasics.io/resources/resume-project-data-analytics">https://codebasics.io/resources/resume-project-data-analytics</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ecb9efb07fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visualizing Background Checks on Prospective Firearm Buyers in the US using Tableau]]></title>
            <link>https://medium.com/@felixnjogu/visualizing-background-checks-on-prospective-firearm-buyers-in-the-us-using-tableau-cd5fd72a65d0?source=rss-e22d09d08234------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd5fd72a65d0</guid>
            <category><![CDATA[gun-control]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Felix Njogu]]></dc:creator>
            <pubDate>Sat, 25 Mar 2023 00:59:55 GMT</pubDate>
            <atom:updated>2023-03-25T00:59:55.542Z</atom:updated>
            <content:encoded><![CDATA[<p>The Brady Handgun Violence Prevention Act of 1993 requires a check to be done on prospective buyers of firearms and or explosives. Federal Firearms Licensees can call the FBI or appointed agencies who have access to the FBI’s National Instant Criminal Background Check System to determine a prospective buyer’s eligibility.</p><p>Each month, the FBI publishes data on the number of firearm-related background checks done in each state.</p><p>The FBI publishes the data in pdf format, but BuzzFeed has created a parser for the data so that the data is accessible in other formats, such as CSV. You can read up <a href="https://github.com/BuzzFeedNews/nics-firearm-background-checks">notes on the data or access the raw files here</a>.</p><h3>Tools</h3><p>This simple project uses Tableau Public only.</p><h3>The Questions</h3><ol><li><strong>What is the trend in the total number of background checks over time?</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lDBqVb_z7Ogbt9vhqAmL_w.png" /><figcaption>The trend of total background checks for prospective firearm buyers in the US between 1999 and 2022.</figcaption></figure><p><strong>2. Which states have conducted the most firearm background checks?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H17mwoKh1Tqrmx04tvog9g.png" /><figcaption>Ranking States by the Number of Checks Done</figcaption></figure><p>I also presented this information on a map. States with a deeper orange color had more checks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*omms3jDJtQFfsglmgxdqBg.png" /><figcaption>States are color-coded according to the total checks done.</figcaption></figure><p><strong>3. Each time a call is placed, the FFL discloses the firearm a prospective buyer intends to buy. The FBI categorizes firearms as either handguns, long guns, or other. Here is the distribution.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*J03-w0fLs258Oy8pqlF_Og.png" /></figure><p>4. <strong>Whenever a person wants to pawn or use their gun as a security for money, a background check is also done. Below is a visualization of the states and the number of prepawn checks over the years.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OiRcVhmoVsMPDuvr5La1Mw.png" /><figcaption>Treemap showing the total number of prepawn checks done in all the states.</figcaption></figure><p><strong>5. Transactions involving the private sale of firearms (by a person who doesn’t hold FFL) also require a background check before the firearm can be registered to the new owner. Here is a bubble chart of private sales-related checks by state.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*b-KsO8WksNlom2mWvuzFEw.png" /></figure><p><strong>Caveats on the Data</strong></p><p>It is important to note that this data is not indicative of the actual number of successful or unsuccessful gun purchases in the US. Its accuracy is also subject to reporting by licensed firearm sellers in the country.</p><h4><strong>Access the Vizzes and the Dashboard on Tableau Public</strong></h4><p>You can access the visualizations on my <a href="https://public.tableau.com/views/FIREARMBACKGROUNDCHECKSINTHEUS/Dashboard1?:language=en-US&amp;publish=yes&amp;:display_count=n&amp;:origin=viz_share_link">Tableau Public profile</a> where you can drill further into the data by using filters for years and states.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd5fd72a65d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bring on 2023. A Pep Talk]]></title>
            <link>https://medium.com/@felixnjogu/bring-on-2023-a-pep-talk-d85f7a643dcf?source=rss-e22d09d08234------2</link>
            <guid isPermaLink="false">https://medium.com/p/d85f7a643dcf</guid>
            <category><![CDATA[new-years-resolutions]]></category>
            <category><![CDATA[lifestyle]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[goals]]></category>
            <category><![CDATA[goal-setting]]></category>
            <dc:creator><![CDATA[Felix Njogu]]></dc:creator>
            <pubDate>Tue, 03 Jan 2023 06:33:02 GMT</pubDate>
            <atom:updated>2023-01-03T06:33:02.407Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8qxmEy1aurWoVgShtoBiNQ.jpeg" /></figure><p>It’s hard to describe how I feel at the start of this new year. I do not have any new goals to set, nor do I think I need to. I want to get back in the saddle and get on with it where I left it off.</p><p>Easier said than done.</p><p>I was working on my data science journey until late October. I was in the second month of a 6-month program until some self-induced distractions resulted in a 2-month hiatus. Now I find myself weeks behind my batch-mates. I cannot afford not to complete the program. Admittedly, though, my confidence is shaky.</p><p>Do you know that feeling where you need a spark to rekindle the fire in your belly? It could be a kick in the butt or a pep talk from a mentor. That’s exactly where I am.</p><p>And so this post is a pep talk to myself.</p><p>One perk of self-examination is knowing where you are, the things that distract you, and the things that anchor you. Moving into our own house was a big win for my wife and I, but it certainly affected other areas of our lives.</p><p>Hopefully, after the festivities that come with hosting friends and family, I can manage a semblance of order. But I also realize that the best performers still carve out time for what’s important amid all the chaos in their personal lives. Imagine running a business with tens, hundreds, or thousands of employees while still raising kids or taking care of a sick loved one. Imagine being the regional head of a multinational while handling grief or some other inevitable life event.</p><p>This is an important lesson for me. That there is really no excuse. Those who want it will get it done no matter what. James Clear says this in Atomic Habits:</p><blockquote>You do not rise to the level of your goals. You fall to the level of your systems.</blockquote><p>And, therefore, I do not have any shiny goals this year. My goal is simply to create systems that enable me to get things done, no matter what is going on around me.</p><p>More big changes are coming this year and I cannot afford to fall behind each time they come. Systems are the only plausible solution.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d85f7a643dcf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scraping Housing Details on BuyrentKenya.com Using Python and BeautifulSoup]]></title>
            <link>https://medium.com/@felixnjogu/real-estate-web-scraping-project-using-beautifulsoup-1682d0af31f6?source=rss-e22d09d08234------2</link>
            <guid isPermaLink="false">https://medium.com/p/1682d0af31f6</guid>
            <category><![CDATA[web-scraping]]></category>
            <category><![CDATA[beautifulsoup]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Felix Njogu]]></dc:creator>
            <pubDate>Fri, 14 Oct 2022 18:39:42 GMT</pubDate>
            <atom:updated>2022-10-18T22:26:28.552Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UY8Ew9W6VR6wwnU9kavWvg.jpeg" /><figcaption>Web Scraping with BeautifulSoup</figcaption></figure><h4>What is Web Scraping?</h4><p>Web Scraping is the process of deriving data from a website using a computer program. The program scrapes for HTML code, which is the standard markup that websites display content.</p><p>Web scraping is an important skill for anyone aspiring to pursue a career as a data analyst or scientist. In the real world, you will not always find data cleaned and formatted for you. You need the skills to collect and create your own data sets using a mix of your programming skills and libraries for web scraping such as BeautifulSoup, Selenium, or Scrappy.</p><h4>BuyRentKenya</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nh5hFMcBHJ0l9fnekX-vTg.png" /><figcaption>BuyRentKenya Homepage</figcaption></figure><p>The website <a href="https://www.buyrentkenya.com/">buyrentkenya.com</a> is an online marketplace for listing properties for both rent and sale. For this project, I opted to scrape the website for <strong>all houses listed for sale in Nairobi</strong>. The final output should be a CSV file.</p><p>For each listing, we will collect</p><ul><li>The title</li><li>The location</li><li>The price</li><li>The number of bedrooms</li><li>The number of bathrooms</li><li>A link to the listing</li></ul><h4>Tools and Libraries Used for the Project</h4><ul><li>Python</li><li>Pandas</li><li>Requests</li><li>BeautifulSoup</li></ul><p>You can access the notebook with all the code for this project <a href="https://jovian.ai/felixnjogu/buyrent-kenya-web-scraping-project">on Jovian</a>.</p><h4>Outline of this Project</h4><ol><li>Understand the structure of the website.</li><li>Installing the necessary libraries</li><li>Populating a list of URLs to scrape</li><li>Building helper functions to collect the various pieces of information we need</li><li>Calling functions on the list of URLs</li><li>Creating a DataFrame</li><li>Writing the data to a CSV file</li></ol><h4>Step 1: Understanding the Structure of the Website</h4><p>When you conduct a search on buyrentKenya.com, you realize that results are populated with the price of the house, a brief description of the house, number of bedrooms, and bathrooms. You can also click on the listing to go to a page with more details about the house. There are 17 listings on each page result. <br>Each listing is contained in an HTML tag called a ‘div’. In order to get our result, we need to scrape pages for these divs. From each div, we will then extract details of that particular house.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*QKs6jkVtLhrKTY5jjSeH5g.png" /><figcaption>Listings on BuyRentKenya</figcaption></figure><h4>Step 2: Importing The Libraries We Need</h4><pre>import requests<br>from bs4 import BeautifulSoup<br>import pandas as pd</pre><h4>Step 3.1: Populating the List of URLs</h4><p>Next we initiate a list called url_list which will contain all the url’s we intend to scrape on the target website. I established that the first page’s url was ‘<a href="https://www.buyrentkenya.com/houses-for-sale/nairobi&#39;">https://www.buyrentkenya.com/houses-for-sale/nairobi&#39;</a> while the next pages followed a pattern where a base URL is followed by the page number. The second page’s url for instance was base_url= ‘<a href="https://www.buyrentkenya.com/houses-for-sale/nairobi?page=2%27">https://www.buyrentkenya.com/houses-for-sale/nairobi?page=2&#39;</a>. We can write a function that returns a list of URLs to be scraped.</p><pre>url_list=[]<br>start_url= &#39;<a href="https://www.buyrentkenya.com/houses-for-sale/nairobi&#39;">https://www.buyrentkenya.com/houses-for-sale/nairobi&#39;</a><br>base_url= &#39;<a href="https://www.buyrentkenya.com/houses-for-sale/nairobi?page=&#39;">https://www.buyrentkenya.com/houses-for-sale/nairobi?page=&#39;</a></pre><p>If a page does not have valid content, it will contain a message ‘The page you are looking for is no longer available’. The html tag of this message and it’s assigned class are crucial in knowing the last valid page to include in our list. I developed the following logic to help build the function populate_urls</p><pre>&#39;&#39;&#39;<br>We define a function that takes in the argument i . i is the page from which you want to add page results to that of the<br>start url. Normally this will be 2<br>&#39;&#39;&#39; <br>def populate_urls(i):<br>    url_list.append(start_url)<br>    valid_url= True<br>    while valid_url:<br>        next_url=base_url+str(i)<br>        response=requests.get(next_url)<br>        soup=BeautifulSoup(response.text,&#39;html.parser&#39;)<br>        exit=soup.find(&#39;h1&#39;,class_=&#39;text-center text-xl max-w-lg&#39;)<br>        if exit is None:<br>            url_list.append(next_url)<br>            i+=1<br>        else:<br>            valid_url=False<br>            print(&#39;Done appending urls&#39;)</pre><p>We can now call the function to populate URLs from page as follows:</p><pre>populate_urls(2)</pre><p>To confirm that the list has populated, we can take a sneak peak.</p><pre>url_list[:5]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*3DuH1kHF0BoxkjkkjpWI4w.png" /><figcaption>The first few URLs in the list</figcaption></figure><p>You could also check the length of the list.</p><pre>len(url_list)</pre><h4>Step 3.2: Using the Requests Library</h4><p>The requests library is useful in retrieving the HTML content for the target URLs. We can obtain the content for the first URL as follows;</p><pre>response_1= requests.get(start_url)</pre><p>To check whether the request was successful, we check the HTTP response status code.</p><pre>response_1.status_code</pre><p>The status code of a successful request should be 200. You can use <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status">this resource</a> to understand various status codes and their meanings, but generally, anything between 20 and 299 means the request was completed.</p><h4>Step 3.3: Using Beautiful Soup to Parse the Output</h4><p>BeautifulSoup is a Python library created for pulling data out of HTML and XML files. When we parse HTML or XML content using BeauutifulSoup, the output is called a BeautifulSoup project from where we can retrieve specific content by calling methods. We will use the BeautifulSoup library to create a beautiful soup-type object for every page we intend to scrape. From the BeautifulSoup object, we can retrieve the HTML tags relevant to our objective. Below is a demonstration of BeautifulSoup parsing</p><pre>doc_1= BeautifulSoup(response_1.text,&#39;html.parser&#39;)</pre><p>Using the inbuilt ‘type’ function in Python, check the type of the resulting object.</p><pre>type(doc_1)</pre><p>You will find that it is an object with the type bs4.BeautifulSoup.</p><p>In fact, you can check its content using this piece of code.</p><pre>doc_1.text[:1000]</pre><p>This shows the first 1000 characters of the BeautifulSoup object.</p><h4>Step 3.4: Getting the Listings</h4><p>From the earlier inspection of the target website, we established that each listing is contained in a ‘div’ container with the class ‘flex flex-col items-stretch md:flex-row’. We will get all the listings on a given page. We will then use a for loop to obtain the information we need from every listing.<br>For the first page, this is how we get all the listings:</p><pre>listings_tags= doc_1.find_all(&#39;div&#39;,class_=&#39;flex flex-col items-stretch md:flex-row&#39;)</pre><p>We store the output in a variable called listings_tags, which is a list. We can check the length of the result, which should correspond to the number of listings on the first page of results (17).</p><pre>len(listings_tags)</pre><h4>Step 4: Building Helper Functions to Retrieve The Information We Need</h4><p>To build helper functions, we need to understand how each piece of information is displayed using HTML Code.</p><ul><li>Each listing has a title. The title is contained in an ‘a’ tag with the class ‘no-underline text-black’</li><li>The location is contained in a ‘p’ class with the class ‘text-md md:text-sm font-normal text-grey-darker mt-1 md:mt-0’</li><li>The bedroom information is contained in a ‘span’ with the class ‘text-sm mr-5’</li><li>The bathrooms information is also in a ‘span’ with the class ‘text-sm’</li><li>The price information is in an ‘a’ tag with the class ‘no-underline’</li><li>We will collect the link information from the same tag as the price</li></ul><p>Below is an image of the HTML Code of a single-listing (a div container).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uGhfIVSiQCGcHDQ2Pb3q_Q.png" /><figcaption>The HTML Code of a Single Listing (div container)</figcaption></figure><h4>get_details function</h4><p>We need a helper function that iterates through all the URLs in the url_list. For each URL or page it uses BeautifulSoup to parse the HTML content for each listing into a list called listings_list. The listings_list will contain beautifulsoup objects for all the results from our search.</p><pre>def get_details(url_list):<br>    listings_list=[]<br>    for url in url_list:<br>        the_response= requests.get(url)<br>        the_soup= BeautifulSoup(the_response.text,&#39;html.parser&#39;)<br>        listings_tags=the_soup.find_all(&#39;div&#39;,class_=&#39;flex flex-col items-stretch md:flex-row&#39;)<br>        listings_list.extend(listings_tags)<br>    return listings_list</pre><h4>get_listing_title</h4><p>We define a function that returns the title information from a listing</p><pre>def get_listing_title(listing):<br>    title=listing.find(&#39;a&#39;,class_=&#39;no-underline text-black&#39;).text.strip()<br>    return title</pre><h4>get_listing_location</h4><pre>def get_listing_location(listing):<br>    location=listing.find(&#39;p&#39;,class_=&#39;text-md md:text-sm font-normal text-grey-darker mt-1 md:mt-0&#39;).text.strip()<br>    return location</pre><h4>get_bedrooms</h4><p>I realized some inconsistencies in the way the number of bedrooms were presented on the website. In some cases, the house’s floor area in square feet was placed where the price was meant to be. In such cases, the floor area and the price had the same class. Therefore, using ‘find tag’ and specifying the class would lead to some inconsistencies in the output.<br> The best workaround was to check the length of the output because ordinarily, the number of bedrooms in a house is unlikely to exceed 99 (not more than 3 characters if in string format). If the length is more than 2 then we would not include it in the final output.</p><pre># We define a function that returns the number of bedrooms for a listing<br>def get_bedrooms(listing):<br>    bedroom_tags=listing.find_all(&#39;span&#39;,class_=&#39;text-sm mr-5&#39;)<br>    if len(bedroom_tags[0].text.strip())&gt;2:<br>         bedrooms= bedroom_tags[1].text.strip()<br>    else:<br>        bedrooms= bedroom_tags[0].text.strip()<br>    return bedrooms</pre><p>The logic above is that if a particular listing has the floor area listed, then the bedroom information is likely to be the next span with the same class.</p><h4>get_bathrooms</h4><pre># We define a function that returns the number of bathrooms for a listing<br>def get_bathrooms(listing):<br>    bathroom_tag=listing.find_all(&#39;span&#39;,class_=&#39;text-sm&#39;)<br>    a=len(bathroom_tag)<br>    bathrooms=bathroom_tag[a-1].text.strip()<br>    if len(bathrooms)&gt;2:<br>        bathrooms=bathroom_tag[a-2].text.strip()<br>    return bathrooms</pre><h4>get_price</h4><pre>def get_price(listing):<br>    price=listing.find(&#39;a&#39;,class_=&#39;no-underline&#39;).text.strip()<br>    return price</pre><h4>get_link</h4><p>The link retrieved above is an extension for the particular listing and needs to be joined with a base URL to come up with a full URL in the final CSV output.</p><pre>def get_link(listing):<br>    extension=listing.find(&#39;a&#39;)[&#39;href&#39;]<br>    base_url=&#39;<a href="https://www.buyrentkenya.com&/#39;">https://www.buyrentkenya.com&#39;</a><br>    full_url=base_url+extension<br>    return full_url</pre><h4>Define a Function to Retrieve All the Details</h4><p>With all the helper functions, we can can now define a function that takes a listings from BeautifulSoup objects and returns a list of dictionaries with information for all listings. The function is called get_listings_details</p><pre>def get_listing_details(listings):<br>    #start with an empty list<br>    results_list=[]<br>    for listing in listings:<br>        title=get_listing_title(listing)<br>        location=get_listing_location(listing)<br>        bedrooms=get_bedrooms(listing)<br>        bathrooms=get_bathrooms(listing)<br>        price=get_price(listing)<br>        link=get_link(listing)<br>        results_list.append({<br>            &#39;title&#39;:title,<br>            &#39;location&#39;:location,<br>            &#39;price&#39;:price,<br>            &#39;bedrooms&#39;:bedrooms,<br>            &#39;bathrooms&#39;:bathrooms,<br>            &#39;link&#39;:link<br>            })<br>    return results_list</pre><h4>Step 5: Iterating Through All the URLs</h4><p>Now that we have retrieved all the information from the first URL, we need to do the same for all URLs. The first step is to define a function that takes and iterates through a list of URLs, each time adding every listing to a list. The final list will contain all listings of houses for sale on buyrentkenya.com. Here is the function.</p><pre>listings_list=get_details(url_list)</pre><p>We can check the number of records we scraped as follows:</p><pre>len(listings_list)</pre><h4>Step 6: Creating a DataFrame</h4><p>We can create a DataFrame called df to help view the output better and to subsequently get a CSV file.</p><pre>df=pd.DataFrame(get_listing_details(listings_list))</pre><p>We can check the number of rows and columns in the DataFrame.</p><pre>df.shape</pre><p>Here is what the DataFrame looks like on the notebook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OUauFMypeH95ChyuJojb0w.png" /></figure><h4>Step 7: Writing a CSV File</h4><p>The final step is to call the to_csv method on the DataFrame to create a CSV file. We include the index=None keyword argument so that the output file will not have an index column</p><pre>df.to_csv(&#39;housing.csv&#39;,index=None)</pre><h4>Summary</h4><p>This project utilized the BeautifulSoup and requests libraries to extract HTML content. We used Pandas to create a DataFrame which was easy to generate the final CSV file from.<br>The final CSV file has 6 columns — Title, Price, Location, Bedrooms, Bathrooms, and Link.</p><p>This project helped put to use the main concepts involved in web scraping a static website using Beautiful Soup.</p><h4>Future Work</h4><ul><li>Improving upon the code of this project</li><li>Improving the project so that you can have a function that takes a location input and returns all the listings for that location in a CSV file.</li><li>To learn how to scrape a dynamic website.</li><li>To learn how to automate scraping a dynamic website so that regular updates get sent via email.</li></ul><h4>References</h4><ol><li>Beautiful Soup Documentation <a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/">https://www.crummy.com/software/BeautifulSoup/bs4/doc/</a></li><li>Jovian Zero to Data Analyst Bootcamp Learning Materials</li><li>Brandon Johnson Youtube Channel <a href="https://www.youtube.com/c/BrandonJacobson">https://www.youtube.com/c/BrandonJacobson</a></li></ol><p>Thank you. You can follow me on <a href="https://twitter.com/felixnjoguKE">Twitter </a>and <a href="https://www.linkedin.com/in/felix-njung-e-5159a083/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1682d0af31f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[It’s Never Too Late to Start Over. Trust Me]]></title>
            <link>https://medium.com/@felixnjogu/its-never-too-late-to-start-over-trust-me-4c1f00064be0?source=rss-e22d09d08234------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c1f00064be0</guid>
            <category><![CDATA[rebranding]]></category>
            <category><![CDATA[moving]]></category>
            <category><![CDATA[starting-over]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Felix Njogu]]></dc:creator>
            <pubDate>Tue, 08 Feb 2022 07:23:56 GMT</pubDate>
            <atom:updated>2022-02-08T07:41:44.601Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jo-fKbdAOnSo4vHZPOr5nQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@srz?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">sydney Rae</a> on <a href="https://unsplash.com/s/photos/optimism?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I have two stories to tell.</p><p>Alexandria is 29. She’s been doing freelance writing gigs since graduating from college 5 years ago. She recently got a chance to move to the UK from Kigali. It’s a minimum wage job there, but it presents her the chance to pivot and start a new life in a country with a hundred times more opportunities.</p><p>She is both excited and hesitant. Her parents just retired, and she has younger siblings who look up to her for guidance and financial support. They love coming around to her house. Will they be fine?</p><p>She is doing well by developing world standards. But deep down, she knows the ceiling is too low for her in Rwanda. So, she has decided to take the gigantic leap, albeit cautiously.</p><p>There is also another story. One of Cecilia, who currently lives in the US. She’s in her mid-sixties. She moved there ten years ago, although her paperwork isn’t quite right. Still, she’s done well for herself and supports her family back home with monthly stipends.</p><p>At her age, you’d think she wants to retire and go back home. No, she doesn’t.</p><p>She feels young. Her friends say she looks 20 years younger than 60. After living in a place with limited opportunities for over 50 years, she’s worked hard these past 10 years. They have entrusted her with so much responsibility at work. Her biggest regret is she doesn’t have enough formal education.</p><p>What does she plan to do?</p><p>Go back to school! Yes, you read that right. Once she takes care of her paperwork, she says she will go back to school to raise her prospects of better pay and greater responsibility.</p><p>When someone told me Cecilia’s story, it put so much into perspective for me. I am almost 30, and the idea of pivoting to something new sometimes scares me. And yet, this 60+year-old looks ahead with so much optimism.</p><p>But let’s think about this. A 60-year-old who took a career turn at 30 must have been scared stiff. Yet 30 years ago was 1992. 1992 was ages ago. At 30, you are still very young; you still have a lifetime ahead of you.</p><p>To Alexandria and anyone else facing this dilemma: life is full of many wonderful possibilities if you decide to see it that way. Fortune favors the brave. It’s optimists who change the world. So go out and make the life you always dreamed about.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c1f00064be0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Future is Built on Weekends; Seize Them!]]></title>
            <link>https://medium.com/@felixnjogu/the-future-is-built-on-weekends-seize-them-ffa1db4b5adb?source=rss-e22d09d08234------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffa1db4b5adb</guid>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[freelancing]]></category>
            <dc:creator><![CDATA[Felix Njogu]]></dc:creator>
            <pubDate>Sun, 06 Feb 2022 14:48:29 GMT</pubDate>
            <atom:updated>2022-02-06T18:09:40.275Z</atom:updated>
            <content:encoded><![CDATA[<p>Is the weekend the time to relax, forget your 9–5, and get plastered with colleagues? No. Your future depends on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OLN_msYlJAGXGZg7K_8MkA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@brandsandpeople?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Brands&amp;People</a> on <a href="https://unsplash.com/s/photos/project?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>According to a well-respected Nigerian business executive, <a href="https://twitter.com/tayooye">Dr. Tayo Oyedeji</a>, the future is built on weekends. In their twenties and thirties, young people should use as many weekends as possible to work on personal projects. If they have no such projects, then it’s a cause for worry.</p><p>I agree with the good doctor. Your first regular job will pay your bills. But in most cases, it will not be your dream job, both pay-wise and the desired amount of responsibility.</p><p>Dr. Tayo Oyedeji is currently the CEO of Overwood, a high-yield investment firm in Nigeria. He has over 20 years of experience in the corporate and academic worlds. While working his first job, he studied for GRE exams on weekends. In 2011, he built his first software development shop on weekends. He built his brainchild, Overwood, on weekends. Now he can afford to take his foot off the gas and chill on weekends.</p><h4>Changing Your Circumstances</h4><p>There are many people who are currently stuck in jobs they hate, but they cannot quit because of bills. Such people can use their weekends to chart an alternative path for their lives and eventually quit that job.</p><p>Here are a few things you could do during the weekend to brighten your prospects.</p><ul><li><strong>Learn a new skil</strong>l: Upskilling is one of the best ways to spend time off. You can take an online course, attend webinars, or work as an apprentice at someone’s shop to learn their trade. Handy skills such as woodwork can be extremely valuable when trying to grow your income or start a business.</li><li><strong>Meet mentors: </strong>Use weekends to meet people who have walked the road you intend to walk. Mentors help you visualize your future. They keep you accountable for your goals.</li><li><strong>Volunteer in your community: </strong>Committing to voluntary work will have you seeing the world in a different light. It helps you appreciate the opportunities presented to you. You will find pleasure in doing good. The world today makes us think pleasure only comes through extravagance. Doing community work dispels this myth while planting a seed of love for humanity in you. Long-term commitment to community work also proves you can be trusted.</li><li><strong>Apply for postgraduate studies:</strong> Early on in your career, you will realize the area of specialization you’d like to dedicate yourself to. This will inform your postgraduate area of study. Spend your weekends finding the best places to take your postgrad studies. During weekends, reach out to people who’ve studied there. Take advice on writing application letters and essays to improve your chances of acceptance.</li><li><strong>Read: </strong>Where do people find the time to read 50 books in a year? Well, they don’t find the time. They make time. They actively choose to spend a few hours reading on Saturday and Sunday. I’ve heard of CEOs who, during long weekends, go off-grid with a stash of books on a subject they want to understand. That’s intentionality.</li><li><strong>Spend time with family:</strong> Weekends are a great time to spend with loved ones. However, we rarely actively think of how or with whom we want to spend time off from work. There is no ‘free time’ because life is so short. We ‘spend’ each moment we are alive. The most productive people know how they want to spend their weekends. It could be as simple as taking their kid to football practice or driving 3 hours to see an ailing relative. Don’t just let time pass by. Take charge of yourself.</li><li><strong>Journal: </strong>Journaling is a powerful tool. It will help you introspect about your goals, choices, wins, and losses. A weekly journal could help you be more definitive about what you want from life. Build a habit of writing things you want to accomplish each week. Give yourself an honest the following weekend.</li></ul><p>I know this sounds too serious. Your weekends should be exciting. You just need to be excited about the right things. The prospect of bettering your future should be enough motivation to put in work, even during weekends. The older you will thank you for the sacrifices. Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffa1db4b5adb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is Twitter More Toxic than Helpful?]]></title>
            <link>https://medium.com/@felixnjogu/is-twitter-more-toxic-than-helpful-43041b3f7dce?source=rss-e22d09d08234------2</link>
            <guid isPermaLink="false">https://medium.com/p/43041b3f7dce</guid>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[freelancing]]></category>
            <category><![CDATA[twitter]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[life-lessons]]></category>
            <dc:creator><![CDATA[Felix Njogu]]></dc:creator>
            <pubDate>Thu, 03 Feb 2022 12:54:28 GMT</pubDate>
            <atom:updated>2022-02-03T12:54:28.332Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OFcgazyRDjwsMC9UGJGCNw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@brett_jordan?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Brett Jordan</a> on <a href="https://unsplash.com/s/photos/twitter?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>What’s the first thing you do when you wake up? Scroll your Twitter feed?</p><p>You are not alone. I’ve done this for far too long and a part of me hates it now.</p><p>For most of us, it’s a way to catch up with the latest events in politics, sports, and pop culture.</p><p>Recently though, I’ve used Twitter to learn. I began by following accounts that share knowledge on freelance writing and blockchain technology. It’s how I got started on Medium after reading a book by Nicolas Cole.</p><p>Now I get to read at least five enlightening threads every day on Twitter. I learn a lot. But I still find Twitter problematic as a platform.</p><p>For every 1 useful thread, there are hundreds of mean, distasteful, and intentionally misleading tweets. I am not a social media expert, but I have been on the platform long enough to realize that it rewards these kinds of tweets.</p><p>The kinds of tweets that go ‘<em>viral</em>’ on Twitter are often quirky, funny, short tweets or replies to a tweet. Users now know this and it fuels an urge to be seen as ‘smart’ or ‘funny’. People will tweet a certain way to get more ‘engagement’ instead of sharing a more thoughtful or useful comment.</p><p>Twitter was meant to be a microblogging website where people could have an unfiltered discourse on any topic. However, I feel that their ‘reward system’ impedes serious discourse. The quest for likes and retweets begets ‘silly’ comments in the middle of an otherwise serious issue.</p><p>Today, we can reduce almost anything to a meme.</p><h3>The Character Limit Argument</h3><p>I’ve read several posts on why Twitter isn’t an effective platform for serious debate. The most common issue cited is the character limit. Writers argue that 280 characters aren’t enough to break down serious issues. I’m inclined to agree. Platforms that do not limit character use (think Reddit and Quora) form communities of people interested in a specific topic.</p><p>Twitter is literally the opposite. You will find a thousand topics being discussed on your timeline. However, people will almost always try to be funny or mean.</p><p>I’m therefore confused. I stopped watching mainstream news a few years ago because almost all stories were negative. It can be quite tiring. I also took a long break on Instagram to help focus on my own life instead of others.</p><p>Should I do the same with Twitter? I’ve muted at least a dozen accounts for being too mean to other users. I didn’t want such energy on my feed. But is it better to take more radical action?</p><p>I bet if I do that, I will focus more on my day-to-day activities. Keeping up with Twitter stories is quite a distraction. I can feel the shot of dopamine in my brain whenever I open the app.</p><p>Too many people are addicted to the Twitter setup. They are always looking for the next funny tweet or scandalous story. But what’s the effect on their spirit? Do they celebrate bullying unknowingly? Misinformation? Misogyny? Classism? Homophobia?</p><p>There is also the argument that too many people on Twitter are unhappy with their own lives and thus seek to make others feel bad too. There is some truth to that theory. After all, misery loves company.</p><p>I’m convinced that corporations will always prioritize profit over wellness. That’s why Twitter is not optimized for proper debate. It’s meant to maximize the time users spend there. The juiciest stories will always show up first on your feed. It’s up to you to either curate a positive timeline or walk away from the toxicity altogether.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43041b3f7dce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Power of Daily Journaling: Should you Be Doing It?]]></title>
            <link>https://medium.com/@felixnjogu/the-power-of-daily-journaling-should-you-be-doing-it-dcfafb2dc2dd?source=rss-e22d09d08234------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcfafb2dc2dd</guid>
            <category><![CDATA[work-life-balance]]></category>
            <category><![CDATA[writing-tips]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[journaling]]></category>
            <category><![CDATA[freelancing]]></category>
            <dc:creator><![CDATA[Felix Njogu]]></dc:creator>
            <pubDate>Mon, 31 Jan 2022 13:54:15 GMT</pubDate>
            <atom:updated>2022-01-31T13:54:15.544Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h9jkdGd8WGt3w4sXKP8X_w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jessbaileydesigns?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jess Bailey</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I’ve read countless testimonies of people who’ve been journaling daily for years. People who take a moment each day to take stock of their lives. Serena Williams says it helps to clear negative thoughts from her mind.</p><p>For many people, journaling can be scary. The thought of assessing where you are, what you are trying to do, and the steps you need to take to get there puts many people off.</p><p>Yet, I believe this is where the power of journaling originates. You get to have honest conversations with yourself every day. You ask the hard questions. Did I work hard enough today? Did I give my all during that presentation? Could I have put in one more set at the squat machine? Could I have been nicer to that stranger?</p><p>When working towards long-term goals that take years of preparation to come to fruition, it’s easy to become disillusioned. There are lonely days and months during which no one notices your gift. Nothing seems to move. No one knows how many hours of work you put in. It can be incredibly brutal, especially when you are used to extrinsic rewards such as compliments.</p><p>I believe people who are self-motivated attain more success because they do not rely too much on external encouragement.</p><p>Can we train to become self-motivated? I think so. By sitting down and taking stock daily, you can slowly start becoming proud of yourself. You get joy from showing up for things that you really value. Your actions match your ideals.</p><h4>Championship Mindset</h4><p>I have seen people who’ve got a championship mindset. They seem to be switched on at all times, regularly clocking 16-hour workdays, and getting so much done each week. They handle many enormous responsibilities and make it all look easy.</p><p>Those people are hyper-focused. Whereas we see them doing so much, I think they excel at cutting off distractions more than the average person. The person who does a dozen laps in the pool every morning before sunrise has turned down offers to take up other hobbies. The guy who sits on the board of three companies has turned down opportunities to sit on other boards or lead other companies because he knows he has a lot already. Their planning is meticulous and they schedule things weeks in advance.</p><p>Consistent journaling gives your championship-level self-awareness. You realize when you are slacking. But you also know when you are killing it. It helps you get out of your slumps, but it also makes you take in your wins just as much. It’s an incredibly powerful and free tool. Use it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcfafb2dc2dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Realized I Cannot Be Everywhere, and it’s Fine]]></title>
            <link>https://medium.com/@felixnjogu/i-realized-i-cannot-be-everywhere-and-its-fine-355a02adc19a?source=rss-e22d09d08234------2</link>
            <guid isPermaLink="false">https://medium.com/p/355a02adc19a</guid>
            <category><![CDATA[dreams]]></category>
            <category><![CDATA[consistency]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[Felix Njogu]]></dc:creator>
            <pubDate>Thu, 27 Jan 2022 12:47:50 GMT</pubDate>
            <atom:updated>2022-01-27T12:47:50.724Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IaNeLyxN_RAba4OqYtUMDQ.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@markusspiske?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Markus Spiske</a> from <a href="https://www.pexels.com/photo/landscape-mountains-sky-man-105857/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p>The first month of the year just breezed past and I am trying to take stock. Yesterday, I got a text receipt for my monthly Spotify subscription. It hit me I haven’t listened to any music or podcasts this month. I wondered how that could be. Have I changed?</p><p>I have been busy. I set some lofty targets for myself; to open a Medium account and publish as often as I can, to share my skill with businesses around me to increase my chances of landing freelance gigs. and to read books and publications on Blockchain as I search for opportunities in that field. I am pleased with my progress.</p><p>At the same time, I now accept I cannot be everywhere all the time. I can no longer sit and watch 3 Premier League games in one weekend. I cannot be at every gathering I get invited to. I cannot listen to all my favorite podcasts.</p><p>Luckily, I did one thing consistently besides work-related staff, working out.</p><h3>Is there a Balance?</h3><p>This week, I sat down with a friend who’s 5 years younger than I to exchange business growth ideas. He is building a company which, from my perspective, is doing quite well. From his view, though, he’s barely scratched the surface. His dreams are wild. He’s putting in 18 hours a day, teaching himself how to code, and building on the go. He is constantly thinking and strategizing. The kid is barely in his mid-twenties.</p><p>I got a lesson on prioritization. His is a classic example of putting on blinders and paying the price. Reinvesting everything you make into the business because you are backing yourself. Sometimes there is no balance. At least not at the beginning of the journey. And that is fine.</p><p>Dreams are always worth the cost. There is no greater joy than seeing them turn into reality. No amount of short-term dopamine boosts can match the feeling.</p><p>As a writer, it’s easy to be hard on yourself for sacrificing too much to perfect your craft. But the work must match the dream. It’s okay to work on one pitch for hours after your 9–5. It’s alright to rework a headline dozens of times. Nothing’s wrong with missing a night out because you do not want to break your writing streak.</p><p>So, if the Spotify text comes before I open the app again, I will not care. Hopefully, I will have landed my first freelance client.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=355a02adc19a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>