<?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 Muheenat Bankole on Medium]]></title>
        <description><![CDATA[Stories by Muheenat Bankole on Medium]]></description>
        <link>https://medium.com/@bisolabankole74?source=rss-b200c19fb17d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*O8j2FkPA85Nfly7EH1Xz2g.jpeg</url>
            <title>Stories by Muheenat Bankole on Medium</title>
            <link>https://medium.com/@bisolabankole74?source=rss-b200c19fb17d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 02:26:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bisolabankole74/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[KPMG Virtual Internship-Analysis for Sprocket Central Pty Ltd (a bike sales company).]]></title>
            <link>https://medium.com/@bisolabankole74/kpmg-virtual-internship-analysis-for-sprocket-central-pty-ltd-a-bike-sales-company-fbc0ed751b6c?source=rss-b200c19fb17d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbc0ed751b6c</guid>
            <category><![CDATA[virtual-internship]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Muheenat Bankole]]></dc:creator>
            <pubDate>Wed, 12 Apr 2023 22:13:58 GMT</pubDate>
            <atom:updated>2023-04-12T22:13:58.925Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8NsAdlUk9XbbyekkmhJUkQ.jpeg" /></figure><p><strong>Introduction</strong></p><p>“Sprocket Central Pty Ltd, a medium size bikes &amp; cycling accessories organization, has approached Tony Smith (Partner) in KPMG’s Lighthouse &amp; Innovation Team. Sprocket Central Pty Ltd is keen to learn more about KPMG’s expertise in its Analytics, Information &amp; Modelling team.</p><p>Smith discusses KPMG’s expertise in this space (you can read more <a href="https://home.kpmg/au/en/home/services/advisory/management-consulting/digital/data-analytics-modelling.html"><strong>here</strong></a>). In particular, he speaks about how the team can effectively analyze the datasets to help Sprocket Central Pty Ltd grow its business.</p><p>Primarily, Sprocket Central Pty Ltd needs help with its customer and transaction data. The organization has a large dataset relating to its customers, but its team is unsure how to effectively analyze it to help optimize its marketing strategy.</p><p>However, to support the analysis, you speak to the Associate Director for some ideas and she advised that “<em>the importance of optimizing the quality of customer datasets cannot be underestimated. The better the quality of the dataset, the better chance you will be able to use it to drive company growth</em>.”</p><p>The client provided KPMG with 3 datasets:</p><ul><li>Customer Demographic</li><li>Customer Addresses</li><li>Transactions data in the past 3 months.”</li></ul><p><strong>Task 1 - Data Quality Assessment</strong></p><p>The first task in this exercise is to carry out a data quality assessment on the datasets provided by Sprocket Central ltd stating every data quality issue available within the dataset using the data quality framework below;</p><p>“Below is a list of the Data Quality dimensions our team may use to evaluate a dataset. Some of these terms are common to the whole industry, so you may find more information and clarity on these terms by searching online.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pATfVCgjmVAYC1pC.png" /></figure><p>After going through the dataset, the following data quality issues were found in the dataset, as stated in my drafted email ;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qkwva4P8D0vu2KTkgdmS2g.png" /><figcaption>page 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*diAl62-Wn69nMXBAK5zbYg.png" /><figcaption>page 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3EdktlPKKoOjZQHPhFP26A.png" /><figcaption>last page</figcaption></figure><p><strong>Task 2 - Model Development</strong></p><p>The second task involves creating — “a PowerPoint presentation that outlines the approach which we will be taking. The client has agreed on a 3-week scope with the following 3 phases as follows — Data Exploration; Model Development and Interpretation.</p><p>Prepare a detailed approach for completing the analysis including activities — i.e. understanding the data distributions, feature engineering, data transformations, modeling, results interpretation, and reporting. This detailed plan needs to be presented to the client to get a sign-off. Please advise what steps you would take.</p><p>Please ensure your PowerPoint presentation includes a detailed approach for our strategy behind each of the 3 phases including activities involved in each — i.e. understanding the data distributions, feature engineering, data transformations, modeling, results interpretation, and reporting. This detailed plan needs to be presented to the client to get a sign-off.”</p><p>It is important to state that — “Sprocket Central Pty Ltd has given us a new list of 1000 potential customers with their demographics and attributes. However, these customers do not have prior transaction history with the organization.</p><p>The marketing team at Sprocket Central Pty Ltd is sure that, if correctly analyzed, the data would reveal useful customer insights which could help optimize resource allocation for targeted marketing. Hence, improve performance by focusing on high-value customers.</p><ul><li><strong><em>The key objective of this analysis</em></strong> is — <em>“Using the existing 3 datasets (Customer demographic, customer address, and transactions) as a labeled dataset, please recommend which of these 1000 new customers should be targeted to drive the most value for the organization.”</em></li></ul><p>I will be sharing my slides containing my Data exploration, Model development, and Interpretation processes using the PowerPoint template provided in the exercise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*JVCoktGX46JgSvUTbHV-kg.png" /><figcaption>pg 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*impCJ0RdxDvnbkEzO8Yn9Q.png" /><figcaption>pg 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*Lp1T0a3FnRPWkaMzWJPhxA.png" /><figcaption>pg 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*dTcZJilGUqGd_PBT09YFdw.png" /><figcaption>pg 4</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*QTNMi3kM1rr_rPE8XrwW_Q.png" /><figcaption>pg 5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*x619LvuOuijnUMh_tOn30g.png" /><figcaption>pg 6</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*d0sCi2RzABNjn1QS9HdfcQ.png" /><figcaption>pg 7</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*ghw_GKIxGUuqjjHP8DqCiQ.png" /><figcaption>pg 8</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*qvexUbpqkKO5RVrPsk3LGg.png" /><figcaption>pg 9</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*lb-uGNL_KhNJ10QO2HtbIA.png" /><figcaption>pg 10</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*9SNfTVIFKJYZeO4Quah5UA.png" /><figcaption>pg 11</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*afzLzlVHtElSgfKOibCFzQ.png" /><figcaption>pg 12</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*cEO0MRRuYfhGfoqStHJY3Q.png" /><figcaption>pg 13</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*QdwrC_ewKY_lE-7Mimu8aA.png" /><figcaption>pg 14</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*Mvp0C1MHEMmcr9oamHlsrg.png" /><figcaption>pg 15</figcaption></figure><p><strong>Task 3 -Data Insights and Presentation.</strong></p><ul><li>This third task requires using data visualization tools to develop a dashboard that can be presented to the client. It is important to make sure the dashboard shows data points that answer the key objective questions of the business. see the dashboard below;</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CW94rCDL_zIhS0w1DK4EDQ.png" /><figcaption>dashboard for sprocket ltd.</figcaption></figure><p><strong>Key Insights and Recommendations</strong></p><p>The following insights were deduced from the analysis;</p><ul><li>Throughout the fiscal year <strong>2017</strong>, customers between the age of <strong>35–49</strong> generated the highest revenue for the company to the tune of $4.1million. Similarly, these customers have the highest number of bike-related purchases over the past 3 years and also have the highest purchases of the company’s product for all 3 product classes <strong>(medium, low, and high).</strong></li><li>Customers have been categorized into 3 wealth segments, the mass customer segment made the highest transactions amounting to about <strong>50%</strong> of the total orders. Female customers made higher transactions amounting to <strong>51.24%</strong> of total transactions which is just a little above the male customers’ transactions of <strong>48.76%</strong>. The product class has 3 categories, out of which the medium class of products was massively ordered by customers with about <strong>69.72%</strong> of total orders.</li><li>Sprocket Central customers are spread across 3 states — <strong>NSW, QLD, and VIC</strong> — in Australia. Customers resident in <strong>NSW</strong> generated the highest profit and orders with a total of <strong>$5.6million</strong> and <strong>10,319</strong> respectively. Also, the highest orders in the past 3 years for bike-related purchases came from <strong>NSW</strong> with a total of <strong>89,281</strong> orders. Amongst the 3 states, <strong>NSW </strong>also has the highest percentage of customers who own/ do not own a car.</li><li>Every month in the year saw orders above <strong>1,000</strong>. The top 3 months are <strong>October, August, and July</strong> with totals <strong>of 1,718, 1,690</strong>, and <strong>1,649</strong> orders respectively. The month of <strong>September</strong> saw the lowest number of orders with a total of <strong>1,518</strong> orders.</li></ul><p><strong>Key Recommendations.</strong></p><p>1. Targeted ads and campaigns should be focused on new customers within the age range of 35–49, closely followed by the range 49 to 63 as these are the set of customers that have generated the highest profit for the business during the year, and have also made the largest amount of bike-related purchases in the past 3 years.</p><p>2. New customers who belong to the mass customer wealth segment should be considered high-value customers, as 50.12% of orders were made by old customers in this segment.</p><p>3. New customers resident in NSW state should be targeted because most profit generated by the business came from orders of old customers who are residents in the NSW state. Similarly, NSW customers have also made the highest bike-related purchases in the past 3 years.</p><p>4. Targeted ads and campaigns should be aimed at customers who do not own a car, as this set of customers may consider purchasing a bike as an alternative means of transportation. Nevertheless, customers who own a car should not be left out they may purchase bikes for means other than transportation.</p><p>5. From the old customer list, past 3 years bike related purchases of customers ranged between 0–99. New Customers who have made a minimum of 75 bike-related purchases in the past 3 years should be regarded as high-value customers.</p><p>This brings us to the end of the virtual internship process. Thank you for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbc0ed751b6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Cleaning With Microsoft Excel/Power Query Editor]]></title>
            <link>https://medium.com/@bisolabankole74/data-cleaning-with-microsoft-excel-power-query-editor-22a35e7eebc1?source=rss-b200c19fb17d------2</link>
            <guid isPermaLink="false">https://medium.com/p/22a35e7eebc1</guid>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[power-query]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Muheenat Bankole]]></dc:creator>
            <pubDate>Fri, 17 Mar 2023 17:45:39 GMT</pubDate>
            <atom:updated>2023-03-17T17:45:39.298Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H5gf7mngHJCs1K0PLCs_RA.jpeg" /></figure><p>I participated in a #datacleaningchallenge on twitter in which everyone was asked to use a tool of their choice, either Excel, Power Bi, SQL, Python or R. The dataset is a very messy and raw dataset of EA Sports’ latest installment of their hit FIFA series — FIFA21, which was scraped from sofifa.com. You can find the dataset <a href="https://www.kaggle.com/datasets/yagunnersya/fifa-21-messy-raw-dataset-for-cleaning-exploring">here</a>.</p><p><strong>What is Data Cleaning</strong>?</p><p>Data cleaning is the process of fixing or removing incorrect, corrupted, incorrectly formatted, duplicate, or incomplete data within a dataset. Data cleaning can include removing duplicates, changing data types, replacing missing values etc.</p><p>The main objective of this project is to ensure that the fifa_21 dataset is dully cleaned and ready for analysis purposes.</p><p><strong>Data Cleaning Process</strong></p><p>The dataset contains 2 csv files namely; fifa21_raw_data and fifa21 raw data v2, both of which basically contains same information, so you can choose either. For the purpose of this cleaning process, I will be choosing the fifa21_raw_data file.</p><p>For starters, I converted the csv file into an excel workbook to avoid loss of data. The dataset is made up of 77 columns and 18979 rows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*soAm24PHz2wtrOMhKeDjZA.png" /><figcaption>An overview of the first 18 rows in the dataset</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*azD6kG0S9r7RKMwDSNreUA.png" /><figcaption>An overview of next 18 rows</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LwbQL-spvr0GEarVvBMOXw.png" /><figcaption>Next 19 rows</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2RgDHV8N72IbQ9tM8duEiQ.png" /><figcaption>Last 22 rows</figcaption></figure><p>I duplicated the dataset into a new worksheet where the data cleaning and manipulation will be carried out. It is also a good practice to duplicate datasets so as not to tamper with the original dataset.</p><p>The next step is to load the data into the power query editor- this is where most of my cleaning will be done. To migrate your dataset into the power query editor, make sure a cell within the dataset has been selected,go to the data tab, select from table/range, make sure to check that the ‘my table has headers box’ is ticked and click ‘OK’. This brings you to the power query editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tfT53jXeiiwc_iFLUceo8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Az6i8DTrcjH8Ov0UgQ0Wvg.png" /><figcaption>An overview of the dataset in the power query editor</figcaption></figure><p>As seen in the above image; On the bottom left side of the Power Query editor, click on ‘column profiling based on top 1000 rows’ and change it to ‘column profiling based on entire dataset’. This is very important most especially for data profiling. You can profile your data in order to gain quick insights on the quality, statistics, distribution of each column.</p><p>Simply go to the ‘View tab’, in the ‘Data Preview’ section, check/tick the ‘column quality’, ‘column distribution’, and ‘column profile’ boxes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GPiJioJLZ7vi89_fyaapzg.png" /></figure><p>From the above image, ‘column quality’ shows the percentage(%) of valid rows, rows with error, and empty rows. ‘Column distribution’ shows a quick count of distinct and unique values while ‘column profile’ gives a deeper insight into the column statistics and also a column/bar chart showing the distribution of values in the column.</p><p>It is time to dissect the dataset column by column checking for wrong data types, replacing unwanted values with preferred values, converting and calculating, deleting unwanted columns etc.</p><p>Starting with the LongName column, it is of the correct data type but it contains some special characters that cannot be classified as alphabets. Hence, I’ll be extracting the full names of the players from the playerUrl column. First, select the PlayerUrl column, right click, then select duplicate column from the list of options. Next, go to the ‘Transform’ tab, in the ‘Text column’ section, click on split column, choose ‘By Delimiter’, then in the dialogue box that appears, enter ‘/’ and split at ‘each occurrence of the delimiter. Then click OK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q222RpRTkytDpSzQ5fyZvA.png" /></figure><p>This splits the duplicated column into 8 separate columns and the 6th column happens to contain the players’ fill names which is exactly what we need and I’ll rename to LongName.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m1AQJ3EplqIRfsZeJsVflQ.png" /></figure><p>I’ll delete all other parts of the split column, including the original LongName column (containing special characters) provided in the dataset. Lastly, for this column, I’ll need to replace each occurrence of the hyphen(-) to space( ). A quick way to do this is to select the LongName column, right click, select ‘Replace values’ from the list of options, insert ‘-’ in the value to find box, and ‘ ’ in the replace with box. Then click ‘OK’. Similarly, you can also, to the ‘Transform’ tab, in the ‘Any Column’ section, click on replace values and fill the boxes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rBe25nyiJbp3XjwoRDHgOw.png" /></figure><p>Also, you can format the values in the column to proper case by going to the Transform tab, in the ‘Text column’ section, click on ‘Format’ and select ‘capitalize each word’. Below is the end result of the cleaned Longname column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*IEu7hVHMny1FTFsfRfyo5g.png" /></figure><p>The next column I’ll be working on is the ‘Positions’ column. Although it is of the correct data type, I will need to insert a comma(, ) as delimiter. Kindly refer to the replace values steps above to replace each occurrence of ‘space’ with a ‘comma’. See the end result of the ‘Positions’ column below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*goYRPHhZRW_CPdGADXrtJw.png" /></figure><p>The next column to be worked on is the ‘Team &amp; Contract’ column. I’ll be splitting the column into 3 separate columns namely; Team, ContractStartYear and ContractEndYear. This is to aid easy calculation during analysis when trying to find the number of years a player has spent or is meant to spend in each team. I split the column at first ‘By Delimiter’ (~), this split the column into 2, and I renamed the second to ‘ContractEndYear’. Then I went back to filter the first column, using the ‘Text filter’ option to return rows that ‘does not end with’ ‘On Loan’ Or ‘Free’. Then I split the column again by ‘number of characters’ ‘4’ ‘Once, as far right as possible’. This also split the column into two which I named the second column ‘ContractStartYear’ and first column as ‘team’.</p><p>The ‘ContractStartYear’ and ‘ContractEndYear’ has about 6% null values each. Then I went ahead to replace the special characters included the team column using the find and replace function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*7Cr4DuGGk98kEbHoKrW5Bw.png" /></figure><p>The next columns to be worked on are the ‘Weight’ and ‘Height” columns. I started out by duplicating both columns. For the duplicated ‘Weight’ column, It was formatted as a text data type which is wrong, also, I needed to convert it from feet’inches” to centimeter. I split the column using the ‘Digit to Non-Digit’ option, changed the data type to whole number, then added a custom column to convert from lbs (pound) to kg (kilogram). To add a custom column. Go to the ‘Add column’ tab, in the ‘General’ section, click on ‘Custom column’, In the dialogue box, add the new column name, and custom formula to be used. In this case, I multiplied the ‘weight.copy’ column by 0.453595.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PHaFXknObawB9YqZUrYEKQ.png" /></figure><p>I rounded down the values from the ‘Add Column’ tab, in the ‘From Number’ section and the data type was automatically formatted to whole number</p><p>For the duplicated ‘Height’ column, I replaced the values (’) &amp; (”) with (.) &amp; () respectively. This enabled me have a decimal data type, and I was able to add a custom column where I multiplied the Height by 30.48, which happens to be the conversion rate from feet’inches” to Centimeter. I did a rounding up of the value and formatted to whole number data type. Below is the outcome of the Height and weight columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*27A_BYtYEuiLtRW0J_V1Og.png" /></figure><p>The LoanDateEnd is of the wrong data type. It has been formated as text rather than date. This is because of the ‘N/A’ text values included in the column. I will replace the ‘N/A’ values with ‘null’, then I changed the data type to date. From the ‘Loan Date End’ column, we can tell that only about 3% of the players are on loan to another team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/159/1*paU2VchjE4vwmG-xl2_F1g.png" /></figure><p>The ‘Value’, ‘Wage’ and ‘Release Clause’ columns are of the wrong data type because they contain trailing special characters. They should be formatted as whole number rather than text- as seen above. I used the split column function to remove the first 3 characters from the left of all 3 columns. The columns also contained suffixes such as ‘K’ and ‘M’ which stands for ‘thousands’ and ‘millions’ respectively. I duplicated the column, removed the suffixes from one, leaving only the figures, and left only the suffixes in the other column. Then I created another column, using the ‘IF’ function to multiply rows with ‘M’ suffix by 1000000, else, multiply by 1000. This was repeated for all 3 columns. I changed the data type to whole number and renamed the new columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*cNUuGeKEVr983W8ijCg2Dw.png" /></figure><p>The ‘W/F’ and ‘SM’ columns were formatted wrongly as text because they contained special characters. I used the split column to split the columns into 2, by number of characters in the rightmost occurrence. Then changed the data type to whole number. The columns were also renamed to ‘Weak Foot’ and ‘Skill Moves’ respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/78/1*QyAyb1S6gJF9ZNG9GftxqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/187/1*ujmxte_UfEYRibiNKfPXxQ.png" /></figure><p>The columns below were renamed to ‘Overall Rating’, ‘Potential Rating’, and ‘Best Overall Rating’ respectively. As ratings, we will need to convert this columns to percentage data type. This can be done by creating new columns for each and divide(/) the values by 100, then change the data type to percentage(%), rename accordingly and delete previous columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*M3nmrmNZOUsCiZUldpCZ_Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*aqWnaM5saD9xYrdvqRi9mA.png" /></figure><p>The Hits column has been formatted as text, which is wrong. This is because there are values in thousands which have been denoted by the suffix ‘K’. So I created another column to multiply values by 1000 if there is a suffix ‘K’. Then we can change the data type to whole number.</p><p><strong>Conclusion</strong></p><p>It has been a great learning curve working on this project as this is the most cleaning I’ve had to do on a dataset. I am mostly certain that with this level of cleaning done, the dataset is ready to be explored for further analysis. Please view the worksheets of the before and after cleaning of the dataset <a href="https://docs.google.com/spreadsheets/d/11w8Yx12SkyaXa6AOp5iIuY1bmKtpNdk9/edit?usp=share_link&amp;ouid=107962854999795195047&amp;rtpof=true&amp;sd=true">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22a35e7eebc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analysis of a Pharmaceutical Manufacturing Company’s Dataset with Excel and PowerBI.]]></title>
            <link>https://medium.com/@bisolabankole74/analysis-of-a-pharmaceutical-manufacturing-companys-dataset-with-excel-and-powerbi-e1250e5ede5e?source=rss-b200c19fb17d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1250e5ede5e</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Muheenat Bankole]]></dc:creator>
            <pubDate>Tue, 14 Feb 2023 23:27:05 GMT</pubDate>
            <atom:updated>2023-02-15T23:09:52.801Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*WihTiukBwGkdGeB3asSGiA.jpeg" /></figure><p><strong>Introduction</strong></p><p>Foresight Pharmaceuticals is one of the leading Pharmaceutical Manufacturing companies with a global presence.</p><p>Their Markets are divided into different regions across the world. One of those regions manages the Germany and Poland Markets. But the company does not sell directly to customers. Instead, they work with a couple of Distributors in all their regions.</p><p>They have an agreement with each of the distributor to share their Sales Data with them. This is to enable them gain insights up to the retail level. The products are sold through 2 channels - hospital, pharmacy - and through 4 sub-channels - government, institution, private and retail.</p><p>The dataset contains sales figures, as well as distributor names, sales channel and sub-channel, sales team, and so on for years 2017 through to 2020. See dataset <a href="https://foresightbi.com.ng/practice-data/3-datasets-for-your-portfolio/">here</a>.</p><p>The <strong>key business task</strong> of this analysis is to determine the acceptability and gross performance of all products sold over a period of 4 years in order to drive smarter decisions to increase revenue .</p><p><strong>Data Preparation</strong></p><p>I opened the data in Microsoft excel, and there wasn’t much cleaning to be done. I proceeded to preparing the dataset before loading to Ms PowerBi.</p><p>I created named ranges for each column in the dataset using the column headers , then used the COUNTA and UNIQUE function to return the count of distinct values in the text columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uh4_zwYSSbgZKDs-GMKe1A.png" /><figcaption>counta and unique formula</figcaption></figure><p>I also created a new column named month_no, then used the VLOOKUP function to return the number equivalent of the month column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3JK9GLf83YSRRLZEIu8HnQ.png" /><figcaption>Vlookup formula</figcaption></figure><p>I created a column for Day by filling the rows with 1, that is first day of each month, then used the <strong>DATE </strong>function to concatenate the year, month and day into a single column named date.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KaQXoa_K3hmPK_THbaLjJA.png" /><figcaption>Date function</figcaption></figure><p>To minimize redundancy and increase efficiency, I would like to use the star schema for my analysis in PowerBi, so I divided all the columns in the dataset into a fact and dimensions table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*wND4lLsZGMP6mE5FgPm2Ww.png" /><figcaption>facts and dimensions table list.</figcaption></figure><p>From the above diagram, I have been able to draw a model for the dataset which will be used in creating 6 tables where the distributors, customers, products, sales Team, and geography tables are the dimension tables and values highlighted in yellow are primary keys, while the orders table is the fact table and values highlighted in yellow are the foreign keys. The next step is to load the data into PowerBi.</p><p><strong>Data Transformation.</strong></p><p>To load data into the power query editor, click on ‘Get Data’ in the home tab and select ‘Excel Workbook’, select the file to from your computer, in the navigation page, select the worksheet(s) to be uploaded and click on ‘Transform Data’. This brings you to the power query editor where you can manipulate, clean and transform your dataset.</p><p>I only uploaded the worksheet containing the dataset as I would be creating the dimension tables in the power query editor. I duplicated the dataset in 5 places and renamed each table according to the model mapped out earlier, namely ; Orders, Customers, Products, Geography, Sales_Team, Distributors. I then proceeded to transform each table to suit the schema.</p><p>For the fact table, which is the ‘Orders table’; I removed the Day, Month, Month_no and Year columns. Then merged the City, Latitude, and Longitude columns and named it ‘City_Lat_Long’ - which will serve as the primary key to the Geography table and the foreign key in the orders table. This left the Orders table with 9 columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m896KxTuTMs7MZGJ2P5qOQ.png" /><figcaption>An overview of the orders table.</figcaption></figure><p>I continued to transform the 5 dimension tables by repeating the process above - that is, removing unnecessary columns. In addition, I removed duplicates from these tables using the the primary key column for each table. This is because as dimension tables, they should only contain unique values. See all dimension tables below after transformation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*3i4tyF0d9zvomm-RrNoy2Q.png" /><figcaption>Customers table with 3 columns, 751 rows and customer name as the primary key.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*pZY5g_E_3zda3472fyYetQ.png" /><figcaption>Geography table with 5 columns, 751 rows and City_Lat_Long as the primary key.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*B_IOmQlY3erraWWlwd_ttg.png" /><figcaption>Products table with 2 columns, 240 rows and product name as the primary key.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*SMOOcrpWuoE-T_Fycqfk4Q.png" /><figcaption>Sales_team table with 3 columns, 13 rows and Name of sales rep as the primary key.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/166/1*3CIeOzCkY82uoOjENpVtcw.png" /><figcaption>Distribution table with 1 column and 29 rows.</figcaption></figure><p>I also created a new table named Calendar using the DAX function CALENDARAUTO(). This automatically generates a date column ranging from the first day of the first year , to the last day of the last year of the date information provided in the dataset. It also appears on the fields pane as a table, but not in the power query editor.</p><p>After generating the date column, I used another DAX formula to create a new column inside the Calendar table - <strong>Month = FORMAT(Calendar [Date}, “mmm”</strong>)<strong> </strong>- to return the text values of the month in the the date column.</p><p>I created another function named Year, using DAX function - <strong>Year = FORMAT(‘Calendar’ [Date], “yyyy”). </strong>Also created column for quarter with DAX function - <strong>Quarter = FORMAT (‘Calendar’ [Date], “\QQ”).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*5yKdrAq9vViftdZu9eBGjA.png" /><figcaption>Calendar table with 4 columns, 1461 rows and date as primary key.</figcaption></figure><p><strong>Data Analysis</strong></p><p>The next step is to analyze the dataset which is carried out in powerbi. I used different charts to show various data points from insights can be gotten. See below each tiles of charts that make up my analysis of the dataset.</p><ul><li>For starters, I used the cards viz to show the total sum of sales, distinct number of cities, products, distributors, sales teams, and sales person. I also added slicers for month and year at the top of my dashboard to enable interactions with other visualizations.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*lVjsn43M-q1sOES3aKt4gg.png" /><figcaption>Cards and slicer tiles</figcaption></figure><ul><li>I used the matrix table below to show the monthly sales revenue in each year as well as row totals and column totals. It shows revenue generated over the years where the highest monthly sales revenue was made in August 2019 while January 2019 recorded the lowest monthly sales.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*HT3K5l-F1hLMcCYtvr5qig.png" /><figcaption>Matrix table showing revenue overtime</figcaption></figure><ul><li>The bar chart shows the total revenue generated by top 5 cities, out of 749 cities. Butzbach stands at number 1 with a total of $94m generated. The doughnut charts show revenue generated by channels - which pharmacy generated 47% of the total revenue while hospital as a channel generated 53% of the total revenue. The second doughnut chart shows revenue generated by countries - most part of the revenue was generated in Germany which constituted about 94% of the total revenue while Poland generated only 6% of the total revenue through the years.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*4NXsM2hIsUouQdvZyVFb8Q.png" /><figcaption>Bar chart and Pie chart tiles showing revenue for top 5 cities, channels and countries.</figcaption></figure><ul><li>I used a ribbon chart to show the overall performance of the 4 sales teams in terms of revenue. The ribbon chart shows the revenue generated by each team for each year, and also, their ranks for that particular year. The line and column chart on the hand shows the Top 5 products that generated the highest revenue as well as the quantity of products sold to attain the sales figure.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*zM7nWFwGKkc1hkHkBe19Pg.png" /><figcaption>tiles showing sales performance for teams and performance of products.</figcaption></figure><ul><li>The column chart below displays sales performance of all 29 distributors with legends to depict which country each distributor is located.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*gYmKsNnRKtdWDK5zNIguXA.png" /><figcaption>Clustered column chart showing distributors sales performance per country.</figcaption></figure><ul><li>Lastly, Iused a bar chart to visualize the distinct number distributors per company. Also, I used a line and column chart (Combo) to visualize the total revenue generated in a year, as well as the quantity sold in each year to gross the sales amount.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*a1p5cL4p_HTk46ZMWzxBjQ.png" /><figcaption>charts to show number of distributors and sales per year.</figcaption></figure><p>I summarized all the tiles and visuals above to create an interactive dashboard, then published it on the powerbi service. Kindly interact with my report <a href="https://app.powerbi.com/view?r=eyJrIjoiMWM2ZDIyNTAtZTY3MS00Yjk4LTkxNjUtMWYxMTc2NDhmOWE2IiwidCI6ImNkNjY4M2E2LWFhODUtNDZjZi1hZWVhLTkyZDRhMTQ3NzAwOSIsImMiOjh9">here</a>.</p><p>Below is a diagram of my 2 pages report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Poghya9eQz_6T_MQp37Vgg.jpeg" /><figcaption>Page 1 of my report</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mtXEn6JJINlvniTCGTsCww.jpeg" /><figcaption>Page 2 of my report</figcaption></figure><p><strong>Insights</strong></p><p>After due analysis, listed below are the insights gained from analyzing the dataset</p><ul><li>Monthly sales reached its peak in the month of August 2019 grossing $480m, and lowest revenue was generated in the month of January 2019 with a total of $98m.</li><li>Annual sales was highest in the year 2018, generating a total of $3.5bn after selling about 8.4million units of products, whereas year 2020 saw the least sales generating about $2.7bn having sold about 6.5million units.</li><li>The revenue generated in Germany is highly significant compared to that generated in Poland. Germany generates a whooping 96% of the total revenue, while the remaining 6% is generated by Poland. The top 5 cities where revenue was highest over the years are no doubt located in Germany, with Butzbach at the forefront generating a total of $94million overtime.</li><li>The top 5 products in terms of revenue generated are - in descending order - Ionclotide, Tetratanyl, Sumanazole, Betanem, Docstry Rivacin. Ionclotiide sold about 268 thousand units to gross about $169million in revenue.</li><li>The most impressive sales performance for the sales teams goes to the Delta team. The Delta team successfully maintained rank 1 in performance for four years consecutively. The other 3 teams - Alfa, Bravo, Charlie - varied in ranks over the years.</li><li>There are a total of 29 distributors. Germany has 16 distributors while Poland has 13 distributors. Similarly, the top 8 most performing distributors in terms of revenue are located in Germany.</li></ul><p><strong>Recommendation</strong></p><ul><li>The huge disparity between the sales performance of both countries is very bedazzling. Could this be due to the fact that there aren&#39;t as much distributors in Poland as there are in Germany??? Could it be that, in Poland, people rarely have health issues that may require them to visit the hospitals or purchase pharmaceutical products?? I would recommend that the management of Foresight pharmaceuticals should get more distributors who have the capacity to penetrate into the Poland market, provide a form of enlightenment and health awareness campaigns, dominate the market, drive sales , and as an end result, increase revenue.</li><li>Foresight pharmaceuticals should increase investment in research and development which will lead to innovation of new pharmaceutical products which will be readily acceptable.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1250e5ede5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL MURDER MYSTERY -Can You Find Out Who Dunnit???]]></title>
            <link>https://medium.com/@bisolabankole74/sql-murder-mystery-can-you-find-out-who-dunnit-71a354e10db6?source=rss-b200c19fb17d------2</link>
            <guid isPermaLink="false">https://medium.com/p/71a354e10db6</guid>
            <category><![CDATA[querying]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Muheenat Bankole]]></dc:creator>
            <pubDate>Wed, 01 Feb 2023 00:37:49 GMT</pubDate>
            <atom:updated>2023-02-01T11:57:45.634Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*ck7uG8VxMvZo_WHZr586rw.png" /></figure><p>There’s been a Murder in SQL City ! The SQL Murder Mystery is designed to be both a self-directed lesson to learn SQL concepts and commands and a fun game for experienced SQL users to solve an intriguing crime.</p><p>See game <a href="https://mystery.knightlab.com/walkthrough.html">here</a>.</p><p>The SQL Murder Mystery was created by <a href="https://twitter.com/joonparkmusic">Joon Park</a> and <a href="https://twitter.com/Cathy_MeiyingHe">Cathy He</a> while they were Knight Lab fellows. See the <a href="https://github.com/NUKnightLab/sql-mysteries">GitHub repository</a> for more information. It was adapted and produced for the web by <a href="https://twitter.com/joegermuska">Joe Germuska</a>. This mystery was inspired by <a href="https://github.com/veltman/clmystery">a crime in the neighboring Terminal City.</a></p><p>I decided to test my SQL skills by writing queries to solve the murder using the schema below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*OBNZUGrlTOCaYuB4zhN0xw.png" /><figcaption>Entity relationship diagram for SQL City database.</figcaption></figure><p>The SQl Murder Mystery is built using SQL Lite</p><pre>--to find the names of tables in the database--<br><br>SELECT name <br>  FROM sqlite_master<br> where type = &#39;table&#39;<br></pre><pre>/*Listed below are names of tables in the database which are related to each<br>other in one way or the other - as seen in the entity relationship diagram above <br><br><br>crime_scene_report<br>drivers_license<br>facebook_event_check<br>interview<br>get_fit_now_member<br>get_fit_now_check_in<br>solution<br>income<br>person</pre><pre>-- to find the structure of the &#39;crime_scene_report&#39; table<br>-- you can also substitute the value of &#39;name&#39; to see the structure of other tables.<br><br>SELECT sql <br>  FROM sqlite_master<br> where name = &#39;crime_scene_report&#39;</pre><p>All we know is that a crime has taken place and the detective needs your help. The detective gave you the crime scene report, but you somehow lost it. You vaguely remember that the crime was a <strong>​murder​</strong> that occurred sometime on ​<strong>Jan.15, 2018​</strong> and that it took place in ​<strong>SQL City​</strong>. Start by retrieving the corresponding crime scene report from the police department’s database.</p><pre>/* to find the report of the crime, since we know the type of crime is &#39;murder&#39;, <br>it took place in &#39;SQL City&#39;, and happened on Jan.15, 2018 */ <br><br><br>Select * <br>from crime_scene_report<br>where type = &#39;murder&#39;<br>and city = &#39;SQL City&#39;<br>and date = &#39;20180115&#39;;<br>              </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*KegHrakfCjZkyT7q7XVTyA.png" /><figcaption>Report for the crime to be solved.</figcaption></figure><p>From the result above, I’ve been able to narrow down my search which gives detailed information about the crime. The next step is to use the description about the witnesses to proceed in solving the crime. The witnesses information can be found in the person table.</p><pre>-- to find the first witness who lives at the last house on &#39;Northwestern Dr <br><br><br>select * <br>from person <br>where address_street_name = &#39;Northwestern Dr&#39;<br>order by address_number Desc<br>limit 1     </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*lmmm5jumUJMep7RZIZk6Mw.png" /><figcaption>details of the first witness to the murder.</figcaption></figure><pre>/* to find the second witness whose name is &#39;Annabel&#39; and lives somewhere<br>   on &#39;Franklin Avenue&#39; */<br><br><br>select * <br>from person <br>where address_street_name = &#39;Franklin Ave&#39;<br>and name like &#39;Annabel%&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*lOTU_XKQ8PAY3tv8ZAIEZw.png" /><figcaption>details of the second witness to the murder.</figcaption></figure><p>The next step is to get the transcript / account of events given by both witnesses from the interview table, using the person_id.</p><pre>--to get transcripts of both witnesses during their interviews<br><br><br>select * <br>from interview<br>where person_id = 14887<br>or person_id = 16371;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*6qAYETEqGTbqAeB8RrzS2A.png" /><figcaption>transcript given by witnesses to the murder.</figcaption></figure><p>It is time to use more complex queries as it would be required to JOIN tables based on the transcript given by witnesses during their interviews. The first transcript will require us to join 3 tables namely; person, get_fit_now_member and drivers_license tables. I would be using the Inner Join syntax , also alias to make my query shorter and easy to understand.</p><pre>/* the get_fit_now_member table ha sbeen aliased as gfm, person table as p, <br>   and drivers_license table as dl to avoid unnecessary repitition */<br><br><br>select p.id, gfm.name, gfm.id,<br> gfm.membership_status, dl.plate_number<br>from person as p<br>  join get_fit_now_member as gfm<br>    on p.id = gfm.person_id<br>  join drivers_license as dl<br>    on p.license_id = dl.id<br>where gfm.membership_status = &#39;gold&#39;<br>and gfm.id like &#39;48Z%&#39;<br>and dl.plate_number like &#39;%H42W%&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*1m115WNA6SFxwIiOPXKaQg.png" /><figcaption>result for suspect based on first transcript.</figcaption></figure><p>The suspect we are looking for based on the transcript given by the first witness is ‘Jeremy Bowers’, but we will need to ascertain this by putting into consideration the transcript given by the second witness. The second witness claimed to have seen the murder happen, and remembered seeing the killer at the gym on Jan. 9th, 2018, hence, we would need to write a query to test if the suspect -‘Jeremy Bowers’ - was checked into the gym on the said date.</p><pre>/* to confirm if the suspect was checked into the gym on the 9th of january*/<br><br><br>select *<br>from get_fit_now_check_in<br>where membership_id = &#39;48Z55&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*y3Q5S050K_7dfbbsdl6hrA.png" /></figure><p>The result above -without an iota of doubt -proves that ‘Jeremy Bowers’ is indeed the murderer we’ve been looking for, the crime as been been solved. As a final confirmation, I’ll input my answer into the solutions table as instructed by the creator of this game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*HTeu0IP7V6O5Eu3Mm18DUQ.png" /><figcaption>murder solved!!!!!!</figcaption></figure><p>Oooooops!!! There’s more….. We’ve been tasked further to find the real villain behind this crime, with no more than 2 queries at that. Since we know the murderer’s person_id to be ‘67318’, we can easily query the interview table for his transcript. See query below;</p><pre>-- first query - to get jeremy Bower&#39;s interview transcript.<br><br><br>select *<br>from interview<br>where person_id = &#39;67318&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*laEJOoXaxBC0ADu6c0RV3g.png" /><figcaption>Jeremy’s interview transcript</figcaption></figure><p>For the second query, I will continue by using the information in the transcript above to narrow down who the real villain behind the crime is. We know the villain’s gender, hair color, height, car make and model — all of which can be found in the ‘drivers_license’ table. Another information about the villain is that she attended a particular concert, 3 times in December 2017 — this can be found in the ‘facebook_event_checkin’ table.</p><p>For this query, I will be making use of Common Table Expressions (CTEs), as well as JOINS in order to get the villain at a go.</p><p>My first CTE will join the ‘person’ table with the ‘drivers_license’ table in order streamline my search to details of persons who have the criteria as stated in the transcript above.</p><p>My second CTE will join the ‘person’ table with the ‘facebook_event_checkin’ table in order to get the details of persons who attended the ‘SQL Symphony Concert’ 3 times in December, 2017.</p><p>Then lastly, I will write a query to extract information from both CTEs where certain conditions are met. This is regarded as the main query / outer query. See query below;</p><pre>/* Second query - to streamline the search for the villain using CTEs<br>and joins to a few suspects, then, use an outer query to extract <br>details of the real villain. */<br><br><br>WITH Details_1 AS (<br>  SELECT<br>fb.person_id,<br>    p.name,fb.event_name,<br>  COUNT(fb.person_id) as num_of_times<br>  FROM person AS p<br>  JOIN facebook_event_checkin AS fb<br>ON p.id = fb.person_id<br>  WHERE fb.event_name = &#39;SQL Symphony Concert&#39;<br>  AND fb.date BETWEEN 20171201 AND 20171231<br>  GROUP BY fb.person_id<br>  HAVING COUNT(fb.person_id) = 3<br>  ),<br><br>Details_2 AS (<br>  SELECT<br>p.id, p.name, dl.height,<br>dl.hair_color, dl.gender,<br>dl.car_make, dl.car_model<br>  FROM person AS p<br>JOIN drivers_license AS dl<br>ON p.license_id = dl.id<br>WHERE car_make = &#39;Tesla&#39;<br>AND car_model = &#39;Model S&#39;<br>AND gender = &#39;female&#39;<br>AND hair_color = &#39;red&#39;<br>AND (height between 65 and 67)<br>  )<br><br>SELECT<br>  Details_1.person_id,<br>  Details_1.name,<br>  Details_2.hair_color,<br>  Details_2.height,<br>  Details_2.gender,<br>  Details_2.car_make,<br>  Details_2.car_model<br> FROM Details_1<br> JOIN Details_2<br> ON Details_1.person_id = Details_2.id<br> WHERE Details_1.person_id = Details_2.id;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*AjDHiWTyA2ofWsTFsxaSfw.png" /><figcaption>Yipee!!! details of the real villain.</figcaption></figure><p>From the result above, it is safe to conclude that the real villain we are searching for is no one other than ‘Miranda Priestly’, as she checks all the boxes stated in the ‘Jeremy Bowers’ transcript’. For further confirmation, i would insert her details into the solution table as done earlier with the murderer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*3-DjXbdhX0zhuD7Kem68DQ.png" /></figure><p>Yippeeeee!!!!!!!! Turns out we are right afterall…….</p><p>CASE SOLVED !!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71a354e10db6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Data Analytics Capstone Project -A case Study of Bellabeat Using Excel.]]></title>
            <link>https://medium.com/@bisolabankole74/google-data-analytics-capstone-project-a-case-study-of-bellabeat-using-excel-a9ba48cac865?source=rss-b200c19fb17d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9ba48cac865</guid>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[data-analytics]]></category>
            <dc:creator><![CDATA[Muheenat Bankole]]></dc:creator>
            <pubDate>Sun, 30 Oct 2022 21:01:56 GMT</pubDate>
            <atom:updated>2022-10-31T09:54:23.548Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Tfq1T-M31kcYjVtsaXhGyA.png" /></figure><h3>Introduction</h3><p>Urška Sršen and Sando Mur founded Bellabeat, a high-tech company that manufactures health-focused smart products. Sršen used her background as an artist to develop beautifully designed technology that informs and inspires women around the world. Collecting data on activity, sleep, stress, and reproductive health has allowed Bellabeat to empower women with knowledge about their own health and habits. Since it was founded in 2013, Bellabeat has grown rapidly and quickly positioned itself as a tech-driven wellness company for women. The five(5) products produced by Bellabeat are :</p><ul><li>Bellabeat app: The Bellabeat app provides users with health data related to their activity, sleep, stress, menstrual cycle, and mindfulness habits. This data can help users better understand their current habits and make healthy decisions. The Bellabeat app connects to their line of smart wellness products.</li><li>Leaf: Bellabeat’s classic wellness tracker can be worn as a bracelet, necklace, or clip. The Leaf tracker connects to the Bellabeat app to track activity, sleep, and stress.</li><li>Time: This wellness watch combines the timeless look of a classic timepiece with smart technology to track user activity, sleep, and stress. The Time watch connects to the Bellabeat app to provide you with insights into your daily wellness.</li><li>Spring: This is a water bottle that tracks daily water intake using smart technology to ensure that you are appropriately hydrated throughout the day. The Spring bottle connects to the Bellabeat app to track your hydration levels.</li><li>Bellabeat membership: Bellabeat also offers a subscription-based membership program for users. Membership gives users 24/7 access to fully personalized guidance on nutrition, activity, sleep, health and beauty, and mindfulness based on their lifestyle and goals.</li></ul><p>This dataset has been originally generated by respondents to a distributed survey via Amazon Mechanical Turk and contains personal fitnesss tracker of thirty(30) eligible fitbit users. The dataset used for the purpose of this analysis is available on Kaggle (<a href="https://www.kaggle.com/datasets/arashnic/fitbit">FitBit Fitness Tracker Data | Kaggle</a>) .</p><p>I will be working in the capacity of a junior data analyst to identify key business tasks following the six(6) data analysis procedures namely : <strong>Ask, Prepare, Process, Analyze, Share, Act.</strong></p><h3>Ask Phase</h3><p>The key business task of this analysis is to analyze smart device usage data in order to gain insight into how consumers use the non-Bellabeat smart devices which would subsequently, help influence Bellabeat marketing strategy. The key stakeholders for this project are as identified below;</p><ol><li>Urška Sršen: Bellabeat’s cofounder and Chief Creative Officer.</li><li>Sando Mur: Mathematician and Bellabeat’s cofounder; key member of the Bellabeat executive team.</li><li>Bellabeat marketing analytics team: A team of data analysts responsible for collecting, analyzing, and reporting data that helps guide Bellabeat’s marketing strategy.</li></ol><h3>Prepare Phase</h3><p>The prepare step generally provides adequate information on data source.</p><ol><li>The dataset used for this analysis is publicly available on Kaggle -<a href="https://www.kaggle.com/datasets/arashnic/fitbit">FitBit Fitness Tracker Data | Kaggle</a> , and is stored in eighteen(18) csv. files which consists of daily activities such as; steps, calories, heartrate, sleep, etc.</li><li>The data, which contains personal tracker was submitted and consented to by 30 eligible fitbit users.</li><li>Most of the csv. files are stored in long format while some are stored in narrow format.</li><li>To test the integrity of the data; the dataset is expected to be ROCCC which stands for <strong>Reliable, Original, Comprehensive, Current , Cited respectively.</strong></li></ol><ul><li><strong><em>Reliable</em>- </strong>the reliability of the dataset can be contested as there are some limitations. For instance, the sample size,(personal tracker details of only 30 users was provided) which may lead to sampling bias. Similarly, the gender of the 30 users is completely unknown and it is a fact that Bellabeat as a wellness company is majorly focused on the wellness and fitness of women.</li><li><strong><em>Original</em></strong>- the dataset cannot be said to be original as it was provided by a third party(Amazon Mechanical Turk)</li><li><strong><em>Comprehensive</em></strong>- the dataset can be said to be comprehensive enough as the whole of the 18 csv files contains adequate information about the users’ activity ranging from heartrate, sleeptime, intensities, calories burnt, weight etc.</li><li><strong><em>Current</em></strong>- For a dataset that was collected and last updated since 2016, and is being used for an analysis in 2022, the dataset cannot be said to be current.</li><li><strong><em>Cited</em></strong>- the dataset has been properly cited as a third party data and is available in the public domain.</li></ul><p>5. The dailyActivity_merged , weightLoginfo_merged and sleepDay_merged csv files have been selected to carry out this analysis as the former contains all tracker details of users on a daily basis. All 3 files were migrated into one workbook but different sheets and saved as an excel workbook.</p><h3>Process Phase</h3><p>The process of data cleaning, transformation and visualization will be carried out in excel.</p><p><strong>Data Cleaning and Transformation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDT-VRCcp1fXTZcT-0gQvg.png" /><figcaption>An overview of the daily_activity_merged dataset</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n8cwKUOlqaHTZ4pBTnxJ8A.png" /><figcaption>An overview of the weight_loginfo dataset</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*LfqzfaxE6swDu6XXK0ZAtA.png" /><figcaption>An overview of the SleepDay_merged dataset</figcaption></figure><p>I converted the workbooks from csv files into Excel workbooks in order not to lose part data while working in csv file.</p><p>The date column of the Weight_Loginfo comprises of both date and time, so I used the power query to split column by the space delimiter, used the Text to columns function under the data tab to format the date into “ddmmyyyy” format and created named ranges for the column headers. I then used the TEXT function to extract the Days and Month in the date -</p><p>=TEXT([<a href="http://twitter.com/Date">@Date</a>],”dddd”), =TEXT([<a href="http://twitter.com/Date">@Date</a>],”mmmm”).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*93jSLYvbEDfKTFFoo3C31w.png" /><figcaption>An overview of the WeightLogInfo after transformation</figcaption></figure><p>All these being done, I now have my dataset in one worksheet where I continued my data transformation by ;</p><ul><li>converting the dataset into tables</li><li>creating named ranges with the top row (column headers)</li><li>using the formula <strong>=SUMPRODUCT(1/COUNTIF(Bellabeat[Id],Bellabeat[Id]))</strong> to ascertain how many users are contained in the dataset. Here, we found out that there are 33 unique IDs as opposed to the 30 users expected.</li><li>with this formula <strong>=SUMPRODUCT(1/COUNTIF(WeightLoginfo_2[Id],WeightLoginfo_2[Id]))</strong> I was able to know that only 8 users logged their weight details, which means we will be working with weightinfo for 8 people as against the 33 unique users.</li><li>using formula <strong>=SUM([@VeryActiveMinutes]+[@FairlyActiveMinutes]+[@LightlyActiveMinutes]+[@SedentaryMinutes]) to create a new column named Total_minutes</strong></li><li>formatting the date columns into dd-mm-yyyy format using the date option in Text to columns too , then used the function <strong>=TEXT([</strong><a href="http://twitter.com/ActivityDate2"><strong>@ActivityDate2</strong></a><strong>],”dddd”) </strong>to extract the day from the date, and lastly,</li><li>formatting the numbered columns into two(2) decimal places. Below is a view of all columns in the dataset after cleaning and transformation;</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IT4yXkP8iZWxQrcsLQ1Epw.png" /><figcaption>The dataset after cleaning and transformation 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*EqqRY1RzxgIDKrOLfA8rDw.png" /><figcaption>The dataset after cleaning and transformation 2</figcaption></figure><p>I split the sleepDay(date) column by the space delimiter in order to get just the date as the column contained date, as well as time. I then proceeded to use the Text to column function to to change the date into “dd-mm-yyy” format also extracted the days using the formula- <strong>=TEXT([</strong><a href="http://twitter.com/SleepDay"><strong>@SleepDay</strong></a><strong>],”dddd”). </strong>See an overview of the sleepDay data below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*xEpHlf0DVmui9humfksZLA.png" /><figcaption>An overview of the sleepDay dataset</figcaption></figure><p>It is also important to note that only 24 users have their daily sleep records logged and this was determined using the formula-<strong> =SUMPRODUCT(1/COUNTIF(Sleep_Day_2[Id],Sleep_Day_2[Id])).</strong></p><p>Now, I have my dataset in 18 columns and 941 rows(including headers) for my dailyActivity dataset, with 6 columns and 414 rows(including headers) for the sleepDay dataset and the WeightLoginfo consists of 10 columns and 68 rows(including headers). This marks the completion of my data cleaning and transformation process. It is time to start my analysis to derive certain insights which leads us to the analyze phase.</p><h3>Analyze Phase</h3><p>As mentioned earlier, all analysis process(using pivot tables), as well as visualization will be carried out in Excel.</p><p>The dailyActivity table has logged info for a total of 33 users, the weightLoginfo has a total number of 8 users, while the sleepday table has a total number of 24 users.</p><p>I created a pivot table to illustrate the average total steps of users across all days of the week, and visualized using a stacked column chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*qXMA_kXTQrE30KkFsGCBEw.png" /><figcaption>Pivot table for average total steps by ID and Day.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bIgpKKapH-VQcj8GzF_n6w.png" /></figure><p>Similarly, it can be deduced from the bar chart below that users take more steps Saturdays and Tuesday with least steps on Sundays and Thursdays.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*QWb1tSM0hUl7zCMVYcH7DA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Em3HmbW0aCQkhxTE-P5tsw.png" /></figure><p>I used the convert function to convert the TotalMinutesAsleep and TotalTimeInBed into hours;</p><p>=CONVERT([<a href="http://twitter.com/TotalMinutesAsleep">@TotalMinutesAsleep</a>],”mn”,”hr”)</p><p>=CONVERT([<a href="http://twitter.com/TotalTimeInBed">@TotalTimeInBed</a>],”mn”,”hr”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*qUIEpucp2rsAsIxWGJOtag.png" /></figure><p>We can see from the above diagram that the user spend an average of 7 hours or 419minutes on sleep and an average of 8hours or 456 minutes in bed. It also shows that users get more sleeptime on Sundays. Users get more sleep on Sundays.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*i1qFWjchym6ke_bIKdH7EQ.png" /></figure><p>Comparing the average total steps chart illustrated above with this average calories burnt chart, it can be established that the daily steps have a positive correlation with the calories burnt, that is, the higher the steps taken, the higher the calories burnt. More calories are burnt on Saturdays and Tuesdays while least calories are burned on Sundays and Thursdays.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*EYbJXJr7OZhpDdUALa0XEA.png" /></figure><p>Above is a pie chart which shows the percentage of time users spent in various activity category. Users spend 81% of their time Sedentarily. This can also be seen in the column chart below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Olproasd6iKltoKAQvnGyw.png" /></figure><p>This brings us to the end of the analysis phase. Its is time to move on to the share phase where we pitch/share our insights and visuals (in an organized format) from the analysis carried out to the stakeholders.</p><h3>Share Phase</h3><p>The share phase as stated above is all about sharing our findings to the primary / secondary stakeholders of the business. I have been able to deduce the following from the analysis I carried out;</p><h4>Insights</h4><ul><li>A total of 33 users provided their daily steps and calories over a period of 31 days each. About 88% of users were able to track their daily steps/calories burned for 25days and more while the remaining 12% did less than 25 days.</li><li>8 users provided their their daily weight report, out of which only 2 users were able to track their daily weight for 24–31 days while the remaining 6 users tracked for 5 days or less.</li><li>24 users provided their daily sleep minutes and minutes in bed, out of which 42% was able to track their sleep data for 25–31 days while 58% only tracked their sleep for less than 25days.</li><li>The number of steps taken per day has a positive correlation with calories burned.</li><li>Users take an average of 7,368 steps in a day while burning a total of 2,303 calories on the average.</li><li>Users spend about 81% of their time in sedentary.</li><li>Users tend to spend and average of 419 mins-which is approximately 7hours- on sleep, while they spend about 458 minutes-which is approximately 8hours in bed, while spending more time in bed and getting more sleep on Sundays.</li><li>Users tend to take more steps on Saturdays and Tuesdays with least steps on Sundays and Thursdays.</li></ul><p>Below is the visualization dashboard I created for this analysis;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*crzTcHJtbYfJOQDszsqOHA.png" /><figcaption>Analysis for Bellabeat using Fitbit Fitness Tracker Data.</figcaption></figure><h3>Act Phase</h3><p>Bellabeat wellness company is a health technology company that focuses on providing high-tech wellness/fitness product for women, but as a limitation, there was no demographic to connote that the data provided was collected from women which may result in sampling bias. It is recommended that the company focuses on primary data sources for future analysis other than collecting third party data.</p><p>Other Recommendations to the stakeholders are;</p><ul><li>Utmost priority should be given to products that allow users track their daily activity such as steps and calories burned as users are more interested this, which will in turn increase revenue.</li><li>Launch a campaign to create awareness to more women about the importance of health monitoring, tracking and keeping fit.</li><li>Provide incentives (e.g membership upgrade, bonus points, rewards/awards) to users who do not renege on the daily monitoring/tracking of activities which will encourage more sedentary/inactive users to put in the work.</li><li>Occasionally rollout health tips/articles which keeps users educated on how to do better.</li><li>Infuse high-tech features into all products which sends a notification to the user after a considerable amount of time of inactivity.</li><li>Lastly, ensure that that products are 99.9% effective (in terms of battery hours, flexibility, user experience) in order to avoid lapses in capturing of user’s activity, because about 61% of manual reporting was done by users who kept track of their daily weight.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9ba48cac865" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Analysis of a Kaggle Movies Dataset using PowerBI]]></title>
            <link>https://medium.com/@bisolabankole74/an-analysis-of-a-kagle-movie-dataset-using-powerbi-4cdb58424189?source=rss-b200c19fb17d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cdb58424189</guid>
            <dc:creator><![CDATA[Muheenat Bankole]]></dc:creator>
            <pubDate>Wed, 17 Aug 2022 01:30:39 GMT</pubDate>
            <atom:updated>2022-08-20T23:04:43.555Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*kg4XYpeuy4Ua9ntRRVl9zQ.jpeg" /></figure><p><strong>DATA COLLECTION</strong></p><p>An analysis of a movies dataset gotten from Kaggle <a href="https://www.kaggle.com/datasets">https://www.kaggle.com/datasets</a> . The dataset originally consists of <strong><em>13 columns</em></strong> and <strong><em>508 rows.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e2T4VpouQ2c0KNysu0Fmxg.png" /><figcaption>A preview of all columns.</figcaption></figure><p><strong>DATA CLEANING</strong></p><p>The process of cleaning the the data was carried out in powerBI as the dataset is not a large one. The cleaning process involved reducing the number of columns to 7- movie title, release date, genre, director, budget and revenue. An additional column was added to show the total profit. This brings the dataset to a total of <strong><em>8 columns</em></strong> and <strong><em>508 rows</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ir1QHJn-I5ZzFG9SRgRQbw.png" /><figcaption>An overview of the cleaned dataset in PowerBI</figcaption></figure><p>INSIGHTS</p><ol><li>The total movies budget over the years amounted to $25bn, which generated a total revenue of $77bn, thereby resulting into a total profit of $52bn.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*WUDpAniELSc6crS4XAdF0A.png" /><figcaption>Total budget, revenue and profit</figcaption></figure><p>2. With reference to the viz below, it can be deduced that year 2014 had the highest budget of $5.8bn and also generated the highest revenue of $20bn which makes up about 27% of the total profit. Year 2012 comes a close second with a total budget of $5.5bn and generated a revenue of $18bn which makes up about 25% of the total profit. Year 2016 happened the least budgeted year with a total budget $4.1bn and turned out to be the year which generated the least revenue of $12bn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*VXaqk248nveVATCyE8uNJg.png" /><figcaption>Total budget, revenue and profit by year</figcaption></figure><p>3.The top 5 genres by profit over the years are ‘Action, Comedy, Sci-Fi, Drama and Adventure’ with a total profit of ‘ $18.1bn, $8.1bn, $5.3bn, $4.8bn and $4.7bn’ respectively.</p><p>Similarly, the bottom 5 genres by profit over the years are ‘Documentary, Religious, Musical, Mystery and Romance’ with a total profit of ‘$58.5m, $187.4m, $359m, $370.9m and $441.6m’ respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*NfwC_B2-mJpe_Vy0kPuAxw.png" /><figcaption>Total profit by genre</figcaption></figure><p><strong>CONCLUSONS</strong></p><p>In conclusion, we have seen that the years and genre where/which total budget was highest also had the highest revenue generated, resulting into profit maximization. It is therefore safe to say there is a strong correlation between budget and revenue generated. Below is the full dashboard for the movies dataset analysis, as well as an embedded link to interact with the live dashboard on the powerBi service.</p><p><a href="https://app.powerbi.com/view?r=eyJrIjoiNDdjNDcwNzUtNWQ3ZC00YjZhLWI4MmItMzg5ZTY0ODY3YzY5IiwidCI6ImNkNjY4M2E2LWFhODUtNDZjZi1hZWVhLTkyZDRhMTQ3NzAwOSIsImMiOjh9">https://app.powerbi.com/view?r=eyJrIjoiNDdjNDcwNzUtNWQ3ZC00YjZhLWI4MmItMzg5ZTY0ODY3YzY5IiwidCI6ImNkNjY4M2E2LWFhODUtNDZjZi1hZWVhLTkyZDRhMTQ3NzAwOSIsImMiOjh9</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*3NAq9vvDYGSa6TnXtnHScg.png" /><figcaption>The full dashboard</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cdb58424189" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>