<?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 Neil Angelo Martinez on Medium]]></title>
        <description><![CDATA[Stories by Neil Angelo Martinez on Medium]]></description>
        <link>https://medium.com/@neilangelomartinez?source=rss-336886035ef1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Zd9G9_uxjcCFoRi7</url>
            <title>Stories by Neil Angelo Martinez on Medium</title>
            <link>https://medium.com/@neilangelomartinez?source=rss-336886035ef1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:40:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@neilangelomartinez/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[The Power of Persistence: My Road to Becoming a Data Analyst]]></title>
            <link>https://medium.com/@neilangelomartinez/the-power-of-persistence-my-road-to-becoming-a-data-analyst-d7a2754f0961?source=rss-336886035ef1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7a2754f0961</guid>
            <category><![CDATA[blog]]></category>
            <category><![CDATA[journey]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Neil Angelo Martinez]]></dc:creator>
            <pubDate>Thu, 06 Apr 2023 07:33:48 GMT</pubDate>
            <atom:updated>2023-04-11T23:56:56.538Z</atom:updated>
            <content:encoded><![CDATA[<h4>From Engineer to Data Analyst</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*eijycBB2UfG5SLBCG4bYig.png" /><figcaption>Check out my <a href="http://bit.ly/neilmartinez">website</a></figcaption></figure><p>Think of embarking on a new journey to a better future. You’re thrilled with anticipation but yet a little uneasy. That’s exactly how I felt when I made the decision to sign up for the Refocus boot camp in October 2022. I jumped right into the programs and fast-tracked them since I realized it was time to refocus my career path and acquire new skills.</p><p>I became proficient in Excel, SQL, and Power BI within the first two months, three important tools in the field of data analytics. But for me, that wasn’t enough. I enrolled in the Coursera Google Data Analytics certification program because I wanted to advance my education. There, I picked up knowledge in R programming in addition to Excel and SQL. Although it was challenging, I persisted and completed the course in November 2022.</p><p>Soon after that, Refocus gave us our first project assignment. For data transformation, SQL was used, while Excel was used to display graphs and charts. I created my online portfolio after finishing the group project. To create a visually appealing website, I even did a little bit of web development studying.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6LrPwFoLc6cddUDqs9ZsPw.png" /><figcaption><a href="https://drive.google.com/file/d/1rDEOpb3HTpzX3xy_GAeYEDZX4K-T8Zkf/view">View Certificate</a></figcaption></figure><p>I began completing online internships through Forage.com and making projects that were inspired by data analysts on YouTube because I was determined to obtain more actual knowledge. By January 2023, Refocus has provided an online certificate for their core program which included Excel, SQL, and Power BI. Refocus also offered career assistance, which included sending my resume to numerous affiliate companies. All these experiences helped me to become a more confident and skilled data analyst.</p><p>Despite the setbacks and challenges, I refused to give up. I kept applying for data analyst roles, and I was determined to land my dream job. I knew that my lack of experience might make it harder for me, but I was confident that my skills and hard work would speak for themselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*RfUnoekek_wg0ZMn.png" /><figcaption>Check out these sample SQL interview <a href="https://www.edureka.co/blog/interview-questions/sql-interview-questions">questions</a>.</figcaption></figure><p>I still recall the first technical interview I had with Home Credit. The interviewer presented me with a SQL code for the exam and asked me to check it for errors. Unfortunately, I failed the technical interview. Although it was discouraging, I didn’t let it stop me. Instead, I saw it as a chance to grow and learn.</p><p>The next memorable application was with MDI Novare. I had to go through three interviews: one initial, one with the data analysts, and one with the manager. I passed the final interview and was optimistic about getting the job. But when I didn’t hear back for a week, I realized something was wrong. I was eventually notified that another candidate with more experience had been chosen over me. I was so close, which was frustrating, but I managed not to let it affect me. I knew I had to keep moving forward.</p><p>My third memorable application was with a startup AI company. Someone from LinkedIn messaged me, and I decided to give it a shot. The position was for a Data Scientist, and I wasn’t sure if I was ready for it. I reached the CEO interview, but his questions were very technical, all about Python and machine learning and I struggled to give specific answers. It was tough, but it was also a learning experience.</p><p>Collabera was my fourth memorable application. The HR department was really welcoming, and I was thrilled to have made it to the manager interview. Yet I made a mistake that I believe cost me the job: I arrived late for the interview. The interview was in BGC, and I had to travel from Cavite, so I arrived a little later than expected. It was a difficult lesson to learn, but I knew I couldn’t let it get me down.</p><p>On Indeed.com, I discovered a position at Business Tree PH in my search for a data analyst job. Since their office was only 30 to 45 minutes away from my home in Dasmarinas, I chose to take a chance even though the job posting stated that 3–5 years of experience was required. My HR contact, Ms. Maricel, was incredibly helpful and supportive of me during the application process. The company conducted four interviews in all, the last of which was with the CEO. March 28, 2023, I was happy to be invited to their office for a job offer discussion after passing the CEO interview.</p><p>After over 300 job applications, more than 10 initial interviews, 5 technical interviews, and 3 final interviews, I finally have a data analyst job! I started working for the company on April 3 and have quickly begun to enjoy my job. I am grateful for this opportunity and hope that my story will inspire other aspiring data analysts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*CCFlzWmkcYSgFf8nH6Ducg.png" /></figure><p>Looking back on my journey, I realized that setbacks and rejections are just part of the process. They can be tough to deal with, but they also make you stronger and more resilient. If there’s one piece of advice I can offer to anyone who’s going through a similar journey, it’s this — keep pushing forward. Don’t let setbacks get you down. Keep honing your skills, keep building your portfolio, and keep applying for jobs. Eventually, your hard work will pay off, and you’ll land your dream job.</p><p>Visit my website: <a href="https://bit.ly/neilmartinez">https://bit.ly/neilmartinez</a></p><p>BI Portfolio: <a href="https://bit.ly/neilmartinez-novypro">https://bit.ly/neilmartinez-novypro</a></p><p>Check out my other blogs: <a href="https://bit.ly/neilmartinez-medium">https://bit.ly/neilmartinez-medium</a></p><p>LinkedIn: <a href="https://bit.ly/neilmartinez-linkedin">https://bit.ly/neilmartinez-linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7a2754f0961" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Power BI Dashboard for Clockster]]></title>
            <link>https://medium.com/@neilangelomartinez/clockster-dashboard-86f53c291f3c?source=rss-336886035ef1------2</link>
            <guid isPermaLink="false">https://medium.com/p/86f53c291f3c</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Neil Angelo Martinez]]></dc:creator>
            <pubDate>Tue, 21 Feb 2023 03:29:03 GMT</pubDate>
            <atom:updated>2023-05-04T13:41:18.788Z</atom:updated>
            <content:encoded><![CDATA[<p>Group Project Assignment 2 at Refocus Digital Academy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NJ5Ll5luUF73ZfnvpAc4sg.png" /><figcaption>The project is an actual task assigned by the company, which provides insight into the work of a real data analyst. Upon completion of the project, the group will receive feedback and be able to add the project to their portfolio, thereby gaining a significant advantage when pursuing a data analytics job.</figcaption></figure><p><em>Interact with the dashboard here:</em> <a href="https://www.novypro.com/project/clockster-dashboard-b3g6">https://www.novypro.com/project/clockster-dashboard-b3g6</a></p><h3>Overview</h3><p>You are working as a data analyst team for the HR department in a medical company. The <a href="https://drive.google.com/file/d/1AXekCqXF4cFlyOm_IEzrNvNgOKW1Qj0a/view">data provided by the HR department</a> includes 10–15 parameters per day per year (arrival/departure time, vacations, sick days, time off, etc.) on 1000+ employees of the company. Your task is to answer the following questions, which the CEO formulated:</p><h3>Business Objectives</h3><ol><li>Identify the most disciplined and undisciplined employees in divisions;</li><li>Create a visualization with the analysis of weekdays and months when<br>most employees were late/absent (either for vacation or sick leave);</li><li>Answer the following questions. Which heads of departments tend to forgive employees for lack of discipline? Are there any favorites for any heads of departments(perhaps some employees are always forgiven for being late, given time off, etc.)?</li></ol><h3>Objectives</h3><p>1. Use SQL or Excel to clean the data.</p><p>2. Find metrics for data manipulation and analysis to answer each business objective.</p><p>3. Create a dashboard using Power BI.</p><p>4. Recommend improvements based on the insights generated.</p><h3>Business Objective 1:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_ED7OCzZK6v0xyRPVggvg.png" /></figure><p>The data shows a significant discrepancy between the number of employees clocking in on time versus those clocking in late, indicating that all employees may not take punctuality seriously. The Support Centre division has the most punctual employees, with 463 late records and 3563 on-time records. Conversely, the Medical Department has the most tardiness, with user_id 74049 having the highest number of tardiness at 542 occurrences. It’s also worth noting that female employees and those using mobile devices are the most prevalent when it comes to clocking-in and out.</p><h3>Business Objective 2:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IJokY7fkiThkBfmMPOs1Rg.png" /></figure><p>We analyzed the data of each division by looking at the monthly trend of leave types. The Medical division showed a spike in leaves during June, with most of them being filed as sick leave, followed by compensatory leave. The PBF division had an upward trend from June to September, with sick leave being the most common leave type, followed by unpaid leave. The Pharmacy division had a prevalent case of compensatory leave during September and showed an even spread throughout the months. The most punctual division saw a spike in June, with compensatory and day-off leaves being the most frequently applied leave types.</p><h3>Business Objective 3:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9IkM3rfufJYmT_yuWopWVA.png" /></figure><p>The data indicates that there could be favoritism present in the workplace. As shown with User_id 74049 with 18 approved leave requests, 1 more pending, and no rejected applications. In contrast, user_id 88357, a warehouse staff, appears to have more rejections than anyone else.</p><h3>Conclusion</h3><p>The analysis revealed specific trends and patterns in terms of attendance, punctuality, and leave requests among employees. The insights and recommendations provided in this project can be used by the organization to improve employee discipline and increase productivity. Additionally, by implementing a system to track and monitor leave requests, overtime or extra work hours, and tardiness among employees, the organization can identify and address specific issues related to employees taking excessive leaves or having high rates of tardiness. The analysis of the data will enable the organization to develop strategies to improve the performance and productivity of its employees.</p><h3>Recommendations:</h3><ul><li>Implement stricter policies and consequences for tardiness and early leaving.</li><li>Provide regular training and education on the importance of punctuality and attendance.</li><li>Conduct regular performance evaluations for employees, with a focus on attendance and punctuality.</li><li>Consider implementing a system for employees to request time off in advance to minimize last-minute absences.</li><li>Consider conducting investigations to identify the root cause of high numbers of tardiness, early leaving, and leave requests among specific employees or departments.</li><li>Implement a system of rewards for employees who consistently demonstrate good punctuality and attendance.</li><li>Implement a system to track and monitor leave requests, overtime or extra work hours, and tardiness among employees.</li><li>Consider implementing policies to encourage employees to take their leaves at different periods of the year to avoid peak leave request times.</li><li>Implement a system to monitor the leaves and tardiness of doctors and nurses, as they are vital for a hospital or a health center.</li></ul><p>Visit my website: <a href="https://bit.ly/neilmartinez">https://bit.ly/neilmartinez</a><br>BI Portfolio: <a href="https://bit.ly/neilmartinez-novypro">https://bit.ly/neilmartinez-novypro</a><br>Check out my other blogs: <a href="https://bit.ly/neilmartinez-medium">https://bit.ly/neilmartinez-medium</a><br>LinkedIn: <a href="https://bit.ly/neilmartinez-linkedin">https://bit.ly/neilmartinez-linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86f53c291f3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cyclistic Bike Sharing Analysis using SQL]]></title>
            <link>https://medium.com/@neilangelomartinez/cyclistic-bike-sharing-analysis-using-sql-1fb2e85864ce?source=rss-336886035ef1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fb2e85864ce</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Neil Angelo Martinez]]></dc:creator>
            <pubDate>Tue, 03 Jan 2023 19:47:28 GMT</pubDate>
            <atom:updated>2023-01-03T19:49:56.569Z</atom:updated>
            <content:encoded><![CDATA[<h4>Google Data Analytics Capstone Project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rj9gMUgyW6WjrC9dteN7fg.png" /><figcaption>Image by author</figcaption></figure><p><strong>Introduction</strong></p><p>This is my first case study as a Data Analyst, and it serves as the capstone project for the Google Data Analytics course. I will be analyzing a fictional company called Cyclistic: a bike sharing program based in Chicago, and the marketing director wants to maximize the number of annual memberships, and we are tasked with determining the behavior of casual riders and members and must present insights supported by professional data visualizations.</p><p>Throughout the Gogle Data Analytics program, we follow five phases of data analysis: ask, prepare, process, analyze and share. These will help you work step by step thoughout the analysis.</p><p><strong>ASK</strong></p><p>The task is to analyze the behavior of casual riders and members for the team to think of a marketing strategy to promote annual membership to casual riders.</p><p><strong>How do annual members and casual riders use Cyclistic bikes differently?</strong></p><p><strong>PREPARE</strong></p><p>I will use Cyclistic’s trip data for the past 12 months (November 2021 to October 2022) to analyze and identify trends. Datasets are available in this <a href="https://divvy-tripdata.s3.amazonaws.com/index.html">link</a>.</p><p>ROCCC Analysis</p><p>Reliable — The data has been made available by Motivate International Inc. under this <a href="https://ride.divvybikes.com/data-license-agreement">license</a>.</p><p>Original — Lyft Bikes and Scooters, LLC, operates the City of Chicago’s, subject to the terms and conditions of the Data License Agreement.</p><p>Comprehensive — The data is organized in .cvs files by trip month.</p><p>Current — This data is being updated monthly.</p><p>Cited — It is a public data and the datasets are available in this <a href="https://divvy-tripdata.s3.amazonaws.com/index.html">link</a>.</p><p>A lot of students who finished the same case study used Rstudio. Just to be unique with the others, I used pgAdmin4 — leading Open Source management tool for PostgresSQL, the world’s most advanced Open Source database.</p><p>To import the CSV files in pgAdmin4, first you need to create tables and then import the twelve CSV files one by one. Here’s the code in creating tables, 12 of these should be written, you just need to change the table name after the CREATE TABLE function. As I have checked, all files have the same column name, therefore we can proceed in creating tables and merging them later on.</p><pre>CREATE TABLE nov21 (<br>ride_id varchar,<br>rideable_type varchar,<br>started_at timestamp,<br>ended_at timestamp,<br>start_station_name varchar,<br>start_station_id varchar,<br>end_station_name varchar,<br>end_station_id varchar,<br>start_lat numeric,<br>start_lng numeric,<br>end_lat numeric,<br>end_lng numeric,<br>member_casual varchar<br>);</pre><p>After executing the code, just right click the <em>Tables</em> on the side panel and hit Refresh. All the created tables should appear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*yWAu71E7zkTLdD7Sl_twDw.png" /></figure><p>To import the downloaded CSV files, right click on a table and then click <em>Import/Export Data</em>. Click on the folder icon and locate the CSV file that you want to import. The format should be CSV and the encoding is UTF-8.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*vgOBySYdLZChqWl0DDBHAQ.png" /></figure><p>After importing all the files, we need to merge all tables into one dataset. We can do that by using UNION. The UNION operator is used to combine the result-set of two or more SELECT statements.</p><pre>CREATE TABLE cyclistic_data<br>AS<br>SELECT ride_id<br>,rideable_type<br>,started_at<br>,ended_at<br>,start_station_name<br>,start_station_id<br>,end_station_name<br>,end_station_id<br>,start_lat<br>,start_lng<br>,end_lat<br>,end_lng<br>,member_casual<br>FROM nov21<br>UNION<br>SELECT … (and so on)</pre><p>Running the code may take some time because we are combining twelve CSV files with thousands of rows; the speed is also dependent on your CPU. In my case, the query took 1 minute and 7 seconds to complete with a total of 5,755,694 rows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*EqAqXyp9SnHVtVEnkVV2mg.png" /></figure><p><strong>CLEAN DATA</strong></p><p>I have observed in the dataset that there are negative values for the trip duration and 0 values. Also, some trips have same locations for the station and coordinates (latitude and longitude). I came up with the condition:</p><p>WHERE (start_lat != end_lat AND start_lng != end_lng)</p><p>AND start_station_name!=end_station_name</p><p>AND (ended_at — started_at)&gt;’00:00:00&#39;</p><p>The first line explains that the starting latitude and ending latitude should not be the same, as should the longitudes. The second line explains that the initial station and the final station should not be the same. The final line indicates that the trip duration should be greater than 0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*WXg7DMRQ-YN3dPKiGesJ_g.png" /></figure><p>After the execution of the given statements, we are now left with 4,108,935 valid trips. This may be further corrected by the client if ever some conditions have been overlooked.</p><p><strong>ANALYZE</strong></p><p>Cyclistic is offering three kinds of bikes: classic, docked and electric bikes. First, I want to know which bike is mostly used by people.</p><pre>SELECT rideable_type, COUNT(*) AS number_of_riders<br>FROM cyclistic_cleaned<br>GROUP BY rideable_type<br>ORDER BY COUNT(*) DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*yrc-TO4_eeLbJq8D1zD3QQ.png" /></figure><p>There are <strong>2,473,729</strong> people using the classic bike, while <strong>147,435</strong> are using the docked bike and <strong>1,487,771</strong> are using the electric bike.</p><p>Next, let’s determine how many are casual riders and how many members does Cyclistic have.</p><pre>SELECT member_casual, COUNT(*) AS total<br>FROM cyclistic_cleaned<br>GROUP BY member_casual<br>ORDER BY COUNT(*) DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*kB56bPnOFBlQm5yUMJ28xA.png" /></figure><p>Total members are <strong>2,521,356</strong> while casual riders are <strong>1,587,579</strong>.</p><p>Let’s determine how many casual riders and members use different types of bikes.</p><pre>SELECT rideable_type<br>, COUNT(rideable_type) AS number_of_rides<br>, member_casual<br>FROM cyclistic_cleaned<br>GROUP BY rideable_type, member_casual</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*npEEYhBlnyZdT94884gduw.png" /></figure><p>Let’s get the average trip duration of members and casual riders.</p><pre>SELECT member_casual<br>, AVG(trip_duration)::time(0) AS average_trip<br>FROM cyclistic_cleaned<br>GROUP BY member_casual</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*zCC2bSdSBq637PkYlXooTA.png" /></figure><p>Average trip duration of casual riders is <strong>23 minutes 5 seconds</strong> while the average trip duration of members is <strong>12 minutes 25 seconds</strong>.</p><p>Let’s also get the overall average trip duration.</p><pre>SELECT AVG(trip_duration)::time(0) AS average_trip<br>FROM cyclistic_cleaned</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*V7ZS-n_bPTT65ni8gbmqhQ.png" /></figure><p>The average trip of all users is <strong>16 minutes 33 seconds</strong>.</p><p>Let’s get the average trip durations per month</p><pre>SELECT CONCAT(start_month, &#39; &#39;,start_year) AS month_year<br>,AVG(trip_duration)::time(0) AS average_per_month<br>FROM cyclistic_cleaned<br>GROUP BY month_year<br>ORDER BY average_per_month DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*cx5JzIEaiTvMELwKxSuTxg.png" /></figure><p>I also want to know the average trip duration per month with types of riders.</p><pre>SELECT CONCAT(start_month, &#39; &#39;,start_year) AS month_year<br>,AVG(trip_duration)::time(0) AS average_per_month<br>, member_casual<br>FROM cyclistic_cleaned<br>GROUP BY month_year, member_casual<br>ORDER BY average_per_month DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*HyMVV0DZ6gMPoX8u5QOnaA.png" /></figure><p>Let’s get the total number of rides per month.</p><pre>SELECT CONCAT(start_month, &#39; &#39;,start_year) AS month_year<br>,COUNT(trip_duration) AS count_per_month<br>FROM cyclistic_cleaned<br>GROUP BY month_year<br>ORDER BY COUNT(trip_duration) DESC<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*ZL6fPbmgA0Utj7N5oG8x9Q.png" /></figure><p>Let&#39;s get the total number of rides per month with types of riders.</p><pre>SELECT CONCAT(start_month, &#39; &#39;,start_year) AS month_year<br>,COUNT(*) AS count_per_month<br>, member_casual<br>FROM cyclistic_cleaned<br>GROUP BY month_year, member_casual<br>ORDER BY count_per_month DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*xbqRmNzNNJRcSbUfrhPBZA.png" /></figure><p>Let’s get the average trip duration per day</p><pre>SELECT start_day2 AS day_of_month<br>,AVG(trip_duration)::time(0) AS average_trip<br>FROM cyclistic_cleaned<br>GROUP BY start_day2<br>ORDER BY AVG(trip_duration) DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*WzcOVLdSc5ix5j_2SZVeoA.png" /></figure><p>Let&#39;s get the total number of rides per day</p><pre>SELECT start_day2 AS day_of_month<br>,COUNT(trip_duration) AS total_trip<br>FROM cyclistic_cleaned<br>GROUP BY start_day2<br>ORDER BY COUNT(trip_duration) DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*hLQM-Wfb2b0PWBIVN9zPtQ.png" /></figure><p>Total trip per day of members.</p><pre>SELECT start_day2 AS day_of_week<br>,COUNT(trip_duration) AS total_trip<br>FROM cyclistic_cleaned<br>WHERE member_casual = &#39;member&#39;<br>GROUP BY start_day2<br>ORDER BY COUNT(trip_duration) DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*W5xIkAisqxPXy4OdCxZ80g.png" /></figure><p>Average trip per day of members</p><pre>SELECT start_day2 AS day_of_week<br>,AVG(trip_duration)::time(0) AS total_trip<br>FROM cyclistic_cleaned<br>WHERE member_casual = &#39;member&#39;<br>GROUP BY start_day2<br>ORDER BY AVG(trip_duration) DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*v82WaxrGXezp1O7uFTIghA.png" /></figure><p>Total trip per day of casual riders.</p><pre>SELECT start_day2 AS day_of_month<br>,COUNT(trip_duration) AS total_trip<br>FROM cyclistic_cleaned<br>WHERE member_casual = &#39;casual&#39;<br>GROUP BY start_day2<br>ORDER BY COUNT(trip_duration) DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*-yLmG14H8Ma43fIQp5Y99A.png" /></figure><p>Average trip per day of casual riders</p><pre>SELECT start_day2 AS day_of_week<br>,AVG(trip_duration)::time(0) AS total_trip<br>FROM cyclistic_cleaned<br>WHERE member_casual = &#39;casual&#39;<br>GROUP BY start_day2<br>ORDER BY AVG(trip_duration) DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*qJ3iyQ98YhtXzPfPP_qs1w.png" /></figure><p>Let’s see how many riders per time of the day</p><pre>SELECT start_day2 AS day_of_month, COUNT(start_day) AS total_trip, (CASE<br>WHEN start_time &gt;= &#39;06:00:00&#39; AND start_time &lt; &#39;12:00:00&#39; THEN &#39;Morning&#39;<br>WHEN start_time &gt;= &#39;12:00:00&#39; AND start_time &lt; &#39;17:00:00&#39; THEN &#39;Afternoon&#39;<br>WHEN start_time &gt;= &#39;17:00:00&#39; AND start_time &lt; &#39;20:00:00&#39; THEN &#39;Evening&#39;<br>ELSE &#39;Night&#39;<br>END ) AS time_day<br>FROM cyclistic_cleaned<br>GROUP BY start_day2, (CASE<br>WHEN start_time &gt;= &#39;06:00:00&#39; AND start_time &lt; &#39;12:00:00&#39; THEN &#39;Morning&#39;<br>WHEN start_time &gt;= &#39;12:00:00&#39; AND start_time &lt; &#39;17:00:00&#39; THEN &#39;Afternoon&#39;<br>WHEN start_time &gt;= &#39;17:00:00&#39; AND start_time &lt; &#39;20:00:00&#39; THEN &#39;Evening&#39;<br>ELSE &#39;Night&#39;<br>END)<br>ORDER BY total_trip DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*D6-b_RUs2Lb6CbVpp1M6ug.png" /></figure><p>I also want to know the top 20 stations with the highest number of trips.</p><pre>SELECT start_station_name AS station<br>, COUNT(start_station_name) AS total_trips<br>FROM cyclistic_cleaned<br>GROUP BY start_station_name<br>ORDER BY total_trips DESC<br>LIMIT 20</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*FnEzmlCHbBSDkVk_m5-yLQ.png" /></figure><p>I also want to get the longest trip of members and casual riders by bike type.</p><pre>SELECT rideable_type<br>, member_casual<br>, MAX(trip_duration) AS longest_ride<br>FROM cyclistic_cleaned<br>GROUP BY rideable_type, member_casual<br>ORDER BY longest_ride DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*TO8T3lnTQrPUDp5TgxR1cw.png" /></figure><p>Lastly, I created a table with the latitudes and longitudes so that I can import it in tableau and create visualizations.</p><pre>CREATE TABLE location AS<br>SELECT rideable_type<br>, member_casual<br>, start_lat<br>, start_lng<br>, end_lat<br>, end_lng<br>FROM cyclistic_cleaned</pre><h3>INSIGHTS</h3><p>It is evident from the data analysis that the majority of the bike trips made by the bike sharing system are taken by its members rather than casual riders. Furthermore, the average trip duration for casual riders is significantly greater than that of members, being around 23 minutes for casual riders and 12 minutes for members.</p><p>Trends have also been observed in terms of the time of the year and day of the week trips are taken. June, July and August have been found to experience the highest number of trips, and Saturday is the only day of the week with more casual riders than members. Moreover, casual riders seem to have a longer average trip duration during weekends, while the members’ average trip duration remains the same throughout the week.</p><h3>RECOMMENDATIONS</h3><ol><li>It would be beneficial for the company to promote membership to those who are not currently members, as the typical ride length for casual riders is much longer than that of members. Potential strategies to motivate more sign-ups could include providing discounts or incentives to first-time members, as well as emphasizing the advantages of becoming a member (e.g. lower costs per ride).</li><li>It appears that the summer months, June, July and August, are the most popular for bike trips and Saturdays are especially busy for those who don’t have a membership. To meet the needs of both members and casual riders, the company should make sure there are sufficient bikes available in areas with high demand during those times.</li><li>Extending the bike sharing network to additional areas could be beneficial for both members and casual users, potentially stimulating greater utilization. This may be especially advantageous in areas with a high need for bike rentals.</li></ol><p><strong>Visit my website:</strong> <a href="https://bit.ly/neilmartinez">https://bit.ly/neilmartinez</a></p><p><strong>BI Portfolio:</strong> <a href="https://bit.ly/neilmartinez-novypro">https://bit.ly/neilmartinez-novypro</a></p><p><strong>Check out my other blogs: </strong><a href="https://bit.ly/neilmartinez-medium">https://bit.ly/neilmartinez-medium</a></p><p><strong>LinkedIn</strong>: <a href="https://bit.ly/neilmartinez-linkedin">https://bit.ly/neilmartinez-linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fb2e85864ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customer Mall Segmentation and Clustering using Python]]></title>
            <link>https://medium.com/@neilangelomartinez/customer-mall-segmentation-and-clustering-using-python-8057449f307a?source=rss-336886035ef1------2</link>
            <guid isPermaLink="false">https://medium.com/p/8057449f307a</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[segmentation]]></category>
            <category><![CDATA[clustering]]></category>
            <dc:creator><![CDATA[Neil Angelo Martinez]]></dc:creator>
            <pubDate>Sun, 01 Jan 2023 19:25:22 GMT</pubDate>
            <atom:updated>2023-01-02T17:26:51.925Z</atom:updated>
            <content:encoded><![CDATA[<p>Kaggle notebook: <a href="https://www.kaggle.com/code/neilangelomartinez/customer-segmentation-using-python">https://www.kaggle.com/code/neilangelomartinez/customer-segmentation-using-python</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*TKzvgYv7RQBa-Ywm_BM9tw.png" /><figcaption>Image by owner.</figcaption></figure><h3>INTRODUCTION</h3><p>Customer segmentation is dividing up a customer base into smaller groups that have commonalities. This can be helpful for a lot of things, like targeting marketing efforts or enhancing the efficacy of a product or service. Data points can be grouped together using the clustering technique according to how similar they are.</p><p>In order for the marketing team to properly design their marketing strategy, the project’s objective is to give them information on their target clients. Customer segmentation and clustering will be carried out utilizing Python to accomplish this.</p><p>Data on each customer’s income, age, and mall shopping score will be collected in the first step. The analysis’s starting point will be this data, which will be stored in a pandas DataFrame.</p><p>Next, the clustering features will be chosen, which in this case are the mall shopping score, age, and income. To ensure that the various attributes are on the same scale, the data may also need to be pre-processed through scaling or normalization.</p><p>Once the data is ready, a clustering algorithm will be used to divide the clients into segments according to how similar they are. To determine which clustering method generates the most insightful segments, a variety of clustering algorithms may be used.</p><p>In order to use Python for customer segmentation and clustering, a number of libraries must be imported. Data analysis and manipulation are performed using the pandas library, and data visualization is performed using seaborn and matplotlib.pyplot. Data points are grouped according to how similar they are using the sklearn.cluster.KMeans method from the scikit-learn library. The script’s warnings are ignored using the warnings module and the warnings.filterwarnings function to avoid having their output cluttered.</p><pre>import pandas as pd<br>import seaborn as sns<br>import matplotlib.pyplot as plt<br>from sklearn.cluster import KMeans<br>import warnings<br>warnings.filterwarnings(&#39;ignore&#39;)</pre><pre>df = pd.read_csv(&quot;/kaggle/input/mall-customer-segmentation/mall-customer-segmentation.csv&quot;)<br>df.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*cJFKgokZgJxvTWTyiRX_-g.png" /></figure><h3>UNIVARIATE ANALYSIS</h3><p>Univariate analysis is a statistical technique that is used to analyze a single variable. It involves studying the distribution of the data and identifying patterns and trends.</p><pre>df.describe()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*aIPJDLOnwI7VBanUcAzj1Q.png" /></figure><pre>sns.distplot(df[&#39;Annual Income (k$)&#39;]);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*17APsVgXpnIj0yeLkGLiUg.png" /></figure><p>A histogram is produced by the distplot function, which also fits a probability density function (PDF) to the data. The distribution of the data is depicted in the resulting figure, together with its form and any potential patterns or trends.</p><pre>df.columns</pre><pre>Index([&#39;CustomerID&#39;, &#39;Gender&#39;, &#39;Age&#39;, &#39;Annual Income (k$)&#39;,<br>       &#39;Spending Score (1-100)&#39;],<br>      dtype=&#39;object&#39;)</pre><pre>columns = [&#39;Age&#39;, &#39;Annual Income (k$)&#39;,&#39;Spending Score (1-100)&#39;]<br>for i in columns:<br>    plt.figure()<br>    sns.distplot(df[i])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*0qvxqL5TjmurSsMUxCTZLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*f8Kydt7gy28wJ2AOkRMnLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*5eLdq1Q7oeq6dAga8kJYpQ.png" /></figure><pre>columns = [&#39;Age&#39;, &#39;Annual Income (k$)&#39;,&#39;Spending Score (1-100)&#39;]<br>for i in columns:<br>    plt.figure()<br>    sns.distplot(df[i])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*nJgMTyoFx6qYa6qdxrMCpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*rR6xzqLvJcVEUM4UjifYWw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*qi7m7G5cF-LPFwBP9yG45w.png" /></figure><p>This displays distribution plots for three variables: age, annual income (k$), and spending score (1–100) using the seaborn library. It performs this by running the sns.distplot() function for each variable while iterating through the variables in a for loop. The generated plots display each variable’s distribution, including its form and any patterns or trends that might exist. These charts can be used to comprehend each variable’s features and spot any outliers or irregularities in the data.</p><pre>sns.kdeplot(df[&#39;Annual Income (k$)&#39;],shade=True,hue=df[&#39;Gender&#39;]);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*_kihEQicCcUEXpg7ns4isQ.png" /></figure><p>The resulting plot displays the customers’ annual income distribution, including its form and any patterns or trends that might exist. Additionally, it demonstrates how the economic disparity between men and women. This graph can be used to comprehend the properties of the income data and spot any outliers or irregularities.</p><pre>columns = [&#39;Age&#39;, &#39;Annual Income (k$)&#39;,&#39;Spending Score (1-100)&#39;]<br>for i in columns:<br>    plt.figure()<br>    sns.kdeplot(df[i],shade=True,hue=df[&#39;Gender&#39;])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*_74ZVXo74MID2bZKxRlw7g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*zy2jbccGNR2Dh5n3lq-CVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*UIa87OLTOpj0qGZ6EqGcVg.png" /></figure><p>The generated plots display each variable’s distribution, including its form and any patterns or trends that might exist. These charts can be used to comprehend each variable’s features and spot any outliers or irregularities in the data.</p><pre>columns = [&#39;Age&#39;, &#39;Annual Income (k$)&#39;,&#39;Spending Score (1-100)&#39;]<br>for i in columns:<br>    plt.figure()<br>    sns.boxplot(data=df,x=&#39;Gender&#39;,y=df[i])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*wMKXZgBtMWuPYpSG3EF8yw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*DLX1mh2Y1EwpE9ZbeJpSPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*OoHwoKJcGKRIoyl1QoF3TA.png" /></figure><p>A box plot, which is a graphic depiction of the distribution of a dataset, is produced using the sns.boxplot() function. The box plot displays the data’s median and quartiles as well as any potential outliers or anomalies.</p><pre>df[&#39;Gender&#39;].value_counts(normalize=True)</pre><pre>Female    0.56<br>Male      0.44<br>Name: Gender, dtype: float64</pre><h3>BIVARIATE ANALYSIS</h3><p>It is beneficial to understand the relationships between the variables and spot any trends or patterns. Bivariate analysis can be carried out using methods including scatter plots, correlation coefficients, and regression analysis. It is comparable to multivariate analysis, which considers several variables at once, and is frequently employed after univariate analysis to look into potential links in the data.</p><pre>sns.scatterplot(data=df, x=&#39;Annual Income (k$)&#39;,y=&#39;Spending Score (1-100)&#39; )</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*ZMGaeTMKZHKRKf93RYqafg.png" /></figure><pre>sns.pairplot(df,hue=&#39;Gender&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*he5CIQtUfTWwl-y20yjZvg.png" /></figure><p>The plots are colored by the ‘Gender’ column. The resulting plots show the relationships between the variables, including any patterns or trends that may be present. These plots can be used to identify any correlations or trends between the variables and to understand how the variables differ between males and females.</p><pre>df.groupby([&#39;Gender&#39;])[&#39;Age&#39;, &#39;Annual Income (k$)&#39;,<br>       &#39;Spending Score (1-100)&#39;].mean()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*wyXoqzuQGUNJyRAnMhZqAw.png" /></figure><p>This groups the DataFrame by the ‘Gender’ column and computes the mean of three variables for each group: ‘Age,’ ‘Annual Income (k$),’ and ‘Spending Score (1–100).</p><pre>df.corr()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*O7HG94aaMz_SPLnw55pf8w.png" /></figure><p>The pandas function df.corr() computes the pairwise correlations between all columns in a DataFrame and produces a DataFrame with the correlation coefficient for each pair of columns. The correlation coefficient, which ranges from -1 (perfect negative correlation) to 1 (perfect positive correlation), assesses the degree and direction of a linear relationship between two variables (perfect positive correlation). This function can be used to find and understand any relationships between variables in a DataFrame.</p><pre>sns.heatmap(df.corr(),annot=True,cmap=&#39;coolwarm&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*xM0iJQw5SROM_Gk82YX3fg.png" /></figure><p>The seaborn library is used in this code to generate a heat map displaying the relationships between the variables in the df DataFrame. The correlations are calculated with the df.corr() function, and the results are plotted with the annot parameter. The color map ‘coolwarm’ was used to color the plot.</p><h3>Clustering — Univariate, Bivariate, Multivariate</h3><p><em>The goal of clustering is to identify patterns and relationships within the data that may not be evident by looking at each data point individually. First thing to do is to initiate the algorithm.</em></p><pre>clustering1 = KMeans(n_clusters=3)</pre><p>This generates an instance of the KMeans class, which is a common unsupervised clustering algorithm. The n clusters option has been set to 3, indicating that the algorithm should divide the data into three clusters. This code’s clustering1 object can be used to fit the KMeans algorithm to a dataset and predict cluster assignments for additional data points.</p><pre>clustering1.fit(df[[&#39;Annual Income (k$)&#39;]])<br>clustering1.labels_</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*KULKTg1OkFHmBWvfIYE3TQ.png" /></figure><pre>df[&#39;Income Cluster&#39;] = clustering1.labels_<br>df.head()</pre><pre>0    90<br>1    74<br>2    36<br>Name: Income Cluster, dtype: int64</pre><pre>clustering1.inertia_</pre><pre>23517.330930930926</pre><p>.inertia_ that stores the sum of squared distances between data points and the centroids of respective clusters. It can be used to assess the performance of the KMeans algorithm on a particular dataset and to compare the method’s performance for different n clusters values. A lower inertia_ number usually suggests a better fit of the data to the clusters.</p><pre>intertia_scores=[]<br>for i in range(1,11):<br>    kmeans=KMeans(n_clusters=i)<br>    kmeans.fit(df[[&#39;Annual Income (k$)&#39;]])<br>    intertia_scores.append(kmeans.inertia_)</pre><p>On each iteration of the loop, the KMeans algorithm is fit to the data with the current value of n_clusters and the value of the inertia_ attribute is appended to the intertia_scores list. The intertia_scores list will contain the values of inertia_ for n_clusters ranging from 1 to 10. This code is used to evaluate the performance of the KMeans algorithm for different values of n_clusters and to identify the optimal number of clusters.</p><pre>intertia_scores</pre><pre>[137277.28000000003,<br> 48660.88888888889,<br> 23517.330930930926,<br> 13278.112713472488,<br> 8481.49619047619,<br> 5050.904761904763,<br> 3950.2126984127003,<br> 2827.308424908425,<br> 2208.812049062049,<br> 1766.6142857142856]</pre><pre>plt.plot(range(1,11),intertia_scores)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*XWuTZrXcnIhw52iaZ5LW-w.png" /></figure><p>This creates a line plot of the values in the intertia scores list using the plot() method from the matplotlib.pyplot package. The plot’s x-values are n cluster values ranging from 1 to 10, while the y-values are inertia_ values. This graphic can be used to visually represent the relationship between n clusters and inertia_ and to determine the appropriate number of clusters.</p><pre>df.groupby(&#39;Income Cluster&#39;)[&#39;Age&#39;, &#39;Annual Income (k$)&#39;,<br>       &#39;Spending Score (1-100)&#39;].mean()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*e5nJwQ7xHTKUqNy-gU_TBQ.png" /></figure><h3>Bivariate Clustering</h3><pre>clustering2 = KMeans(n_clusters=5)<br>clustering2.fit(df[[&#39;Annual Income (k$)&#39;,&#39;Spending Score (1-100)&#39;]])<br>df[&#39;Spending and Income Cluster&#39;] =clustering2.labels_<br>df.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*KqMivwfqo73FrdxNAZ21Lg.png" /></figure><pre>intertia_scores2=[]<br>for i in range(1,11):<br>    kmeans2=KMeans(n_clusters=i)<br>    kmeans2.fit(df[[&#39;Annual Income (k$)&#39;,&#39;Spending Score (1-100)&#39;]])<br>    intertia_scores2.append(kmeans2.inertia_)<br>plt.plot(range(1,11),intertia_scores2)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*JCsNAC0X8xR461FrbgLCYg.png" /></figure><p>On each iteration of the loop, the KMeans algorithm is fit to the df[[‘Annual Income (k$)’,’Spending Score (1–100)’]] DataFrame with the current value of n_clusters and the value of the inertia_ attribute is appended to the intertia_scores2 list. After the loop has completed, a line plot is created with the values of n_clusters on the x-axis and the values of inertia_ on the y-axis.</p><pre>centers =pd.DataFrame(clustering2.cluster_centers_)<br>centers.columns = [&#39;x&#39;,&#39;y&#39;]</pre><p>This generates a DataFrame in which the coordinates of the centroids of the clusters found by the KMeans method are saved. The centers DataFrame, for example, can be used to see the centroids’ locations on a scatter plot.</p><pre>plt.figure(figsize=(10,8))<br>plt.scatter(x=centers[&#39;x&#39;],y=centers[&#39;y&#39;],s=100,c=&#39;black&#39;,marker=&#39;*&#39;)<br>sns.scatterplot(data=df, x =&#39;Annual Income (k$)&#39;,y=&#39;Spending Score (1-100)&#39;,hue=&#39;Spending and Income Cluster&#39;,palette=&#39;tab10&#39;)<br>plt.savefig(&#39;clustering_bivariate.png&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*Jfit6aIwuLQLKspjdh-HEw.png" /></figure><p>This plots the data in the df DataFrame as a scatter plot, using the ‘Annual Income (k$)’ column on the x-axis and the ‘Spending Score (1–100)’ column on the y-axis. The scatter plot points are colored based on the values in the ‘Spending and Income Cluster’ column. The scatter plot also shows the positions of the cluster centroids as black stars.</p><pre>pd.crosstab(df[&#39;Spending and Income Cluster&#39;],df[&#39;Gender&#39;],normalize=&#39;index&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*MCpJMn1NMF050VFZUN5tIA.png" /></figure><pre>df.groupby(&#39;Spending and Income Cluster&#39;)[&#39;Age&#39;, &#39;Annual Income (k$)&#39;,<br>       &#39;Spending Score (1-100)&#39;].mean()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*5Id4rggj_CBvpOsuoYxBbw.png" /></figure><h3>MULTIVARIATE CLUSTERING</h3><p>The StandardScaler class is a preprocessing tool that can be used to standardize the features of a dataset by scaling them to have zero mean and unit variance.</p><pre>from sklearn.preprocessing import StandardScaler<br>scale = StandardScaler()<br>df.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*Fm1tNdIqwGoYr6Q-nvis4w.png" /></figure><pre>dff = pd.get_dummies(df,drop_first=True)<br>dff.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*wjguAr74vlrTnVm6XnTBYA.png" /></figure><p>This transforms the df DataFrame’s category variables to dummy/indicator variables and stores the resulting data in a new DataFrame called dff. The dummy/indicator variables are created using the pd.get dummies() method, and the drop first argument is set to True to remove the first level of each categorical variable. The first five rows of the dff DataFrame are then displayed using the head() method.</p><pre>dff = dff[[&#39;Age&#39;, &#39;Annual Income (k$)&#39;, &#39;Spending Score (1-100)&#39;,&#39;Gender_Male&#39;]]<br>dff.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*ffs2eQNBx495jeXLc1itlA.png" /></figure><pre>dff = scale.fit_transform(dff)<br>dff = pd.DataFrame(scale.fit_transform(dff))<br>dff.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*eA6-y0VEf2qdUvhx0XGA1g.png" /></figure><pre>intertia_scores3=[]<br>for i in range(1,11):<br>    kmeans3=KMeans(n_clusters=i)<br>    kmeans3.fit(dff)<br>    intertia_scores3.append(kmeans3.inertia_)<br>plt.plot(range(1,11),intertia_scores3)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/1*8UREs1BW-QPgsW9-K6in-A.png" /></figure><h3>INSIGHTS</h3><p>Cluster 3 people have low annual incomes and low spending scores. This is most likely because consumers with limited income tend to buy less and are thus more conscious of their spending habits. These people are frequently seen as financially savvy since they understand how to save and spend wisely. Because they are less likely to make big purchases, the mall or shops may not be interested in targeting this type of customer.</p><p>It is clear that people in Cluster 0 have both high annual earnings and high spending scores. This is considered to be an ideal condition for the mall because these consumers are likely to be the main source of profit. It’s likely that these customers visit the mall and are drawn to its products and services. This category of customers is likely to be of interest to the mall or because they are more likely to make frequent and bigger purchases.</p><h3>SUMMARY</h3><p>The purpose of this project was to identify the most important customer groups for a marketing team to target using data analysis and machine learning approaches. The project’s data comprised of information about mall clients, such as their age, gender, annual income, and spending score.</p><p>The data was imported into a Pandas DataFrame to begin the analysis, and several visualizations were created to explore the correlations between the variables. Univariate plots were used to depict the distribution of each individual variable, and bivariate plots were used to visualize the interactions between pairs of variables. The data was also summarized using statistical measures such as the mean and standard deviation.</p><p>The data was then clustered to identify groups of customers with similar characteristics. Customers were divided into clusters using the KMeans algorithm based on their annual income and expenditure score. The best number of clusters was established by locating the “elbow” in a plot of the inertia_ values for various n clusters values.</p><p>Finally, the clustering findings were visualized and analyzed in order to better understand the characteristics of the various clusters and to determine the most important consumer groups for the marketing team to target.</p><p><strong>Reference:</strong> <a href="https://www.kaggle.com/datasets/vjchoudhary7/customer-segmentation-tutorial-in-python">https://www.kaggle.com/datasets/vjchoudhary7/customer-segmentation-tutorial-in-python</a></p><p><strong>View repository here:</strong> <a href="https://github.com/neilangelomartinez/customer-segmentation-python">https://github.com/neilangelomartinez/customer-segmentation-python</a></p><p><strong>Visit my website:</strong> <a href="https://bit.ly/neilmartinez">https://bit.ly/neilmartinez</a></p><p><strong>BI Portfolio:</strong> <a href="https://bit.ly/neilmartinez-novypro">https://bit.ly/neilmartinez-novypro</a></p><p><strong>Check out my other blogs: </strong><a href="https://bit.ly/neilmartinez-medium">https://bit.ly/neilmartinez-medium</a></p><p><strong>LinkedIn</strong>: <a href="https://bit.ly/neilmartinez-linkedin">https://bit.ly/neilmartinez-linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8057449f307a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NYPD Arrest Data Analysis using Power BI]]></title>
            <link>https://medium.com/@neilangelomartinez/nypd-arrest-data-d4fc3a0501cb?source=rss-336886035ef1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4fc3a0501cb</guid>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Neil Angelo Martinez]]></dc:creator>
            <pubDate>Fri, 30 Dec 2022 04:56:12 GMT</pubDate>
            <atom:updated>2023-01-01T04:43:05.108Z</atom:updated>
            <content:encoded><![CDATA[<p>Year to Date (Q1-Q3)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1FtZWYDe1oaQNaq6EXUTAA.png" /></figure><p><em>Interact with the dashboard here:</em> <a href="https://www.novypro.com/project/nypd-arrest-data-2">https://www.novypro.com/project/nypd-arrest-data-2</a></p><h3>Introduction</h3><p>This study aims to analyze and recognize patterns and trends in New York City police enforcement activity as represented in statistics on arrests made by the NYPD. The information comprises the type of crime, the location and date of enforcement, and perpetrator demographics. By examining this data, it is intended to obtain insight into the nature of police activity in the city and how it may change depending on criteria.</p><h3>Data sources</h3><p>The data for this project was collected from the New York City Police Department’s NYPD Arrest Data (Year to Date) dataset. This dataset comprises records of every arrest made in New York City by the NYPD during the current fiscal year and is updated quarterly.</p><p>· <em>Why is this data collected?</em> This is a breakdown of every arrest effected in NYC by the NYPD during the current year.</p><p>· <em>How is this data collected?</em> This data is manually extracted every quarter and reviewed by the Office of Management Analysis and Planning.</p><p>· <em>What does each record represent?</em> Each record represents an arrest effected in NYC by the NYPD and includes information about the type of crime, the location, and the time of enforcement.</p><p>· <em>How can this data be used?</em> In addition, information related to suspect demographics is also included.</p><p>· <em>What are the idiosyncrasies or limitations of the data to be aware of?</em> This data can be used by the public to explore the nature of police enforcement activity.</p><p>Please refer to the attached data <a href="https://data.cityofnewyork.us/api/views/uip8-fykc/files/62a746df-66ca-4603-aae4-46c02bac2972?download=true&amp;filename=NYPD_Arrest_Incident_Level_Data_Footnotes.pdf">footnotes</a> for additional information about this dataset.</p><h3>Data cleaning and preparation</h3><p>The main tool that is used for data analysis is Power BI. The NYPD Arrest Data (Year to Date) dataset needed to be cleaned and processed before analysis could begin. This involved several processes, including:</p><p>1. Removed Errors</p><p>2. In the LAW_CAT_CD (level of offense) column, the values only include a single letter, with “F” representing a felony, “M” representing a misdemeanor, “I” representing an infraction, and “V” representing a violation. <em>Replace values</em> were used to replace those values to show their meaning. The blank values were also replaced with “Unclassified”. However, there is a value of “9” that does not correspond to any of these categories and should be removed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*A7suAdQBW3FVV0ot7k18Vw.png" /><figcaption>Before</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*wNDsn8G8-XeLQZe3ckC-zw.png" /><figcaption>After</figcaption></figure><p>3. Replaced values of ARREST_BORO (Borough of arrest) column. B(Bronx), S(Staten Island), K(Brooklyn), M(Manhattan), Q(Queens).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*Ubezy_VMnK4iA7MqagcKSQ.png" /></figure><p>4. Added a conditional column to show the jurisdiction responsible for the arrest. Jurisdiction codes: 0(Patrol), 1(Transit) and 2(Housing) represent NYPD whilst codes 3 and more represent non-NYPD jurisdictions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Nzs1VHJOeYNIfj8us1vPmg.png" /></figure><p>5. Replaced Values of PERP_SEX column, F to Female and M to Male.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*Kx6tfyXi4ReYEVt9ngMmdA.png" /></figure><p>6. Remove columns: X_COORD_CD, and Y_COORD_CD since there’s already Latitude and Longitude for Global Coordinate System.</p><p>7. To make values uniform, change the text format to <em>Capitalize Each Word</em> for all text columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*MS3hNq-CjpRUWYEhceHE8Q.png" /></figure><p>8. The shape map that will be created later on for the dashboard needs to show only New York. NYC Open Data provides a JSON file providing a map of New York. Click on GeoJSON to download the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*3THzc9Miy8RYIYlFyVsoMw.png" /><figcaption>NYC Open Data website</figcaption></figure><p>9. After downloading the file, it should be imported into <a href="https://mapshaper.org/">mapshaper.org</a> and converted to TopoJSON format. This is necessary since Power BI only supports TopoJSON for shape maps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*yZthqtkbkNB3fOEnsvktcw.png" /></figure><p>10. Click Export on the rightmost part of the website. A message box will appear, select TopoJSON, and then click Export.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*Culewyhdg2_Ssk_5HaXL7g.png" /></figure><p>11. To show which day of the week has the most number of arrests, go back to the Power Query editor and duplicate the table. Then, use the Group By function. Select Day Name and then Count for the aggregate function.</p><h3>Data exploration and visualization</h3><ol><li>Starting with the shape map, import the JSON file that was downloaded by clicking on <em>Get Data</em> and then selecting JSON.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*Oy2Z0hP9j-vXjsHx6qPPtw.png" /></figure><p>2. Go to the <em>Model</em> tab and then drag the <em>precinct</em> column from the NYPD to the main table to have a relationship.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*8-siUXwQ9txNn_HGnfghXQ.png" /></figure><p>3. Next, add a shape map to the dashboard. Shape maps need to be turned on from the settings (File&gt;Options and Settings&gt;Options&gt;Global&gt;Preview Features). After adding the shape map, add <em>Precinct</em> to the Location, and then in Color saturation add the <em>number of arrests</em>. Go to the Visual tab, change Map type to Custom map and then upload the converted TopoJSON file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*iypZ1Tdnm-NJCl_wObKHjg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*inPRGJLtkBqF-EekZKSnNQ.png" /></figure><p>The shape map should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*qF_HObcRvEqj_ZNqnbnc4A.png" /></figure><p>4. The next chart to add is a ribbon chart, which is a type of chart that shows trends over time and can be used to compare multiple series of data. To create the ribbon chart, add the <em>Arrest Date</em> column to the X-axis, <em>Arrests</em> in the Y-axis, and <em>Borough</em> to the Legend. This will allow us to see how the number of arrests varies over time for each borough.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/227/1*6mqHJBZxfQyYdOuTU7k7Ow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*UdvF-p55RRH4h-NjTEvfIA.png" /></figure><p>5. There are different kinds of levels of offenses, which can be shown by using a funnel chart.</p><p>6. Next, three filters are added: Borough, Precinct, and Jurisdiction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*CWtGimYkmxRViFTwYIP39g.png" /></figure><p>7. Two cards have been added to display the borough with the highest number of arrests at the current time and the day of the week with the most arrests. For the card showing the highest number of arrests, add a filter on the visual and choose filter type to <em>Top N</em>, input Top 1 and then choose <em>Max of Count</em> under <em>By value</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*6fUivjq52KtXEcu6xtFNMw.png" /></figure><p>Interactions for these cards have been disabled, so they will not be affected by any changes made to filters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*KayYvnv8Z0djHvylvULt2A.png" /></figure><p>8. The next dashboard, called the “Perp Dashboard,” displays information about the demographics of the perpetrators. It includes two stacked bar charts for the Perp Age Group and Perp Race, a pie chart for the Perp gender, and a bar chart that shows all offenses. All of these charts are used to visualize the data about the perpetrators.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*-kLEeq10G9YHKl0paSfKEA.png" /></figure><p>9. All charts are now placed in the dashboard. After editing the theme and the background, here are the final dashboards:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*yJrgziT5D5XewX-Yx_A81Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*nOxLbkNVVhvYMFWVb49KJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*oz7E4B4GkTl94_y1z9klLA.png" /></figure><h3>Insights</h3><p>1. Brooklyn has the largest number of arrests among New York City’s five boroughs during the first three quarters of 2022, with a total of 38,064 arrests. The Bronx had the second largest number of arrests, with 32,307, followed by Manhattan (34,580), Queens (29,038), and Staten Island (6,247). There could be a variety of reasons why some boroughs had higher arrest rates than others. It might be brought on by factors like population density, socio-economic status, the presence of various businesses or industries, or the performance of local law enforcement.</p><p>2. With a total of 74,915 arrests throughout the first three quarters of 2022 in New York City, it appears that misdemeanors accounted for the majority of those. Although misdemeanors generally are less serious than felonies, they can still result in serious penalties including fines and jail time. With 63,227 arrests, felonies had the second largest number of arrests. Felonies are more serious offenses that can result in longer jail sentences and harsher punishments. With only 1,362 arrests for unclassified offenses, the number of arrests was quite low. Unclassified offenses are crimes that do not fall into a defined category and are often handled on a case-by-case basis.</p><p>3. According to the data, it appears that Black people accounted for the race in New York City with the highest number of arrests during the first three quarters of 2022, totaling 69,531. Also, 82.5% of perps arrested are male. With 80,873 arrests, the age group of 25 to 44 had the most arrests. The two most common offenses were assault and petit larceny/petty theft.</p><h3>Recommendation</h3><p>It would be helpful for police departments and city officials to think about implementing strategies into action that address any potential causes of high arrest rates for specific offenses, such as addressing underlying social and economic factors that may contribute to crime, enhancing the efficiency of law enforcement efforts, and allocating more funds for crime prevention and intervention programs. Additionally, it would be crucial to keep an eye on arrest statistics and other crime data to spot any changes or patterns over time and assess the success of any applied strategies.</p><p><strong>View repository</strong>: <a href="https://github.com/neilangelomartinez/nypd-arrest-data-ytd">https://github.com/neilangelomartinez/nypd-arrest-data-ytd</a></p><h3>References</h3><p>NYC Open Data (2022). GIS data: Boundaries of Police Precincts. Police precincts. <a href="https://data.cityofnewyork.us/Public-Safety/Police-Precincts/78dh-3ptz">https://data.cityofnewyork.us/Public-Safety/Police-Precincts/78dh-3ptz</a></p><p>Police Department (NYPD) (2022). NYPD Arrest Data (Year to Date). <a href="https://data.cityofnewyork.us/Public-Safety/NYPD-Arrest-Data-Year-to-Date-/uip8-fykc">https://data.cityofnewyork.us/Public-Safety/NYPD-Arrest-Data-Year-to-Date-/uip8-fykc</a></p><p><strong>Visit my website:</strong> <a href="https://bit.ly/neilmartinez">https://bit.ly/neilmartinez</a></p><p><strong>BI Portfolio:</strong> <a href="https://bit.ly/neilmartinez-novypro">https://bit.ly/neilmartinez-novypro</a></p><p><strong>Check out my other blogs: </strong><a href="https://bit.ly/neilmartinez-medium">https://bit.ly/neilmartinez-medium</a></p><p><strong>LinkedIn</strong>: <a href="https://bit.ly/neilmartinez-linkedin">https://bit.ly/neilmartinez-linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4fc3a0501cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supermarket Sales Dashboard]]></title>
            <link>https://medium.com/@neilangelomartinez/supermarket-sales-dashboard-6a24fc6222cb?source=rss-336886035ef1------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a24fc6222cb</guid>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Neil Angelo Martinez]]></dc:creator>
            <pubDate>Thu, 15 Dec 2022 09:23:03 GMT</pubDate>
            <atom:updated>2022-12-29T21:59:10.947Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Data Analysis and Visualization in Power BI</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zwpP6WkbgK277C43SxN61A.png" /><figcaption>Interact with the dashboard here: <a href="https://www.novypro.com/project/supermarket-sales-dashboard">https://www.novypro.com/project/supermarket-sales-dashboard</a></figcaption></figure><p>I created a supermarket sales dashboard in Power BI that offers a comprehensive and intuitive overview of the company’s sales performance. The dashboard features a range of interactive charts and graphs that provide valuable insights into key metrics such as sales revenue, profit margins, and customer types.</p><p>With this dashboard, managers can quickly identify trends and patterns in sales data, and make informed decisions to optimize their operations and improve profitability. The dashboard is highly customizable, allowing users to filter and drill down into the data by year, month, sale type, category, and payment mode.</p><p>The dataset can be downloaded <a href="https://leanexcelsolutions.com/wp-content/uploads/2022/04/Sales-Dashboard-practice-file.xlsx">here</a></p><p>Credits to <a href="https://leanexcelsolutions.com/">https://leanexcelsolutions.com/</a></p><h3>PROCESS</h3><p>The dataset is in XLSX format with two worksheets, one is the Input Data sheet which consists of 528 rows with columns: date, product ID, quantity, sale type, payment mode, and discount. The Master Data worksheet consists of the specifications of each product. The data is already cleaned no further data cleaning was done.</p><h3>ANALYZE</h3><p>First, I got the total sales, total profit, and total profit percent by adding cards and got the sum of the total selling value, profit, and profit percent, respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*aS6dI2l9xFkbEbJsL32-Lw.png" /></figure><p>Next, a stacked column chart that shows the total sales and the profit by month. Last 2021, October had the highest sales of $20,453.90 and the highest profit of $3,638.90. While 2022, the month with the highest sales is November, amounting to $26,421.67 also with the highest profit of $5,437.67.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*wMtC7GOn48mVS8GXNYlImw.png" /><figcaption>Monthly sales and profit by month of 2021</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*6NCr6XqEMyPcXykuW019Tw.png" /><figcaption>Monthly sales and profit by month of 2022</figcaption></figure><p>Then, I added an area chart to show the range of total sales per day of the month. For the year 2021, the day with the highest average sales is the 17th of the month, while in 2022, the highest average sales are the 12th of the month.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*kwZdWirrE8JLk38MSiDKGA.png" /><figcaption>Average sales by day for the year 2021</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*Yb6As8WbHFk36n-XHx1Ugw.png" /><figcaption>Average sales by day for the year 2022</figcaption></figure><p>I added a donut chart to show the different sales types in which Direct Sales comprises 50.66% last 2021 and 52.89% this 2022.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*sFFI8Yg_MBuTheTrXaSz3w.png" /><figcaption>Sales types last 2021</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*lyD07CK2-G-1li6Qn4oaPQ.png" /><figcaption>Sales types this 2022</figcaption></figure><p>For payment mode, the data suggests that the store is serving a diverse customer base with different payment preferences and that it should continue to offer both cash and online payment options to meet the needs of all its customers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*USCru3K1eTgEGWTHgFk40g.png" /></figure><h3>INSIGHTS</h3><p>The majority of the supermarket’s sales come from direct sales to customers who visit the store. This indicates that the store is successful in attracting foot traffic and converting customers into sales.</p><p>But there’s also a significant proportion of the supermarket’s sales that comes from its online channel, indicating that the store should continue to invest in its online presence and offer a convenient and seamless shopping experience for customers who prefer to shop online.</p><p>Additionally, the fact that a significant proportion of the supermarket’s sales come from wholesale indicates that the store has established strong partnerships with suppliers and wholesalers and that these relationships are contributing to its overall sales performance.</p><p>Online payment customers might have chosen this option because of convenience, speed, or security. This means that the store should keep making investments in its infrastructure for accepting payments online and should advertise this choice to potential customers.</p><p>Overall, this data suggests that the supermarket has a balanced and diversified sales strategy and that it is successfully leveraging different channels to drive sales and grow its business.</p><h3>RECOMMENDATIONS</h3><ul><li>Focus on maintaining a strong market demand for their products by continuing to offer high-quality products at competitive prices.</li><li>Explore opportunities to expand their product line or add new services to appeal to a wider range of customers.</li><li>Invest in marketing and advertising to increase awareness of their brand and attract new customers.</li><li>Continue to carefully manage costs and expenses to ensure that they are able to generate a strong profit margin.</li></ul><p>Overall, the key to the supermarket’s continued success will likely be a combination of effective management, strong customer service, and a focus on offering high-quality products at competitive prices.</p><p>Check out the <strong>repository </strong>here: <a href="https://github.com/neilangelomartinez/supermarket-sales-dashboard">https://github.com/neilangelomartinez/supermarket-sales-dashboard</a></p><p>Visit my website: <a href="https://bit.ly/neilmartinez">https://bit.ly/neilmartinez</a></p><p>BI Portfolio: <a href="https://bit.ly/neilmartinez-novypro">https://bit.ly/neilmartinez-novypro</a></p><p>Check out my other blogs: <a href="https://bit.ly/neilmartinez-medium">https://bit.ly/neilmartinez-medium</a></p><p>LinkedIn: <a href="https://bit.ly/neilmartinez-linkedin">https://bit.ly/neilmartinez-linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a24fc6222cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Olist eCommerce Analysis]]></title>
            <link>https://medium.com/@neilangelomartinez/olist-ecommerce-analysis-a3ad7a640128?source=rss-336886035ef1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3ad7a640128</guid>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Neil Angelo Martinez]]></dc:creator>
            <pubDate>Thu, 15 Dec 2022 05:54:40 GMT</pubDate>
            <atom:updated>2022-12-29T21:58:44.776Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Data Analysis and Visualization using Power BI</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*GWN_zIK1afFtPIJq.jpeg" /><figcaption>Interact with the dashboard here: <a href="https://www.novypro.com/project/olist-brazil-ecommerce">https://www.novypro.com/project/olist-brazil-ecommerce</a></figcaption></figure><h3>Background</h3><p>The dataset for this study is from a Brazilian e-commerce company called Olist Store. It contains information on 100,000 orders made from 2016 to 2018 from various marketplaces in Brazil. The dataset includes details such as the status of the order, the price and payment information, customer location, and product attributes. It also includes customer reviews. The geolocation data associate Brazilian zip codes with latitude and longitude coordinates.</p><p>This is real commercial data, it has been anonymized, and references to the companies and partners in the review text have been replaced.</p><h3>Process</h3><p>There are a total of 9 CSV files that need to be imported to Power BI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*9dnbgMf38R_ptGpWM1PDCQ.png" /></figure><p>The dataset can be downloaded <a href="https://drive.google.com/file/d/1Rrv8GKkEbntmYtAQ61JH66Kn3uE95mLM/view">here</a></p><h3>Clean Data</h3><p>The first thing I did is to replace the translated product category with the main table because the original is in Spanish. Other tables don’t have header columns so I just promote header columns. I replaced all lowercase columns like the city, category name, and payment type with an upper case each letter.</p><p>Here’s the final model showing the relationships:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aecKN0X7mZsk8QYclJgilw.png" /></figure><h3>Analyze</h3><p><strong>Sales Dashboard</strong></p><p>In the sales dashboard, I want to show the total sales, total freight value, total number of orders, and overall average product rating. All of these measures will be shown in cards.</p><p>I inserted a funnel to show the top 10 products category with the most sales.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*rFUajS3Kke3bbv4iex7Qdw.png" /></figure><p>The <em>bed, bath, and table</em> categories are in the Top 1 with 13,660 with an average review score of 3.98.</p><p>In a ribbon chart, I want to show the total sales and freight by date. You can drill down to see the chart by year, quarter, or month.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*j9cz0903YNM5_cjmjM78wQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*GYK4DTos92PAUFtos0QqHg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*ZCMeMLSF6xAuYK1wqOWFXw.png" /></figure><p><strong>Logistics Dashboard</strong></p><p>The measure that I need to get is the number of late deliveries. Here’s the DAX syntax:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*vVj3rPxTIkxeP5fJef_bSg.png" /></figure><p>The next measure is to get how many orders were late dispatched by the seller:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*30Lm_7Qo4-j7JeEiTmhwsQ.png" /></figure><p>I added a new column to get the order processing time by subtracting order_approved_at from order_purchase_timestamp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*t4xPglTEn-LPwYWOL7aynA.png" /></figure><p>Another column to get the time of shipping to carrier and delivery time by subtracting <em>order_delivered_carrier_date</em> from <em>order_approved_at</em> and <em>order_delivered_customer_date</em> from <em>order_delivered_carrier_date </em>respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/257/1*qn3lt4YNtiMq4yQR6yzXuA.png" /></figure><p>After getting the required measures and columns, I added cards that will show the number of late deliveries, late seller dispatch, average order processing time (in hours), average shipping to the carrier (in days), and average delivery time (in days).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gDv5F5eAa5pIdMX6ZPlyLw.png" /></figure><p>I also inserted a map chart to show the volume of orders in Brazil with legends by order status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*S7fUW30tskINtwN8xl1Q6g.png" /></figure><p>I created slicers to filter categories, states, order statuses, and dates by year, quarter, and month with a button to clear all filters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/215/1*JdnASR5JM0421M89EwYf1g.png" /></figure><p><strong>Quality Dashboard</strong></p><p>For the product quality dashboard, I inserted cards to show the total reviews, the number of bad reviews, and the number of 5-star and 1-star reviews. In getting the number of bad reviews, I just set the filter to show 3 stars below reviews.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*36Se4r0eu84KtsRwJ7679Q.png" /></figure><p>Next, I added a ribbon chart to show total orders and reviews by date.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*C9TufP3itM5Je_yyrWhhdw.png" /><figcaption>Total orders and reviews by Year</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*wFxygrH9yaiuy1PwSB39XA.png" /><figcaption>Total orders and reviews by Year and Quarter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*3SmaaeKh4qwOfBjimytokg.png" /><figcaption>Total orders and reviews by Year, Quarter, and Month</figcaption></figure><p>Next, I added a bar chart to show the top 5 highest-rated products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*ATG6fkGuXvsNp4x7tQioaQ.png" /></figure><p>Also, the bottom 5 lowest-rated products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*eR-apN6ZstUtXEC_fM7zYA.png" /></figure><h3>Overview</h3><p><strong>Sales Dashboard</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JFiQCtLgH172f0JAPDMQuA.png" /></figure><p><strong>Logistics Dashboard</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aMttRynPEEw_xtXsf5XYcw.png" /></figure><p><strong>Quality Dashboard</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JdChELRE6TrKLQ8OZFfX4A.png" /></figure><h3>INSIGHTS</h3><p><strong>Olist </strong>has a delivery success rate of approximately <strong>85%.</strong> This may indicate that the company is facing some challenges with its delivery process, and it may be worthwhile to investigate the causes of the undelivered orders and take steps to improve the delivery success rate. Some potential areas to look into could include the efficiency of the company’s logistics and fulfillment processes, the reliability of its transportation partners, and any potential issues with the quality or accuracy of the orders being placed.</p><p>Olist company has a high level of customer satisfaction overall, with a significant number of positive reviews. However, the fact that the lowest-rated product category is “Security and Services” suggests that this type of product may need improvement.</p><h3>RECOMMENDATIONS</h3><ol><li>Monitor and analyze customer reviews regularly to identify trends and areas for improvement. This could involve using data analysis tools to identify common themes in customer feedback and using this information to make changes and improve the customer experience.</li><li>Investigate the causes of undelivered orders. This could involve analyzing the undelivered orders to identify common themes or factors that may be contributing to the problem. For example, are certain regions or customer demographics more likely to have undelivered orders? Are there particular products or types of orders that are more likely to be undelivered?</li><li>Communicate with customers about the delivery process. Olist should be transparent with customers about the delivery process and provide them with regular updates on the status of their orders. This will help to build trust and create a positive customer experience. It will also give customers the opportunity to provide feedback on their experiences with the delivery process, which can be used to identify areas for improvement.</li><li>Overall, the key is to continue providing high-quality products and services, while also being responsive to customer feedback and working to improve areas that may need attention. Also regularly monitor and review the delivery success rate and communicate with customers about the process.</li></ol><p><em>Check out the repository here:</em> <a href="https://github.com/neilangelomartinez/olist-ecommerce-analysis">https://github.com/neilangelomartinez/olist-ecommerce-analysis</a></p><p>Visit my website: <a href="https://bit.ly/neilmartinez">https://bit.ly/neilmartinez</a></p><p>BI Portfolio: <a href="https://bit.ly/neilmartinez-novypro">https://bit.ly/neilmartinez-novypro</a></p><p>Check out my other blogs: <a href="https://bit.ly/neilmartinez-medium">https://bit.ly/neilmartinez-medium</a></p><p>LinkedIn: <a href="https://bit.ly/neilmartinez-linkedin">https://bit.ly/neilmartinez-linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3ad7a640128" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Analysis of an Indian Delivery Company]]></title>
            <link>https://medium.com/@neilangelomartinez/data-analysis-of-an-indian-delivery-company-23e6a099668c?source=rss-336886035ef1------2</link>
            <guid isPermaLink="false">https://medium.com/p/23e6a099668c</guid>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Neil Angelo Martinez]]></dc:creator>
            <pubDate>Thu, 15 Dec 2022 03:08:23 GMT</pubDate>
            <atom:updated>2022-12-29T21:57:12.296Z</atom:updated>
            <content:encoded><![CDATA[<p>Calculating business metrics</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jUU_Ilx_Mal_c_-6Cu5AKA.png" /><figcaption>Interact with the dashboard here: <a href="https://www.novypro.com/project/india-delivery-statistics">https://www.novypro.com/project/india-delivery-statistics</a></figcaption></figure><p><strong>PROBLEM</strong></p><p>For this task, we will use a dataset from a delivery company operating in India. The delivered items can include entrees, sides, drinks, desserts, or grocery items and are typically delivered in boxes or bags. The deliverer will generally drive a car, but in bigger cities where homes and restaurants are closer together, they may use bikes or motorized scooters.</p><p>We need to build a dashboard showing how vehicle type, type of order, weather conditions, and road traffic affect the average time taken for delivery.</p><p>Calculate the following measures and add them to the dashboard:</p><p>a. the median time that is taken for delivery</p><p>b. average time for delivery for sunny and stormy weather</p><p>c. difference between the average delivery time of ordinary scooters and motorcycle</p><p>Also, we need to answer the following question:</p><p><strong><em>What would you suggest to the delivery company so they can collect better data and get more precise results?</em></strong></p><p><strong>METHODOLOGY</strong></p><p>All the data needed for this project can be accessed through this <a href="https://drive.google.com/file/d/1lJ8z4boUaTC2tXnFkaecUxTAbzz1Kflc/view">link</a>.</p><p><strong>Clean Data</strong></p><p>The first column to clean is the <em>Weatherconditions</em> column. I’ll just transform the column and then <strong>Extract using Text After Delimiter</strong> option.</p><p>Next, I’ll also extract the time in the <em>Time_taken(min)</em> column using Text after Delimiter as well. I also changed the <em>time_taken(min)</em> column to time data type.</p><p>The <em>Order_Date</em> and <em>Time_ordered</em> columns are in text data type so I’ll change them to date and time respectively.</p><p>After changing the data type of <em>Time_ordered </em>column, there are a lot of errors due to null empty values. I selected all cells and then right-click, then chose Remove Errors. For <em>type_of_vehicle</em> column, I replaced the values for <em>electric_scooter</em> to <em>electric scooter</em>.</p><p>Lastly, I deleted columns that are not important: <em>ID, delivery_person_ID, vehicle_condition, multiple_deliveries, </em>and <em>festival</em>. That’s it for our data cleaning for this dataset.</p><h3><strong>Analyze</strong></h3><p>I created new measures for KPI to show in my dashboard.</p><ul><li>Longest delivery</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*22dInHkgyXi4GoPe7FYEiQ.png" /></figure><ul><li>Median delivery</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*8EMmjG6wfujKYgHh_aAmRw.png" /></figure><ul><li>The highest number of orders in a day</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*imCU8rnjtDqDXbsabs4icA.png" /></figure><p>I created a column chart to show the average delivery time by day of the week.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*pE98SbrtcBXXQrSGSDxQbQ.png" /></figure><p>Another column chart shows the average delivery time by city.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*6Sl9I0WxXj56J-XkKyZSFQ.png" /></figure><p>I created a heat map showing customer locations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*Ooc95W4ZzrHzXCFr23u6kQ.png" /></figure><p>Lastly, two tables show the average delivery time by conditions and vehicle type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*zUxYYG1SY1Kzz8IS5Fkjew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*cRh1Ptpewm9o7UoB---IOQ.png" /></figure><p>For filters, I created three slicers for the type of order, vehicle type, and road traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*OZocPivuGmct0e-MiC6BHg.png" /></figure><p>The final dashboard looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HiElwOEuSrWSO2eQWLtS5Q.png" /></figure><h3>RECOMMENDATION</h3><p><em>As a data analyst, what would you suggest to the delivery company so they can collect better data and get more precise results?</em></p><p>As a data analyst, I would suggest the delivery company implement a system for collecting and storing data in a structured manner. This could include using a database or data warehouse to store information such as delivery times, distances, customer feedback, and any other relevant data. I would also recommend implementing processes and procedures for regularly collecting and updating this data, as well as regularly reviewing and cleaning the data to ensure its accuracy and completeness. Additionally, I would suggest implementing metrics and key performance indicators (KPIs) to track the company’s performance and identify areas for improvement. This could include metrics such as on-time delivery rate, customer satisfaction, and average delivery distance. By regularly tracking and analyzing these metrics, the company can gain insights into its operations and make data-driven decisions to improve its performance.</p><p><em>Check out the repository here:</em></p><p><a href="https://github.com/neilangelomartinez/india-delivery-metrics">GitHub - neilangelomartinez/india-delivery-metrics: Data Analysis of an Indian Delivery Company</a></p><p>Visit my website: <a href="https://bit.ly/neilmartinez">https://bit.ly/neilmartinez</a></p><p>BI Portfolio: <a href="https://bit.ly/neilmartinez-novypro">https://bit.ly/neilmartinez-novypro</a></p><p>Check out my other blogs: <a href="https://bit.ly/neilmartinez-medium">https://bit.ly/neilmartinez-medium</a></p><p>LinkedIn: <a href="https://bit.ly/neilmartinez-linkedin">https://bit.ly/neilmartinez-linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23e6a099668c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Call Centre Trends: Visualising customer and agent behavior]]></title>
            <link>https://medium.com/@neilangelomartinez/call-centre-trends-visualising-customer-and-agent-behavior-778785d2eeb0?source=rss-336886035ef1------2</link>
            <guid isPermaLink="false">https://medium.com/p/778785d2eeb0</guid>
            <category><![CDATA[power-bi]]></category>
            <dc:creator><![CDATA[Neil Angelo Martinez]]></dc:creator>
            <pubDate>Thu, 15 Dec 2022 01:41:59 GMT</pubDate>
            <atom:updated>2022-12-29T21:56:31.693Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A Case Study from PwC Switzerland: Power BI Virtual Experience</em></p><p>Interact with the dashboard here: <a href="https://www.novypro.com/project/callcentertrendspwcpowerbi">https://www.novypro.com/project/callcentertrendspwcpowerbi</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*AcLFtVmUYqv-NUod5TTMyw.png" /></figure><p>The digital revolution and our fast-changing world require a skills revolution. And it’s not just about digital skills. The skills revolution is about helping people build their digital awareness, emotional intelligence, and creativity to fully participate in the digital future workplace</p><h3>TASK</h3><p>It’s omnipresent: telecom marketing. Better price here. Better service there. Best for small businesses here. Best for young urbanites there. But what do customers really want? Our client, a big telecom company needs to know. This email just arrived for you:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_mBxbEkWE0HA3tYP.png" /></figure><p>Create a dashboard in Power BI for Claire that reflects all relevant Key Performance Indicators (KPIs) and metrics in the dataset. Get creative!</p><p><strong>Possible KPIs include (to get you started, but not limited to):</strong></p><ul><li>Overall customer satisfaction</li><li>Overall calls answered/abandoned</li><li>Calls by time</li><li>The average speed of answer</li><li>Agent’s performance quadrant -&gt; average handle time (talk duration) vs calls answered</li></ul><h3>PROCESS</h3><p>First, import the data to Power BI. Before we load the data, we need to make sure that the data is clean. Click Transform Data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*W70I2oBNl3ffUhPPZJQcyw.png" /></figure><p>I noticed that there are a lot of null values for the <em>speed of answer in the second’s </em>column, so I filtered to only show the null values and observed the data. As I can see in the filtered data, all calls were not answered therefore having null values for the average talk duration is valid. I didn’t change the null values to 0 because if the agent failed to answer the call, then there shouldn’t be any values for average talk duration and satisfaction rating. Making it zero will affect their KPI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*Z29uuDWElRf0R5nCRZgXMQ.png" /></figure><p>I noticed the <em>AvgTalkDuration</em> column is in Date/Time format which should be in duration. Change the data type to Time only, and then I added a new custom column and then subtracted the <em>AvgTalkDuration</em> column by 00:00:00.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*8_4iBOi_0ignyYqKMuTnAw.png" /></figure><p>I renamed the new column to <em>Average Talk Duration</em> and changed the data type to duration and then show only seconds. The time column has date values in it, so I changed the data type to Time only.</p><h3>ANALYZE</h3><p>I have created measures to answer the questions and provide the following KPIs:</p><ul><li>Positive Satisfaction Rating</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-lW27fsaEaTTvJWglFlRKQ.png" /></figure><ul><li>Number of Satisfaction Rating</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*kitZddnf_yarCVA0-y0AvA.png" /></figure><ul><li>Total Calls Answered</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*ae77HpzXThgl_C6UKwnEZg.png" /></figure><ul><li>Total Calls Abandoned</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*DtnDbdin46jql-GYPClazQ.png" /></figure><ul><li>Overall Customer Satisfaction</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*Oq9xSUTG8BEy5f67GKqCOg.png" /></figure><ul><li>Overall calls answered/abandoned</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*P-nhGObpmjgEuU8nka7sXw.png" /></figure><ul><li>Average speed of Answer</li></ul><p>I inserted a card and then added the <em>speed of the answer in the seconds </em>column and then chose the average.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*QDLLvZ_hPGztTNkVzurvEw.png" /></figure><p>After getting all the required measures, I added cards in my dashboard to show all the KPIs at the top.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ifUx04E1Y7N9n3hTAlhhBA.png" /></figure><p>Next, I created a bar chart to show the average talk duration of agents. Dan has the longest talk duration and Greg is the fastest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*dQKEoK2Zka5qQB103bPv_w.png" /></figure><p>Then, I created a column chart that shows the average resolved calls per day of the week. It shows that every Monday and Saturday, agents have higher resolved calls than the rest of the day of the week.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*Qtc0c0HNlOmpqM4LBRcjsg.png" /></figure><p>To summarize all the stats of the agents, I decided to insert a table that will show their total calls, answered calls, abandoned calls, resolved calls, unresolved calls, and satisfaction ratings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*d5oPCxAkkygQo4SACK2pIQ.png" /></figure><p>The last visualization is a treemap showing all the call topics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*vYdTwA9rTKdhOyXL1UPEUA.png" /></figure><p>Finally, I designed the dashboard and created the background using PowerPoint. Here is the final result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_vP6TBVgpQBqwdOSGbA3fg.png" /></figure><h3>INSIGHTS</h3><p>Based on the analysis, it appears that this call center has a relatively high rate of abandoned calls and a low overall satisfaction rating. This suggests that there may be issues with the call center’s ability to handle the volume of calls it receives, as well as potential problems with the quality of service provided to customers. Improving the call center’s answer rate and average response time, as well as increasing customer satisfaction, may be necessary to ensure the success of the business.</p><h3>RECOMMENDATIONS</h3><ol><li>Identify and address the root cause of the high rate of abandoned calls. This could be due to a variety of factors, such as long wait times, complicated issues, or a lack of available agents. Once the underlying issue has been identified, steps can be taken to improve the call center’s performance.</li><li>Increase the number of available agents to handle the volume of calls. This could involve hiring additional agents, implementing a system for routing calls to multiple call centers, or utilizing technology such as virtual agents or chatbots to assist with customer inquiries.</li><li>Improve the call center’s average response time. This could be achieved through training and coaching for agents, implementing more efficient processes and technologies, or increasing the number of available agents to reduce wait times for customers.</li><li>Focus on increasing customer satisfaction. This could involve regularly surveying customers to gather feedback and identify areas for improvement, implementing customer service best practices, and providing ongoing training and support for call center agents.</li><li>Consider implementing a call-back system for abandoned calls. This could allow customers who are unable to wait on hold to leave their contact information and request a call back at a more convenient time. This could help to reduce the number of abandoned calls and improve the overall customer experience.</li></ol><p><em>Check out the repository here:</em></p><p><a href="https://github.com/neilangelomartinez/call-center-trends-pwc-power-bi">GitHub - neilangelomartinez/call-center-trends-pwc-power-bi: A Case Study from PwC Switzerland: Power BI Virtual Experience</a></p><p>Visit my website: <a href="https://bit.ly/neilmartinez">https://bit.ly/neilmartinez</a></p><p>BI Portfolio: <a href="https://bit.ly/neilmartinez-novypro">https://bit.ly/neilmartinez-novypro</a></p><p>Check out my other blogs: <a href="https://bit.ly/neilmartinez-medium">https://bit.ly/neilmartinez-medium</a></p><p>LinkedIn: <a href="https://bit.ly/neilmartinez-linkedin">https://bit.ly/neilmartinez-linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=778785d2eeb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Yellevate Invoice Disputes]]></title>
            <link>https://medium.com/@neilangelomartinez/yellevate-invoice-disputes-a112d0c94a5e?source=rss-336886035ef1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a112d0c94a5e</guid>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[refocus]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Neil Angelo Martinez]]></dc:creator>
            <pubDate>Thu, 15 Dec 2022 00:33:11 GMT</pubDate>
            <atom:updated>2023-05-04T13:39:40.058Z</atom:updated>
            <content:encoded><![CDATA[<h3>Elevating Yellevate</h3><blockquote>This is a group project assignment at Refocus Digital Academy.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*-WAaittNfnfhvNzUWLe4_A.png" /></figure><h3><strong>INTRODUCTION</strong></h3><p>For the past few years, Yellevate has been struggling with client disputes. Yellevate defines disputes as clients expressing dissatisfaction with the company’s services and refusing to pay for them. The team will be following Google’s five phases of data analysis: ask, prepare, process, analyze, and share.</p><h3>ASK</h3><p>Statistically, approximately 20% of the Yellevate conflicts resulted in a payment opt-out. This has resulted in a 5% annual revenue loss (in USD). Management has now asked the data analyst team to assist in resolving the problem. The team must identify the reasons for these issues using data gathered by the company and devise practical methods to resolve them.</p><p>Executives at the company decided that the following information should be obtained to identify the circumstances around the dispute problem:</p><ol><li>The processing time in which invoices are settled (average # of days rounded to a whole number).</li><li>The processing time for the company to settle disputes (average # of days rounded to a whole number).</li><li>Percentage of disputes received by the company that was lost (within two decimal places).</li><li>Percentage of revenue lost from disputes (within two decimal places)</li><li>The country where the company reached the highest losses from lost disputes (in USD).</li></ol><h3><strong>PREPARE</strong></h3><h4>ROCCC Analysis:</h4><p>Reliable — The data has been made available by Refocus specifically for this project</p><p>Original — Subject to the terms and conditions of the Data License Agreement by Yellevate.</p><p>Comprehensive — A data dictionary has been provided</p><p>Current — The latest data is 2022.</p><p>Cited — All the data needed for this project can be accessed through this <a href="https://drive.google.com/file/d/1DXOaFAFF1Rqic1PWXvABxgCS4o1gYgxG/view">link</a>.</p><h3>PROCESS</h3><p>The program that we used for data cleaning is pgAdmin 4 using PostgreSQL. The first thing to do was to create a new database and create a new table. To create a new table, the code is the ff:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*A5Lkxo3SRF4fK1LrL12ywA.png" /></figure><p>Next is to import the dataset in pgAdmin. On the left side panel, right-click on the table that was created earlier, and then select Import/Export Data…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*-T4EaVZeaWEFmAbUKV3CaA.png" /></figure><p>Click on the folder icon to locate the file that needs to be imported. The format should be CSV and the encoding is UTF8. Hit OK to import the CSV file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*c4vQnPXBfVDlSNrKE7MmRg.png" /></figure><h3>CLEAN DATA</h3><p>According to the data dictionary, the <em>disputed</em> field has a 0 or 1 value. “1” signifies the customer disputed the invoice; “0” means they did not. When this table is provided to clients, they must understand what the numbers 0 and 1 signify. The team has added a new column that will display Disputed or Not Disputed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*oIC_5u-HDV7ZrFUvOcHlRA.png" /></figure><p>The same goes with the <em>dispute_lost</em> column, “1” means Yellevate lost the dispute and the dispute was resolved in favor of the customer, and the customer does not have to pay the invoice; “0” means the customer did not win the dispute, and they are legally required to pay the full invoice amount, it either means that Yellevate won the dispute, or there was no dispute in the first place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*AC0YZkuwqW6hFGo0PXNS3Q.png" /></figure><p>Lastly, a new column named <em>settlement</em> has been added to distinguish disputes that have been settled on time or settled late.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*mgOJUYxrYhoInXt95axoxQ.png" /></figure><p>The country column is the one that can be checked for inconsistencies. We can see all of the countries listed by using the DISTINCT function. There are just five distinct countries after running the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*N_quT2-2AhSi6SUnv-H-mQ.png" /></figure><h3>FINDINGS</h3><p>Russia has the longest average processing time of 29 days, which is 22.81% longer than China, which has the shortest data of 23 days. Furthermore, the average processing time for the entire dataset is 26 days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*jfhe1VJJk5-bCh_8fmXx_A.png" /></figure><p>Russia has the highest average processing time of 5 days, which is 2.5 times faster than China, which has an average processing time of 2 days. Furthermore, the average processing time for the five countries is three days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*jNh1SZNW0JbD-aB8WaP4JQ.png" /></figure><p>France has the highest percentage of lost disputes at 34.23% which is 9 times higher than the United States which only has 3.75% lost disputes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*hxd9-lNnNGIet0rv4Q-E3A.png" /></figure><p>France has the highest percentage of revenue lost from disputes at 13.35% which is 15 times higher than the United States which only has 0.84% lost disputes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*Qm4fhe0CAz6QVkn3K2kIbg.png" /></figure><p>Because France has the highest rate of lost disputes, the country with the biggest losses from lost disputes should be France.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*7pr-DkDZqaxlqZrnziMJgQ.png" /></figure><p>Customers filed a dispute with Yellevate because they expected a pandemic exception in their contract but were not given one. As a result, they decided not to pay their invoices or file a dispute. They believe that because of natural disasters, every company should make an exception for their customers.</p><p>Consider that the invoice dates occurred during the pandemic, which meant that employees were adjusting to their workforce. Furthermore, the lack of documentation from both parties and the lack of communication caused the dispute to arise.</p><p>Aside from the invoices being settled late, there is no visibility into why they were late and why the invoices were being disputed. It is suggested that we include more information in the dataset, such as the cause for the delay and why it is disputed.</p><p>With it, we can get a better understanding of the issue at hand and take the required steps to resolve it. For the time being, since the only ground for a dispute is “Late Settlement,” we can ask the client how the settlement is progressing.</p><h3>RECOMMENDATIONS</h3><p>Yellevate and its customers must have open communication with each other especially if one party wants to change the contract.</p><p>Have a discussion with the customers and offer them freebies such as discounts on future service requests in exchange for not opting out of their payment in order to reduce revenue loss.</p><p><strong>Here’s an overview of the insights and visualizations we made:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o6GG6-vlt0-rTwpY1QG_fw.png" /></figure><p>Visit my website: <a href="https://bit.ly/neilmartinez">https://bit.ly/neilmartinez</a></p><p>BI Portfolio: <a href="https://bit.ly/neilmartinez-novypro">https://bit.ly/neilmartinez-novypro</a></p><p>Check out my other blogs: <a href="https://bit.ly/neilmartinez-medium">https://bit.ly/neilmartinez-medium</a></p><p>LinkedIn: <a href="https://bit.ly/neilmartinez-linkedin">https://bit.ly/neilmartinez-linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a112d0c94a5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>