<?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 Vincent Junitio Ungu on Medium]]></title>
        <description><![CDATA[Stories by Vincent Junitio Ungu on Medium]]></description>
        <link>https://medium.com/@vincentjunitio?source=rss-adfdc98485a6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wa5GUq84ijxnJTE1gQdQQQ.png</url>
            <title>Stories by Vincent Junitio Ungu on Medium</title>
            <link>https://medium.com/@vincentjunitio?source=rss-adfdc98485a6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 22:02:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vincentjunitio/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[Estimate Your BigQuery Storage Cost]]></title>
            <link>https://medium.com/bliblidotcom-techblog/estimate-your-bigquery-storage-cost-7c4db0402d78?source=rss-adfdc98485a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c4db0402d78</guid>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[storage]]></category>
            <category><![CDATA[cost-savings]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Vincent Junitio Ungu]]></dc:creator>
            <pubDate>Tue, 13 Jun 2023 02:36:43 GMT</pubDate>
            <atom:updated>2023-06-14T08:00:33.867Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you been using BigQuery as a data warehouse to retrieve data using Structured Query Language (SQL)?</p><p>Its flexibility has made me use BigQuery both in my professional working field and for the personal necessity for about 1 year now. In this article, I am going to talk about the BigQuery cost, specifically the storage cost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f0jUP-k31qjKAzZC" /><figcaption>Photo by <a href="https://unsplash.com/@alexandermils?utm_source=medium&amp;utm_medium=referral">Alexander Mils</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In BigQuery, there is a cost for running a query. Google has announced there will be changes to the BigQuery pricing model in July 2023. As of 6 June 2023, there are two pricing models:<br><strong>1. On-demand pricing</strong>: You pay for what you have used. If you process 5 TB of data, you must pay the price for running 5 TB.<br><strong>2. Slot commitment pricing</strong>: You reserve a specific compute capacity (slot) and you pay for this slot price. If you book a certain amount of slots and run 5 TB of data, you don’t exactly pay the price of running 5 TB of data.</p><blockquote><strong>Note:</strong> BigQuery offers free of charge for processing the first 1 TB for each month.</blockquote><p>As data analysts, we are expected to write the most efficient SQL query. If the query has efficiently generated the output, it can lead to less processing size than an inefficient query. Hence, the less price you have to pay if you are using the on-demand pricing or less slot consumption if you are using the slot commitment pricing model.</p><p>However, there is another cost charged in BigQuery, which is the <strong>storage cost</strong>. The <strong>BigQuery storage cost</strong> is charged to save or keep the data in BigQuery.</p><p>There are two types of storage:<br>1. <strong>Logical storage</strong>: The storage size is derived from the calculation of each data type of the table’s columns. This is the default storage type used in BigQuery.<br>2. <strong>Physical storage</strong>: The storage size is derived from the calculation after the data is compressed and stored on disk.</p><p>For each type of storage, it applies two pricing models:<br>1. <strong>Active</strong>: When your data is being modified in the last 90 days.<br>2. <strong>Long-term</strong>: When your data hasn’t been modified in the last 90 days (consecutively).</p><blockquote><strong>Note: </strong>BigQuery offers free of charge for the first 10 GB of storage for each month.</blockquote><p>Retrieved on 6 June 2023, the storage price in the <strong><em>‘us’</em></strong> region is as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NoMGv0OAM5ghvMATpxgMfw.png" /><figcaption>Storage cost in the ‘us’ region (Source: <a href="https://cloud.google.com/bigquery/pricing#storage">Google Documentation</a>)</figcaption></figure><p>The storage price varies based on the region. For example, in ‘asia-southeast2’, the active logical storage price is $0.023 per GB per month.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SwBP8ZRyzgqMPQ0lQM7V_g.png" /><figcaption>Storage cost in the ‘asia-southeast2’ region (Source: <a href="https://cloud.google.com/bigquery/pricing#storage">Google Documentation</a>)</figcaption></figure><h3>Calculate your storage cost</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SLnqJUtvFt2dQ3oTrLbDDA.png" /><figcaption>Sample table from Google bigquery-public-data project in BigQuery</figcaption></figure><p>In the scenario above, there are long term logical bytes and long term physical bytes. Moreover, there is also a time travel physical bytes at the lowest section of the Storage info. Time travel physical bytes are calculated as physical bytes. Let’s calculate both of them below.</p><p><strong><em>Long term logical bytes</em></strong><em> = 345.73 GB * $0.01 (per GB / month) = </em><strong><em>$3.4573 / month</em></strong></p><p><strong><em>Long term + Time travel physical bytes</em></strong><em> = 54.57 GB * $0.02 (per GB / month) + 0 = </em><strong><em>$1.0914 / month</em></strong></p><p>The next question might be: Do you need to pay the sum of logical and physical bytes? <strong>The answer is no</strong>. BigQuery only charges the cost of either logical or physical bytes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EKE6352jKewrO3qFVqcjNw.png" /><figcaption>Sample table from Google bigquery-public-data project in BigQuery</figcaption></figure><p>Here’s another scenario. Let’s calculate the cost below.</p><p><strong><em>Long term logical bytes</em></strong><em> = 18.38 MB / 1024 (per GB) * $0.01 (per GB / month) = </em><strong><em>$0.0001794921875 / month</em></strong></p><p><strong><em>Long term + Time travel physical bytes</em></strong><em> = 17.27 MB / 1024 (per GB) * $0.02 / GB / month + 0 = </em><strong><em>$0.0003373046875 / month</em></strong></p><p>Since the data size is small in the second scenario, the cost doesn’t look significant compared to the first one. The conclusion is that the cost paid depends on your <strong>data size</strong> and <strong>storage type</strong> (logical or physical). It doesn&#39;t always mean that logical storage costs less than physical storage costs.</p><h3>Calculate your storage cost with Google Cloud Pricing Calculator</h3><p>You can also calculate the BigQuery storage cost using the <a href="https://cloud.google.com/products/calculator">Google Cloud Pricing Calculator</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSmZFe4eQF76IIp349xqRA.png" /><figcaption>Google Cloud Pricing Calculator Interface (Source: <a href="https://cloud.google.com/products/calculator">Google Cloud Pricing Calculator</a>)</figcaption></figure><p>In the calculator above, I inserted the storage size in the first scenario. The calculator estimates the cost to be $3.36 / month, but the price calculated above is $3.4573 / month. This discrepancy occurs because I didn’t consider the free 10 GB. If I consider it, the calculation is as follows.</p><p><strong><em>Long term logical bytes</em></strong><em> = (345.73 GB - 10 GB)* $0.01 (per GB / month) = </em><strong><em>$3.3573 / month (rounded to $3.36)</em></strong></p><h3>Calculate your total storage size</h3><p>To view your total storage size (logical and physical), you can use the following query.</p><pre>SELECT<br>  SUM(active_logical_bytes) / power(1024, 3) AS total_active_logical_GiB,<br>  SUM(long_term_logical_bytes) / power(1024, 3) AS total_long_term_logical_GiB,<br>  SUM(active_physical_bytes) / power(1024, 3) AS total_active_physical_GiB,<br>  SUM(long_term_physical_bytes) / power(1024, 3) AS total_long_term_physical_GiB,<br>FROM<br>  `region-[INSERT_REGION_HERE]`.INFORMATION_SCHEMA.TABLE_STORAGE<br>;</pre><p>If you want to measure the storage size for each dataset, you can use the following query.</p><pre>SELECT<br>  table_schema AS dataset_name,<br>  SUM(active_logical_bytes) / power(1024, 3) AS total_active_logical_GiB,<br>  SUM(long_term_logical_bytes) / power(1024, 3) AS total_long_term_logical_GiB,<br>  SUM(active_physical_bytes) / power(1024, 3) AS total_active_physical_GiB,<br>  SUM(long_term_physical_bytes) / power(1024, 3) AS total_long_term_physical_GiB,<br>FROM<br>  `region-[INSERT_REGION_HERE]`.INFORMATION_SCHEMA.TABLE_STORAGE<br>GROUP BY<br>  1<br>;</pre><p>Remember to change the [INSERT_REGION_HERE] to your table region.</p><p>After retrieving your total logical bytes or physical bytes, you can estimate your storage cost using the calculations mentioned above.</p><p>You can also use the code prepared by the Google Team to calculate your storage size along with its price <a href="https://cloud.google.com/bigquery/docs/information-schema-table-storage#example_2">here</a>.</p><h3>Why is this important?</h3><p>When we are using a service, we want to make the best use of it. At the same time, we also expect to spend as little as possible. Since this article is about BigQuery, it is important to understand what costs there are in BigQuery. Comparing the storage cost to the processing cost, the number is not significant. However, understanding how we can reduce the storage cost plays a role in cost saving.</p><ol><li><strong>Understand active storage and long term storage work</strong>: Do you regularly update your data, especially using a scheduler? Have you made sure that you are updating the data that needs to be updated? Imagine that you only need to update/insert the latest data into a table. Instead, you are loading all the data from the previous dates until the latest one and inserting it into a table every day. This approach will lead you to have active storage for that table. Hence, you need to pay more when you actually don’t have to.</li><li><strong>Explore other options that offer less cost:</strong> For long term data that is less likely to be used at the current moment, but is still important to keep in storage rather than deleting/dropping it, you might consider other options that cost less than BigQuery&#39;s long term storage cost.</li></ol><p>I hope this article helps you to estimate your BigQuery cost so that you are aware of what you are paying for.</p><h4><strong>Acknowledge</strong></h4><p>Special shoutout to <a href="https://www.linkedin.com/in/yeremia-marcellius-toemali-9a66951b6/">Yeremia Marcellius Toemali</a> for helping me to explore this topic and <a href="https://www.linkedin.com/in/dennis-kastoni-22210212b/">Dennis Kastoni</a>, <a href="https://www.linkedin.com/in/jessica-banna/">Jessica Banna</a>, and <a href="https://www.linkedin.com/in/anelysepermana/">Anelyse Permana</a> for reviewing this article.</p><h4>Sources</h4><ol><li>BigQuery Pricing (<a href="https://cloud.google.com/bigquery/pricing#bigquery-pricing">https://cloud.google.com/bigquery/pricing#bigquery-pricing</a>)</li><li>FinOps: Four Ways to Reduce Your BigQuery Storage Cost (<a href="https://towardsdatascience.com/finops-four-ways-to-reduce-your-bigquery-storage-cost-82d99c47f139">https://towardsdatascience.com/finops-four-ways-to-reduce-your-bigquery-storage-cost-82d99c47f139</a>)</li><li>Google Cloud Pricing Calculator (<a href="https://cloud.google.com/products/calculator">https://cloud.google.com/products/calculator</a>)</li><li>Dataset Storage Billing Model (<a href="https://cloud.google.com/bigquery/docs/datasets-intro#dataset_storage_billing_models">https://cloud.google.com/bigquery/docs/datasets-intro#dataset_storage_billing_models</a>)</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c4db0402d78" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bliblidotcom-techblog/estimate-your-bigquery-storage-cost-7c4db0402d78">Estimate Your BigQuery Storage Cost</a> was originally published in <a href="https://medium.com/bliblidotcom-techblog">Blibli.com Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Journey from a “don’t-know-what-to-be” Student to Becoming a Data Analyst at Blibli.com]]></title>
            <link>https://medium.com/bliblidotcom-techblog/my-journey-from-a-dont-know-what-to-be-student-to-becoming-a-data-analyst-at-blibli-com-22f1ee5a5cfe?source=rss-adfdc98485a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/22f1ee5a5cfe</guid>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[personal-experience]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Vincent Junitio Ungu]]></dc:creator>
            <pubDate>Fri, 12 Aug 2022 11:48:02 GMT</pubDate>
            <atom:updated>2022-09-03T07:48:34.250Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DSxoSAafsRtpNIt4" /><figcaption>Photo by <a href="https://unsplash.com/@campaign_creators?utm_source=medium&amp;utm_medium=referral">Campaign Creators</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Hi!</h3><p>My name is Vincent. I recently graduated from one of the top universities in Indonesia, majoring in Computer Science. I write this post to share my personal experience of how I become a data analyst at one of Indonesia’s e-commerce companies, <a href="https://www.blibli.com/">Blibli.com</a>. Since this is just a personal experience and I believe everyone has their own story, I hope you can be motivated and inspired, as well as take the positive insights from my story.</p><h3>My background</h3><p>Before attending my university, I wasn’t exposed to coding or IT stuffs. Well, I used to join programming extracurriculars in my junior high school. I recalled that I wasn’t able to understand what “integer” was at that time HAHAHA. When I was in the last year of my senior high school, I knew that I would be choosing one of the universities in Indonesia, so I had been preparing for the Joint Entrance Selection of State Universities (or Indonesian students called it SBMPTN) exam although I hadn’t decided which major I would take. As a fun fact, I originally wanted to major in Architecture, but I decided to put Computer Science as the priority. Long short story, I took the exam and was accepted as a Computer Science student. Oh yes, my sweet and sour memory: I didn’t even dare to take a short nap because I was afraid of failing the exam, so I kept on studying until 11 PM every day, including weekends. Thanks a lot, it paid off.</p><h3>My first &amp; second year</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*letIhDI65z1MUmXB" /><figcaption>Photo by <a href="https://unsplash.com/@craftedbygc?utm_source=medium&amp;utm_medium=referral">Green Chameleon</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>All my courses were held under the Faculty of Mathematics and Natural Sciences. As someone who wasn’t exposed to programming at that time, I spent my time studying calculus. I love Calculus a lot. I used to spend an extra 1–2 hours a day reviewing the materials. One semester passed by, and I started to change my mind to focus more on coding. I noticed my friends were coding insanely and had showcased their projects to me. Uhm, I realized that investing my time to create project portfolios could help me receive an internship easier. I tried web designing (Frontend and UI/UX), web development, and competitive programming, but I wasn’t captivated. Then, I embarked on another journey which was learning data science. It took a while to get a grip on how data science workflow was supposed to be and what essential skills were needed in this field of study. At that time, my learning resources were Youtube videos and Google articles.</p><p>One day, I received a notification about an exclusive machine learning program, called <a href="https://grow.google/intl/id_id/bangkit/">Bangk!t Academy </a>— a soft-skill and hard-skill (focusing on machine learning, especially deep learning) led by Google, Gojek &amp; Tokopedia (GoTo), and Traveloka. It was the very first batch of the program. I remembered that one of my major’s colleagues also joined and we were considered to be the youngest students (in terms of the educational year, not by age) to receive the opportunity. We were in the same class as our seniors from various faculties and even master program students. It was an honor to be a part of the first batch and able to learn about deep learning from the amazing instructors. Today, Bangk!t Academy is part of Indonesia’s Kampus Merdeka program and has three learning paths — machine learning, mobile development, and cloud computing.</p><p>By the end of a semester, we usually had a short holiday. While other universities had almost two to three months of holiday, mine was about one to two months. It was pretty stressful to find a one-to-two-month internship because you would probably take the first month of your internship to get used to the systems, data, workflows, and environment. I also believed that I wasn’t skilled enough that my applications were rejected by several companies. So guess what? I didn’t land any internship until my third year, which was the fifth semester out of eight semesters in total. Something worse even happened, the pandemic forced my university to shift from offline learning to online learning.</p><h3>Third &amp; Fourth year — My Journey in Blibli’s FUTURE Program</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jxO5KjdsuVbqYZ5_" /><figcaption>Photo by <a href="https://unsplash.com/@joshuaearle?utm_source=medium&amp;utm_medium=referral">Joshua Earle</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>There was a moment when I began to question myself, “Am I sure to continue my journey in Data Science? Should I try another different role?”. One of my random colleagues shared a poster about <a href="https://www.blibli.com/page/future-program/">Blibli.com’s FUTURE Program</a>. It is a program that offers extensive learning by joining boot camps and tackling real-life projects. I thought it was a convincing program to boost my career, so I chose the Data Track (the program offers various tracks such as Mobile Development, Software Engineering, Software Engineering in Test, Infrastructure, Data, and Quality Assurance).</p><p>Data Track covers the field of data engineering, data analysis, and data science. I was exposed to data science more than data analysis. Even data engineering was the field of study that I wanted to avoid the most. Well, I gave it a try and submitted my application. I would not lie about how serious Blibli’s were, scanning the applications and sending the assessment tests. If I was not mistaken, the assessment tests consisted of Aptitude Test, Psychological Test, HR Interview, Technical Interview, and Forum Group Discussion. It was like applying for a scholarship application, but seriously I enjoyed and got to know my capabilities from those assessments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FzKTnCmp6SLzwhKc" /><figcaption>Photo by <a href="https://unsplash.com/es/@joshsorenson?utm_source=medium&amp;utm_medium=referral">Josh Sorenson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Tada! I passed the assessments and officially joined the program by the end of December 2020. I attended the soft-skill and hard-skill boot camps. When the boot camps ended, here we go… project. You can imagine the project as a combination of data engineering, data analysis, and data science. I will explain it in more detail below. Each of the members in my track was given a chance to request a mentoring session from a Data Engineer, Data Analyst, and Data Scientist (of course from Blibli’s). It was a nightmare because I had the mindset of “avoiding” data engineering the most, so it was pretty challenging for me to catch up at that moment.</p><p>The first project was analyzing e-commerce data.</p><ul><li>Data Engineering: Perform Extract-Transform-Load (ETL) to a database.</li><li>Data Analysis: Create five business questions and answer those questions with data visualizations.</li><li>Data Science: Train a supervised and an unsupervised learning model.</li></ul><p>This e-commerce data was not real data, however, it was mapped so that it looked like real data. If you are interested in the project, you can check it out here —<a href="https://medium.com/@vincentjunitio/blibli-future-program-batch-5-data-track-project-1-ae9ec20fe4b2"> FUTURE first project</a>.</p><p>After passing the first phase, the next was the second phase or the final phase. The boot camp’s materials especially the hard-skill courses were a bit complex but I managed to catch up after a couple of reviews. The second project was leveled up. This time, I was paired with one of my team members, and we dealt with real-life data.</p><p>The second project was analyzing text reviews on e-commerce apps.</p><ul><li>Data Engineering: Extract reviews from Google Play Store and Apple Store and Perform Extract-Transform-Load (ETL).</li><li>Data Analysis: Create an interactive dashboard to present the findings.</li><li>Data Science: Perform topic modeling to identify what topics are heavily mentioned in the text reviews.</li></ul><p>If you are interested in the project, you can check it out here — <a href="https://medium.com/@vincentjunitio/blibli-future-program-batch-5-data-track-phase-2-text-review-analysis-7fcf0476541a">FUTURE second project</a>.</p><p>During the completion of these projects, I struggled a lot. There were moments I wanted to give up, but I kept holding on. I was confused about what steps I should take on next, tons of hidden-to-my-eyes errors, tight deadlines, and much more. I was ashamed of asking too much to my mentors because I didn’t want to look “bad” in front of them. But hey, they were here to help so I gathered up the courage and asked for recommendations from them. What I appreciated the most was that they, as the mentors, were willing to prioritize the best practices and shared that before suggesting a workaround to solve my issues. I believed I remembered the best practices shared more than the issues that ruined my sleep.</p><p>As I was not only exposed to data science during the program, I began to fall in love with data analysis. I was amazed by how powerful data could be used to draw insights and answer questions to drive data-driven decision-making. Since the program had ended, I kept on enhancing my skills in SQL and visualizations.</p><p>Back to academic life, the day I finished my undergraduate thesis had come — it was deep learning research HAHA. I would say that even though my interest has shifted from data science to data analysis, I will never forget data science. I have even been attracted to deep dive regarding data engineering especially in extracting data from certain sources, transforming it into a suit-your-need format, and loading it into a database for further use. Thanks, Airflow, I love you. However, I managed to become a Data Analyst as my first professional working role at Blibli.com!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8FbPRs89FF1HvA-x" /><figcaption>Photo by <a href="https://unsplash.com/@neonbrand?utm_source=medium&amp;utm_medium=referral">Kenny Eliason</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Closing Statement</h3><p>Fieeww! That summed up my journey from a “don’t-know-what-to-be” student to becoming a Data Analyst. I would like to thank you for reading up to this point. Before I end this story, here are the key takeaways:</p><ol><li>Don’t be afraid to try. Sometimes we have been worrying too much about something that probably will not happen. You will always learn something new from the decisions you’ve made.</li><li>Environment matters. With whom you spend your journey together have an impact on your life. If you have supportive friends who share the same goals, create a group chat and keep in touch. Exchange useful information and help each other out.</li><li>Never give up until the end. To be honest, I can’t even imagine where I am now if I gave up on my ongoing project. Sometimes, we are just too tired to receive anything more which made us exhausted mentally and emotionally. Take a break, for example sleeping, playing pokemon games (I LOVE POKEMON), listening to BTS or Blackpink’s songs, swimming, reading, etc. Once you are feeling better, put your head up and go back on track. What if you are not feeling any better even after a break? I’ll seek help from someone :).</li><li>Seek help from someone. Some people prefer to keep everything themselves. I am not that kind of person. I have been reaching out to several people I believe are willing to listen to my story and provide meaningful feedback to me. If you don’t have someone in mind, you can find one on LinkedIn. Try to connect with that person and ask him/her if he/she is willing to free some time to listen to your concerns. I can also be your loyal listener so feel free to reach out on <a href="https://www.linkedin.com/in/vincent-junitio-ungu/">LinkedIn</a> :))))). Anyways, there are tons of online mentoring programs nowadays. You can find one here too.</li><li>Try something new a.k.a keep learning. The reason why I wanted to avoid data engineering at that time because I was never intended to become a data engineer. I gradually shifted (not completely) from a fixed mindset to a growth mindset. Having a growth mindset made me value all my efforts, even the smallest ones.</li><li>Always appreciate yourself. Don’t be too harsh on yourself. Enjoy what makes you happy and always do your best.</li></ol><p>That’s all I can share. I hope there is something positive you can implement in your daily life. I would like to apologize if you find anything disturbing or the use of unpleasing words. Also, don’t forget to check out <a href="https://careers.blibli.com/">Blibli.com’s Career Page</a> if you are interested in joining Blibli! Thank you and see you on the next posts :D.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22f1ee5a5cfe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bliblidotcom-techblog/my-journey-from-a-dont-know-what-to-be-student-to-becoming-a-data-analyst-at-blibli-com-22f1ee5a5cfe">My Journey from a “don’t-know-what-to-be” Student to Becoming a Data Analyst at Blibli.com</a> was originally published in <a href="https://medium.com/bliblidotcom-techblog">Blibli.com Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blibli FUTURE Program Batch 5 — Data Track Phase 2: Text Review Analysis]]></title>
            <link>https://medium.com/@vincentjunitio/blibli-future-program-batch-5-data-track-phase-2-text-review-analysis-7fcf0476541a?source=rss-adfdc98485a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fcf0476541a</guid>
            <category><![CDATA[text-analysis]]></category>
            <category><![CDATA[blibli]]></category>
            <category><![CDATA[future]]></category>
            <dc:creator><![CDATA[Vincent Junitio Ungu]]></dc:creator>
            <pubDate>Tue, 22 Feb 2022 14:05:36 GMT</pubDate>
            <atom:updated>2022-07-07T05:01:04.528Z</atom:updated>
            <content:encoded><![CDATA[<h3>E-commerce Text Review Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CuPr19qvqEdJ7THq" /><figcaption>Photo by <a href="https://unsplash.com/@markuswinkler?utm_source=medium&amp;utm_medium=referral">Markus Winkler</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In this post, I will share what my teammate, Joseph Eric Amadeo, and I have done on our second Blibli Future Program Data Track project. This project requires knowledge in Data Engineering, Data Analysis, and Data Science. Are you readyyyyy?!</p><h4>About the project</h4><p>In this project, we are required to extract reviews (comments) from Google Play Store and Apple Store. With these reviews, we will then create a dashboard and perform topic modeling using deep learning.</p><p>The reviews considered in this project are the top 10 e-commerce apps cited from <a href="https://selular.id/2021/11/top-10-marketplace-di-indonesia-q3-2021/">Selular.id</a>, which are <a href="https://www.tokopedia.com/">Tokopedia</a>, <a href="https://shopee.co.id/">Shopee</a>, <a href="https://www.bukalapak.com/">Bukalapak</a>, <a href="https://www.lazada.co.id/">Lazada</a>, <a href="https://www.blibli.com/">Blibli</a>, <a href="https://www.orami.co.id/">Orami</a>, <a href="https://www.ralali.com/">Ralali</a>, <a href="https://www.bhinneka.com/">Bhinneka</a>, <a href="https://www.jd.id/">JD.ID</a>, and <a href="https://www.zalora.co.id/">Zalora</a>.</p><h4><strong>Data Engineering</strong></h4><p>Please refer to this <a href="https://medium.com/@vincentjunitio/blibli-future-program-batch-5-data-track-project-2-60d2a7458c49">link</a> to view the data engineering explanation.</p><h4><strong>Data Analysis</strong></h4><p>Please refer to this <a href="https://medium.com/@vincentjunitio/blibli-future-program-batch-5-data-track-phase-2-data-analysis-591b85354ed4">link</a> to view the data analysis explanation.</p><h4>Data Science</h4><p>Please refer to this <a href="https://medium.com/@amadeo.eric/blibli-future-program-batch-5-data-track-phase-2-data-science-28a863e0daf4">link</a> to view the data science experiment.</p><h3>Acknowledge</h3><p>Being a part of the Blibli.com FUTURE Program has been one of the greatest experiences we had. From October 2021 up to today, February 2022, we have learned a lot from data extraction, data visualization, and topic modeling with deep learning. We would like to thank you for the never-ending support to our mentors, Kak <a href="https://www.linkedin.com/in/lianasianturi/">Liana Sianturi</a> as the data engineering mentor, Kak <a href="https://www.linkedin.com/in/hans-gustav/">Hans Gustav Otita</a> as the data analysis mentor, and Kak <a href="https://www.linkedin.com/in/ferdi-ghozali/">Ferdi Ghozali</a> as the data science mentor. I hope this writing can be used as your reference as well as to expand your knowledge regarding the data field. Should you have any questions, please feel free to reach me on my LinkedIn profile <a href="https://www.linkedin.com/in/vincent-junitio-ungu/">here</a> and <a href="http://amadeo.eric@gmail.com/">Eric’s</a>. Thanks a lot for your support by reading this post up to this section. Happy learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fcf0476541a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blibli Future Program Batch 5 — Data Track Phase 2: Data Analysis]]></title>
            <link>https://medium.com/@vincentjunitio/blibli-future-program-batch-5-data-track-phase-2-data-analysis-591b85354ed4?source=rss-adfdc98485a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/591b85354ed4</guid>
            <dc:creator><![CDATA[Vincent Junitio Ungu]]></dc:creator>
            <pubDate>Mon, 21 Feb 2022 15:49:12 GMT</pubDate>
            <atom:updated>2022-02-21T15:49:12.534Z</atom:updated>
            <content:encoded><![CDATA[<h3>Blibli Future Program Batch 5 — Data Track Phase 2: Data Analysis</h3><h3>About the project</h3><p>In this project, we are required to extract reviews (comments) from Google Play Store and Apple Store. With these reviews, we will then create a dashboard and perform topic modeling using deep learning.</p><p>The reviews considered in this project are the top 10 e-commerce apps cited from <a href="https://selular.id/2021/11/top-10-marketplace-di-indonesia-q3-2021/">Selular.id</a>, which are <a href="https://www.tokopedia.com/">Tokopedia</a>, <a href="https://shopee.co.id/">Shopee</a>, <a href="https://www.bukalapak.com/">Bukalapak</a>, <a href="https://www.lazada.co.id/">Lazada</a>, <a href="https://www.blibli.com/">Blibli</a>, <a href="https://www.orami.co.id/">Orami</a>, <a href="https://www.ralali.com/">Ralali</a>, <a href="https://www.bhinneka.com/">Bhinneka</a>, <a href="https://www.jd.id/">JD.ID</a>, and <a href="https://www.zalora.co.id/">Zalora</a>.</p><h4>Data Analysis</h4><p>In the previous post, we have extracted all the data from the source layer until the datamart layer. Now, let’s see what we can analyze with these data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J9waMDs8OoAj6jDGnsmLNw.png" /><figcaption>E-commerce App Reviews in Google Play Store Dashboard</figcaption></figure><p>We will go through the charts one by one. However, let’s see what is the problem statement, hypothesis, and constraints for this analysis.</p><h4><strong>Problem statement</strong></h4><p>Blibli.com has been one of Indonesia’s e-commerce marketplace for 10 years. Hence, the number of reviews written by its users is supposed to be a lot. Reviews might contain important information that reflects how the users’ experience while using this app. Therefore, the analysis of these reviews to draw insights is needed.</p><p>With this analysis, we will figure out how do Blibli.com users rate the Blibli.com application?</p><h4>Hypotheses</h4><p>We created three hypotheses to help with our analysis:<br>1. Blibli.com has average ratings greater than half of the top ten e-commerce apps.<br>2. The percentage of positive reviews is greater than negative reviews.<br>3. The number of reviews created is increasing each day.</p><h4>Constraints</h4><ol><li>Only data from the second half of 2021 is considered to compare the e-commerce apps. To analyze Blibli.com’s rating, a one-year data is available.</li><li>The source of the data is extracted from Google Play Store.</li></ol><p>In our database, we have a one-year review except for Shopee (started in May). This is the reason why we used the data from the second half of 2021 to compare the e-commerce apps.</p><h4><strong>Analysis</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*TeKsaQaUjYbRudjZuvSs_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*X5nJj9pjTqcPOt3JhNQNqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1cJaHGDD4iBm3XmQaqii2A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*wCQmReLb7Tq1zpCK5YSUfg.png" /></figure><p>First, we can see that there are 1,2 million reviews in the second half of 2021. Bukalapak, with a rating of 4.39, has been the e-commerce with the highest average rating. Blibli.com itself ranks eighth with an average rating of 3.99. This shows that our first hypothesis is rejected. How about the number of reviews per app? Shopee with a total of 647 thousand reviews, ranks first being the e-commerce with the highest number of reviews.</p><p>We have seen how Blibli.com is in terms of rating and number of reviews compared to other e-commerce apps. Next, let’s see how Blibli.com is performing for the entire 2021.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MjsM2petosbdS-5adZiHuw.png" /><figcaption>Blibli.com’s KPI in 2021</figcaption></figure><p>In 2021, Blibli.com has 16 thousand reviews, with 74.25% of positive reviews, 20.63% of negative reviews, and 5.12 % of neutral reviews. Since the percentage of positive reviews is greater than negative’s, our second hypothesis is accepted. Lastly, the percentage of reviews replied to is 97.18%. Wow! Almost all of the reviews have been replied by Blibli.com’s operators!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*_B4Wzj8FZWdWyJqpqRztmw.png" /><figcaption>App’s rating throughout the date</figcaption></figure><p>Next, we have a line chart that shows the average rating on the first day of 2021 versus the last day of 2021. Note that this average is a cumulative average, which means that the last day of 2021 averages all the reviews from January 1st until December 31st, 2021. Blibli.com has been dropping from 4.16 to 4.03.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rec-jzEeTwkjA4oRsI6B3A.png" /><figcaption>Total created reviews per day in 2021</figcaption></figure><p>We have another line chart, the total created reviews per day. Since the number of reviews created is not increasing smoothly each day, we can conclude that our third hypothesis is rejected. The highest number of reviews created is on December 7th and the lowest number of reviews created is on June 15th.</p><p>At this point, we would like to suggest that Blibli.com should think of a way to increase its number of reviews. Recall back to these charts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1cJaHGDD4iBm3XmQaqii2A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*wCQmReLb7Tq1zpCK5YSUfg.png" /></figure><p>By considering 8 thousand reviews, Blibli.com has an average rating of 3.99. If we compare the average rating from Shopee, Shopee achieves an average rating of 4.36 with a total review of 647 thousand reviews. With such a great amount of reviews, we are more confident that our app’s rating is in such a number. Blibli.com needs to gather more reviews to know what the average rating is. How can Blibli.com increase its number of reviews? Let’s see the reviews created date chart of Shopee.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nxzOSi-z3PYAGQYHxy_-TQ.png" /><figcaption>Shopee’s total created reviews per day</figcaption></figure><p>There is a sharp increment of reviews created from December 3rd until December 15. Specifically, it is on December 2nd and December 12th (12–12 — Double date). Another sharp increment of reviews created can be seen in the second week of November. Specifically, it is on November 11th (11–11 — Double date) and November 14th. There is a unique pattern here, in which the number of reviews created tends to increase when it is on the double date. Ok, Lazada has a great total of reviews too! Let’s see its total created reviews per day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HOAwOR7pIgeBmdhnULwkSA.png" /><figcaption>Lazada’s total created reviews per day</figcaption></figure><p>In here, we can more clearly see the sharp increment of reviews created date. It is on November 11th and December 12th — once again, a double date. There are a lot of promos during these unique dates. What if Blibli.com makes good use of these dates to gather reviews as much as possible? Perhaps, those who write a review on these dates will receive a point or voucher to purchase anything with a discounted price? Woo who hates discounts? However, a more thorough analysis should be performed to fully decide what is the best way to gather more reviews.</p><p>Up until this point, we have analyzed the total reviews, the percentage of positive, neutral, and negative reviews, the percentage of reviews replied, average rating in the second half of 2021, the average rating at the beginning versus the last day of 2021, and the number of reviews created each day. In short, we have just analyzed the characteristics of the sentiments/reviews. We haven’t known what topics the users are talking about? Is it about the promotion? Delivery fee? or application? No worries, because we are going to analyze the topics of the reviews in the Data Science section next! I hope you enjoy this analysis and see you in the next section ;D.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=591b85354ed4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blibli Future Program Batch 5 — Data Track: Project 2]]></title>
            <link>https://medium.com/@vincentjunitio/blibli-future-program-batch-5-data-track-project-2-60d2a7458c49?source=rss-adfdc98485a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/60d2a7458c49</guid>
            <dc:creator><![CDATA[Vincent Junitio Ungu]]></dc:creator>
            <pubDate>Fri, 18 Feb 2022 10:36:28 GMT</pubDate>
            <atom:updated>2022-02-23T00:23:17.178Z</atom:updated>
            <content:encoded><![CDATA[<h3>Blibli Future Program Batch 5 — Data Track Phase 2: Data Engineering</h3><h4><strong>About the project</strong></h4><p>In this project, we are required to extract reviews (comments) from Google Play Store and Apple Store. With these reviews, we will then create a dashboard and perform topic modeling using deep learning.</p><p>The reviews considered in this project are the top 10 e-commerce apps cited from <a href="https://selular.id/2021/11/top-10-marketplace-di-indonesia-q3-2021/">Selular.id</a>, which are <a href="https://www.tokopedia.com/">Tokopedia</a>, <a href="https://shopee.co.id/">Shopee</a>, <a href="https://www.bukalapak.com/">Bukalapak</a>, <a href="https://www.lazada.co.id/">Lazada</a>, <a href="https://www.blibli.com/">Blibli</a>, <a href="https://www.orami.co.id/">Orami</a>, <a href="https://www.ralali.com/">Ralali</a>, <a href="https://www.bhinneka.com/">Bhinneka</a>, <a href="https://www.jd.id/">JD.ID</a>, and <a href="https://www.zalora.co.id/">Zalora</a>.</p><h3>Data Engineering</h3><p>First, we created a data pipeline using Airflow 1.10.12 and Python 3.6 to scrap the review data. We used Docker to install and access the Airflow. The DockerFile can be accessed <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/Dockerfile">here</a> meanwhile the docker-compose.yml can be accessed <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/docker-compose.yml">here</a>. After creating the DockerFile and docker-compose.yml files, we created three bash scripts, <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/init.sh">init.sh</a>, <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/run.sh">run.sh</a>, and <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/destroy.sh">destroy.sh</a>.</p><blockquote>init.sh is used to initialize the Airflow within the Docker.<br>run.sh is used to run the Airflow.<br>destroy.sh is used to destroy the Airflow, usually when there is any update in the DockerFile.</blockquote><p>The flow to access the Airflow is as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/0*QMKm7jwwm1WiMi0L" /></figure><p>After the Airflow is accessible, we can start creating the Directed Acyclic Graph (DAG). We define our scraped data into four layers: source layer, staging layer, data warehouse layer, and data mart layer.</p><h3><strong>1. Source layer</strong></h3><p>This layer contains every review extracted from Google Play Store and Apple Store. In this layer, we left the review as real as it is.</p><h4>Scraping Google Play Store</h4><p>To scrap the Google Play Store reviews, the Python library, <strong>google_play_scraper</strong>, was used. In this library, the method, <strong>reviews_all()</strong>, is used to extract all reviews of an app from the Google Play Store. There is also another method, <strong>reviews()</strong>, which can be used to extract the reviews of certain conditions. We created a custom operator to implement these methods, <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/dags/operators/google_play_store_review_operator.py">google_play_store_review_operator.py</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c35f32c8d6058c1b2f1064efafd4597/href">https://medium.com/media/7c35f32c8d6058c1b2f1064efafd4597/href</a></iframe><p>The <strong>__extract_date()</strong> function is used to keep the data of/up to a certain date. The <strong>execute()</strong> function is used to execute the data extraction in this operator. If the job is a data migration job (is_migrate equals to <em>True</em>), the <strong>reviews_all()</strong> method will be used. On the other hand, if the job is a data extraction job (is_migrate equals to <em>False</em>), the <strong>reviews()</strong> method will be used. The <strong>reviews()</strong> method is slightly different from the <strong>reviews_all()</strong> method. Notice that there is a <strong>continuation_token</strong> in line 46 when we called the <strong>reviews()</strong> method. In Google Play Store, <a href="https://pypi.org/project/google-play-scraper/">the maximum number of reviews per page supported by Google Play is 200. Thus, it is designed to paginate and recrawl by 200 until the number of results reaches the count.</a> Therefore, we initially sorted the data by the newest (with the <strong>Sort</strong> method) and extract 200 reviews. If the last review’s date is still in the desired date, we scrap another 200 reviews until the last review’s date is not in the desired date<strong>. </strong>This scraping will continue its last scrap with the help of this <strong>continuation_token</strong>. When the scraping was completed, we saved the data in JSON format and keep it in our local directory. Then, we uploaded the JSON files (ten files for ten applications) into Google Cloud Storage and loaded them to Google BigQuery. The DAG scripts can be accessed here for the <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/dags/dag_playstore_migration.py">migration</a> job, and here for the <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/dags/dag_playstore_daily.py">extraction</a> job.</p><h4>Scraping Apple Store</h4><p>To scrape the Apple Store reviews, we used the RSS <a href="https://itunes.apple.com/id/rss/customerreviews/id=1034231507/page=1/sortby=mostrecent/json">link</a>. With the same concept as scraping the Google Play Store reviews, we extracted the reviews up to a certain date and kept the data for migration. However, the maximum number of reviews supported by this RSS is 500 reviews (total). Therefore, we extracted these reviews daily with the assumption that the reviews of an app will not exceed 500 per day. The daily data was extracted by filtering the reviews in which the date was in the desired date. We created a custom operator to implement the data extraction for Apple Store, <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/dags/operators/apple_store_review_operator.py">apple_store_review_operator.py</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e4bc2b59c7f412e09dc1fe0421e59207/href">https://medium.com/media/e4bc2b59c7f412e09dc1fe0421e59207/href</a></iframe><p>The <strong>__get_json()</strong> function will read the RSS link. The <strong>__get_reviews()</strong> function will extract all the reviews in the RSS link from page 1 to page 10 (with the maximum number of reviews per page being 50). The <strong>__extract_date()</strong> function is used to keep the data of/up to a certain date. The <strong>execute()</strong> function is used to execute the data extraction in this operator. When the scraping was completed, we saved the data in JSON format and keep it in our local directory. Then, we uploaded the JSON files (ten files for ten applications) into Google Cloud Storage and loaded them to Google BigQuery. The DAG scripts can be accessed here for the <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/dags/dag_appstore_migration.py">migration</a> job, and here for the <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/dags/dag_appstore_daily.py">extraction</a> job.</p><p>Since data migration is the process of storing data into a database as its initial data, the schedule for these data migration jobs is <em>@once. </em>For the data extraction jobs, the extraction is conducted daily at 12 AM (UTC) or 7 AM (GMT+7).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QrFhhHppnCZ0FVH3q-fq1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rB9gT_74TkfV8mL542qo5g.png" /><figcaption>The Graph View (Airflow) to extract, upload, and load reviews from Google Play Store and Apple Store into BigQuery.</figcaption></figure><p>To sum up the DAGs in the Source layer, four DAGs and two operators have been created to extract the reviews from Google Play Store and Apple Store.</p><h3><strong>2. Staging layer</strong></h3><p>In this layer, the freshly extracted data (in the Source layer) was combined and processed. We created three tables in the BigQuery for this layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*c5zO-4cIfg98r7dAIfGpLg.png" /><figcaption>Tables in Staging layer (BigQuery)</figcaption></figure><p>The first table is called staging_apple. In this layer, we combined those ten Apple reviews files (1 file per e-commerce) into a single table. The timestamp a user wrote a review was in UTC-7. Therefore, we converted it to UTC / GMT + 0 by adding 7 hours. We also added a new attribute <em>review_source</em> to tag that this table was the combination of all the reviews in the Apple Store. We also added a <em>dag_execution_timestamp</em> to denote the execution time for this task.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f3576c02c1346207f524152eb6d6c7d/href">https://medium.com/media/9f3576c02c1346207f524152eb6d6c7d/href</a></iframe><p>The second table is called staging_google. In this layer, we combined those ten Google Play reviews files into a single table. The timestamp of this review has been UTC so we left it as it was. We added <em>review_source</em> and <em>dag_execution_timestamp</em> just like staging_apple’s.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/342c45432803921e5b610a65ada7c6da/href">https://medium.com/media/342c45432803921e5b610a65ada7c6da/href</a></iframe><p>After both tables have been created, it is time to combine these two tables into one, we named it staging_reviews.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f8ccc09995b77eee23f218fd7474a0a/href">https://medium.com/media/9f8ccc09995b77eee23f218fd7474a0a/href</a></iframe><p>Let’s run through this code. We have two subqueries here, <em>all_reviews</em> and <em>ranked_reviews</em>. First, we matched the attributes&#39; names between Apple’s and Google’s, then we combined them with the UNION ALL operator and saved it into <em>all_reviews</em>. The second subquery, <em>ranked_reviews</em>, kept all the reviews from <em>all_reviews </em>and tagged the reviews based on the partition review_id ordered by its review timestamp in descending order (the review with the latest review timestamp will rank 1 within the same review_id). Finally, I selected the reviews with the rank 1 (latest) and joined them with the earliest review timestamp within a review_id (this was used to denote the date the review was created).</p><blockquote>Just in case the explanation above is not cleared enough, here’s an example.<br>Suppose that I wrote a review of an application in Google Play Store. The review_id was gp:001 with the review timestamp was 2022–02–01 01:00:00 UTC. On the next day, I edited my review on 2022–02–02 02:00:00 UTC. On the next day again, I edited my review on 2022–02–03 03:00:00 UTC.</blockquote><blockquote>In my database, the records would look like below.<br>review_id, review_timestamp<br>gp:001, 2022–02–01 01:00:00 UTC (first)<br>gp:001, 2022–02–02 02:00:00 UTC<br>gp:001, 2022–02–03 03:00:00 UTC (latest)</blockquote><blockquote>After the staging, my reviews would look like this. (Note that I only showed the attributes that related to date data since I processed these attributes to keep the unique review_id).<br>review_id, created_timestamp, updated_timestamp<br>gp:001, 2022–02–01 01:00:00 UTC, 2022–02–03 03:00:00 UTC</blockquote><p>This staging layer runs daily two hours after the source data had been extracted. To fully ensure that all the data had been extracted, we implemented ExternalSensor in the DAG. The DAG file can be accessed <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/dags/dag_staging_reviews.py">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6lrrWJRxLdKBkBCfxrugHw.png" /><figcaption>The Graph View for the staging layer</figcaption></figure><p>At this point, there was no duplicated review_id anymore. Thus, I continued to the next layer, which is the data warehouse layer.</p><h3><strong>3. Data warehouse layer</strong></h3><p>If you have ever heard of the Extract-Transform-Load (ETL) process, we did that in the staging layer. In this layer, we simply created the fact table and dimension tables by cherry-picking the related attributes from the table in the staging layer.</p><figure><img alt="Data warehouse Schema" src="https://cdn-images-1.medium.com/max/1024/1*L9NNzeV2f1i7q2pYpmGFUQ.png" /><figcaption>Data warehouse schema</figcaption></figure><p>The fact table is the main table. It contains numerical information (facts) as well as keys that connect to the dimension tables. Therefore, let’s start by creating dimension tables.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f699362e133216c836b65fa764718bb2/href">https://medium.com/media/f699362e133216c836b65fa764718bb2/href</a></iframe><p>To create dim_user, we selected the user_name and user_image from staging_reviews. Then, we created a surrogate key user_key by hash functioning the concatenation of user_name and user_image. Next, we have dim_app.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/af8bc4c9477378feb8c90919e4de6a33/href">https://medium.com/media/af8bc4c9477378feb8c90919e4de6a33/href</a></iframe><p>To create dim_app, we selected the app_name and review_created_version from staging_reviews. We created a surrogate key app_key by hash functioning the concatenation of app_name and review_created_version. Then, we have dim_review.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/289e90a1dcb566439a9e3aa8b13fb382/href">https://medium.com/media/289e90a1dcb566439a9e3aa8b13fb382/href</a></iframe><p>To create dim_review, we selected the review_id, content, reply_content, and review_source from staging_reviews. Since review_id has been unique, we simply made this key as its primary key, review_key.</p><p>The other two dimension tables, dim_time was created manually with Excel meanwhile the dim_date was created by using the format prepared by the <a href="https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/books/microsoft-data-warehouse-dw-toolkit/">Kimball Group</a>. We have covered all the dimension tables and of course, we have figured out all the keys for each dimension table. Now, let’s create the fact table.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/78c4a4ee5dd7c0ae5287f7735a970f01/href">https://medium.com/media/78c4a4ee5dd7c0ae5287f7735a970f01/href</a></iframe><p>In this table, we joined all the dimension tables to the staging_reviews table and selected the numerical information as well as the keys in each dimension table.</p><p>This DAG runs daily after the staging layer has been successfully executed. We also implemented ExternalSensor to ensure that the data was ready before creating the fact table and the dimension tables. The DAG can be accessed <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/dags/dag_datawarehouse_reviews.py">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TefFDxdtcTMb2srJvDEAjQ.png" /><figcaption>The Graph View for the data warehouse layer</figcaption></figure><p>Since we have created the fact table and the dimension tables, we extracted some attributes for dashboarding purposes and topic modeling purposes into a data mart.</p><h3><strong>4. Datamart layer</strong></h3><p>In this project, we created two data marts. The first data mart was to keep all the reviews from Google Play Store in 2021. The DAG can be accessed <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/dags/dag_datamart_all_reviews_google.py">here</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/99cafe20469b0c1bc3c8b6183acfe6d9/href">https://medium.com/media/99cafe20469b0c1bc3c8b6183acfe6d9/href</a></iframe><p>We joined the dim_user, dim_app, dim_date, and dim_time to the fact table and extracted some attributes for our dashboarding purposes. We filtered the data by selecting the source from Google and the date when the review was created was in 2021 (GMT+7). Since the date attribute was in UTC, we converted it to Asia/Jakarta (GMT+7) since we will be presenting this data in our timezone. We also added another attribute called polarity to mark which review has positive, negative, or neutral reviews by using the CASE WHEN operator. We kept this data into a table named datamart_all_reviews_google. This DAG runs daily but we stopped the job up to a certain date as the boundary date.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*24Foxmlo33q2TZNljZGpFQ.png" /><figcaption>The Graph View to create datamart_all_reviews_google</figcaption></figure><p>The second data mart was to keep all the reviews from 1st October 2020 until 1st October 2021 for topic modeling purposes. The DAG can be accessed <a href="https://github.com/vincentjunitio00/FUTURE-Project-2/blob/main/dags/dag_datamart_oct20_oct21.py">here</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5f94713144c43938db94d3dd178801bf/href">https://medium.com/media/5f94713144c43938db94d3dd178801bf/href</a></iframe><p>In this table, the main focus was the review content. Therefore, we extracted the content and some other attributes from the fact table and dimension tables. We filtered the data when the updated date (in GMT+7) was 1st October 2020 and October 2021. We kept this data into a table named datamart_oct20_oct21. This DAG runs daily but we stopped the job up to a certain date as the boundary date.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*flFNCw_qtps1iRU8xS3Z1Q.png" /><figcaption>The Graph View to create datamart_oct20_oct_21</figcaption></figure><p>Here is the end for the data engineering part. Whew, it’s a bit long but we still have the data analysis and data science part :) so let’s go.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60d2a7458c49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blibli Future Program Batch 5 — Data Track: Project 1]]></title>
            <link>https://medium.com/@vincentjunitio/blibli-future-program-batch-5-data-track-project-1-ae9ec20fe4b2?source=rss-adfdc98485a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae9ec20fe4b2</guid>
            <category><![CDATA[blibli]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Vincent Junitio Ungu]]></dc:creator>
            <pubDate>Thu, 19 Aug 2021 04:43:23 GMT</pubDate>
            <atom:updated>2022-07-07T04:59:26.672Z</atom:updated>
            <content:encoded><![CDATA[<h3>E-commerce Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_UXr2I7RRbd-J0IA" /><figcaption>Photo by <a href="https://unsplash.com/@kmuza?utm_source=medium&amp;utm_medium=referral">Carlos Muza</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In this post, I will share what I have done on my first Blibli Future Program Data Track project. This project requires knowledge in data engineering, data analysis, and data science. This might be a very long post but I hope you enjoy reading it as much as I enjoy tackling the challenges during the completion of this project.</p><h3>About the data</h3><p>The Blibli Data Team has prepared seven datasets. <strong>These datasets</strong> are e-commerce datasets but <strong>do not exactly</strong> come from <strong>Blibli’s databases</strong> (the Blibli Data Team made some changes to the original datasets) so let’s just assume that these datasets are Blibli’s. These datasets are as follows:</p><ol><li>user dataset: contains the buyers&#39; information in the e-commerce.</li><li>order dataset: contains the orders’ information in the e-commerce.</li><li>order item dataset: contains the items sales’ information in the e-commerce.</li><li>payment dataset: contains the payments’ information in the e-commerce.</li><li>products dataset: contains the products’ information in the e-commerce.</li><li>seller dataset: contains the sellers’ information in the e-commerce.</li><li>feedback dataset: contains the order reviews’ information in the e-commerce.</li></ol><p>Since I have introduced the datasets, it’s time to put them together.</p><h3><strong>Data Engineering</strong></h3><p>These datasets are loaded into the database. I use pgAdmin III (<a href="https://www.postgresql.org/">PostgreSQL</a> 9.5.24) and <a href="https://dbeaver.io/">dBeaver</a> Community Edition 7.3.3 as the database management tools. I do not assign any primary key yet because of the duplicated values in the datasets. Next, I create a data warehouse. To create a data warehouse, these datasets should be transformed into fact table(s) and dimension table(s), in which the process is known as ETL (Extract-Transform-Load).</p><ul><li>Fact table: contains the transaction sales information for each order item.</li><li>Dimension table: contains the descriptive attributes that describe the objects in the fact table.</li></ul><p>User dataset, products dataset, seller dataset, and feedback dataset are transformed into dimension tables since each dataset is describing the objects in the fact table (for instance: user dataset has a username, zip code, city, and state attributes in which these attributes are describing a user).</p><p>Meanwhile, the order dataset, order item dataset, and payment dataset are combined and transformed into a fact table since these datasets hold the fact of each order item transaction (the granularity is per order item, which means a single row in the fact table is describing the information of an order item within an order).</p><p>At this time, I have four dimension tables and one fact table. Some attributes in the fact table have date and time data types. Hence, I create two more dimension tables, date and time. The date dimension table is created by using the format prepared by the <a href="https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/books/microsoft-data-warehouse-dw-toolkit/">Kimball Group</a> and the time dimension table is created manually. These two dimension tables are also loaded into the database.</p><h4><strong>ETL Process</strong></h4><p>For the ETL process, I use <a href="https://www.talend.com/products/talend-open-studio/">Talend Open Studio</a> for Data Integration V 7.2.1. Most dimension tables are transformed similarly, so I will be showing only one of the processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yXZKx-wVbajxGYgpuRJ4cA.jpeg" /><figcaption>Transforming seller dataset into seller dimension</figcaption></figure><p>Talend is an amazing ETL tool. Recall that I have loaded all the datasets into my PostgreSQL database. I connect Talend to my PostgreSQL database and use tMap to map the attributes in my seller dataset into the seller dimension table (Dim_Seller). Talend also allows me to choose which attributes I want to transform at the ‘Query’ box. After mapping, I save the transformation into my PostgreSQL database back but in a different schema. I keep all my fact and dimension tables at the ‘datawarehouse’ schema (previously my original datasets are at ‘public’ schema).</p><blockquote>tMap can be used to determine which attributes to be mapped to the output (dimension table). Here, I map all my attributes to the output.</blockquote><p>For fact table, it is more complex. Recall that the fact table is the combination of order, order item, and payment datasets. Fact table also consists of keys that connect to the dimension tables (also known as foreign keys). Foreign keys refer to the primary key in dimension tables where these primary keys haven’t been declared before. I create a <a href="https://www.ibm.com/docs/en/ida/9.1?topic=keys-surrogate">surrogate key</a> (consists of the row number in the table) for each dimension table and make it the primary key.</p><p>The overall creation of the fact table process is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jHRAUT7gTLgLrqw9gKrZnQ.jpeg" /><figcaption>ETL process to create the fact table</figcaption></figure><p>In the end, I have six dimension tables and one fact table. After defining the relationship of each table, here’s how the star schema looks like (Note: ‘Fact_’ stands for fact table and ‘Dim_’ stands for dimension table).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*2e1wF-TnKHGLFKBNDCoBFA.png" /><figcaption>Star schema</figcaption></figure><h4><strong>Behind the ETL</strong></h4><p>I have explained how the ETL process looks like. Behind that, there are some issues and some additional information in which might need more explanation.</p><h4><strong>A. User dataset</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4t5n6ldN3I7p-haiA7DC4A.jpeg" /><figcaption>User dataset</figcaption></figure><p>There are several users/buyers with the same ‘user name’, ‘customer city’, and ‘customer state’, but have different ‘customer zip code’. Since a single row in the dimension table should describe a single entity, which here is to describe a single user, I keep the rows/records with the largest ‘customer zip code’ value. So for the example above, I will keep row 146 instead of row 147 (the rank column is to indicate which data is kept if the data is duplicated — rank 1 indicates to keep).</p><h4><strong>B. Feedback dataset</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zlx_ZsZREPE2WUovTRLB9Q.jpeg" /><figcaption>Feedback dataset</figcaption></figure><p>The feedback dataset has rows/records with the same ‘order id’ but has a different ‘feedback score’. I tackle these issues by only considering the latest ‘feedback answer date’. For the example above, I will keep row 467 instead of 468 since it has the latest ‘feedback answer date’ within the same ‘order id’. Perhaps the buyer changes his/her mind, who knows.</p><h4><strong>C. Order item dataset and order dataset</strong></h4><figure><img alt="Order item and order attributes" src="https://cdn-images-1.medium.com/max/481/1*MW8VjYvXTeTpd_QUFO-f0Q.jpeg" /><figcaption>Order item dataset and order dataset attributes</figcaption></figure><p>Both the order item dataset and order dataset have DateTime/timestamp data types (illustrated by a clock logo). Since the DateTime data type contains information about date and time, I split this data type into date and time. Then each of them is connected to the date and time dimension table for further analysis.</p><h4><strong>D. Time dimension table (Dim_Time)</strong></h4><figure><img alt="Time dimension attributes" src="https://cdn-images-1.medium.com/max/173/1*GUiccFIWMtAANspptMCpSw.jpeg" /><figcaption>Time dimension</figcaption></figure><p>In the time dimension table, I create boolean data types: ‘is morning’, ‘is noon’, ‘is afternoon’, ‘is night’, ‘is office hour’, ‘is breakfast time’, ‘is lunch time’, and ‘is dinner time’. These attributes play a huge role during the data analysis section (especially in the second business question).</p><p>Yes! That’s for the data engineering section, from preparing datasets to creating a data warehouse. Without further ado, let’s go to the data analysis section!</p><h3>Data Analysis</h3><p>For the data analysis section, I come up with five business questions:</p><ol><li>How to increase the blipay usage?</li><li>How to effectively choose time for the flash sale?</li><li>Which states need more sellers?</li><li>Which product category is recommended to new sellers resided in Java Island?</li><li>How to reduce the transaction cancelation rate?</li></ol><p>For creating data analysis visualizations, I use <a href="https://www.tableau.com/products/desktop/download">Tableau Desktop</a> 2021.1.</p><blockquote>If you are a student and would like to use Tableau Desktop for free, you can find the information <a href="https://www.tableau.com/academic/students">here</a>.</blockquote><h4><strong>First business question: How to increase the blipay usage?</strong></h4><p>— — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4><strong>A. Why this business question?</strong></h4><p>E-wallets have been used worldwide, Indonesia is no exception. Blibli has its own e-wallet, called blipay. Is blipay mostly used by Blibli’s users/buyers? If not, how to increase the blipay usage?</p><h4><strong>B. Hypotheses</strong></h4><ol><li>Blipay is the most used payment method.</li></ol><h4><strong>C. Assumptions</strong></h4><ol><li>There is no discount available before.</li></ol><h4><strong>D. Constraints</strong></h4><ol><li>Only delivered transactions are considered.</li></ol><h4><strong>E. Analysis</strong></h4><p>I start with calculating the percentage of transactions for each payment method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ScYih4Z-_d9YR0LW3-x4ZQ.jpeg" /><figcaption>The percentage of transactions for each payment method</figcaption></figure><p>From the chart above, I can tell that:</p><ol><li>The most used payment method is not blipay, but credit card.</li><li>Compared to credit card, the percentage of transactions with blipay is far lower than credit card’s.</li></ol><p>From point (1), my hypothesis has been <strong>rejected</strong>. Next, I want to find out why credit card is preferred rather than blipay — from point (2). The first question that crosses my mind is: <strong>Does blipay have a maximum limit fund?</strong> What I imagine here is that a buyer changes his/her payment method from blipay to credit card because the payment value is greater than blipay’s maximum limit. To answer this question, I compare the maximum price and maximum payment value of the credit card and blipay which transactions have been successfully delivered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*T_LyNbXwl_RNHymBtrOLSg.png" /><figcaption>The price comparison of credit card and blipay</figcaption></figure><p>The maximum price reached 6,7 million either by credit card or blipay. These two values don’t differ much so let’s focus on the maximum payment value. The maximum payment value of the delivered transactions with credit card reaches 13 million while blipay reaches only 7 million. These transactions’ information is as follows:</p><p>(i) Max. Payment Value: 13,664,080<br>Product Category: fixed telephony<br>Price: 1,680,000<br>Shipping cost: 28,010<br>Quantity: 8</p><p>(ii) Max. Payment Value: 7,274,880<br>Product Category: fixed telephony<br>Price: 1,790,000<br>Shipping cost: 28,720<br>Quantity: 4</p><p>Both transactions are paid directly with only one payment installment (pay all at once). Based on (i) and (ii), it is hard to conclude that the blipay limit is around 7 million. Perhaps, the user in the transaction (ii) uses blipay instead of credit card and so for the user on the transaction (i). Hence, I conclude that <strong>blipay might have a limit but in this case, limit is not the problem.</strong></p><p>Speaking of payment installment, a new question comes across: <strong>Does blipay offer payment installment?</strong> Some people might be interested in installments to avoid paying a huge cost at a time. Since the blipay competitor is credit card, I will be comparing these two payment methods again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cz47bD0_gRjI9dCrdC3EFw.jpeg" /><figcaption>Credit card installment count</figcaption></figure><p>There are buyers that use credit card choose to pay with one installment (pay directly during the checkout). However, others might also prefer to pay with more than one installment. If I compare the number of transactions with one payment installment towards the number of transactions with more than one payment installment, most Blibli buyers use the credit card because of the availability to pay with more than one payment installment (32.59%: 67.41%).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*8A-FxUAqIUUldqzYSSpojw.jpeg" /><figcaption>Blipay installment count</figcaption></figure><p>Now, let’s see the blipay installment count.</p><p>All blipay users choose one payment installment. In my opinion, it is not that they choose one payment, but there is no more than one payment installment option. Logically, buyers have to pay the exact amount of price when paying with an e-wallet.</p><p>On the other hand, some buyers might be interested in more than one installment. Therefore, <strong>what if blipay also offers payment installments</strong>? The payment value is divided into the number of installments the buyer decides during the checkout and it will automatically charge the blipay fund each month (for instance: two installments will charge the blipay this month and the next month). This method is also known as ‘pay later’.</p><p>I have recommended an idea to increase the blipay usage, but how many Blibli users have actually used blipay?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ibFaCYloXagrd0q3TQMExQ.jpeg" /><figcaption>The percentage of users for each payment method</figcaption></figure><p>Once again, the percentage of credit card users is much greater than blipay users. To get more attention, I highly recommend that <strong>new blipay users should receive special offers</strong> (everybody loves discounts!).</p><p>Lastly, are there any states that can be prioritized to promote the blipay usage? The answer is yes! Take a look at the map below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwhQ7VpnSsROGGOCTDrqXg.jpeg" /><figcaption>The map of Indonesia</figcaption></figure><p>The states colored in red are the prioritized states. These states have a purchase rate lower than the median of all states’ purchase rate. To calculate the purchase rate, I divide the total number of items sold in that state by the population within that state. The population data is downloaded from <a href="https://www.bps.go.id/publication/2019/07/04/daac1ba18cae1e90706ee58a/statistik-indonesia-2019.html">Pusat Badan Statistik</a> (page 124). In Sumatra Island: Aceh, Sumatera Utara, Riau, Jambi, Bengkulu, Sumatera Selatan, Kepulauan Bangka Belitung, and Lampung can be prioritized. In Java Island: Jawa Barat, Jawa Tengah, and Jawa Timur can be prioritized. In Kalimantan Island: Kalimantan Barat can be prioritized. In Sulawesi Island: Sulawesi Selatan and Sulawesi Tengah can be prioritized. In Lesser Sunda Island: Nusa Tenggara Barat and Nusa Tenggara Timur can be prioritized. In Maluku Island: Maluku can be prioritized.</p><h4><strong>F. Conclusions and Recommendations</strong></h4><p>After performing the data analysis on how to increase the blipay usage, I conclude that:</p><ol><li>Credit card has been the most used payment method instead of blipay.</li></ol><p>To increase the blipay usage, my recommendations are as follows:</p><ol><li>Allow blipay users to choose the number of payment installments (pay later).</li><li>Give special offers such as discounts to new blipay users.</li><li>Some states can be prioritized first to promote the blipay usages.</li></ol><ul><li>In Sumatra Island: Aceh, Sumatera Utara, Riau, Jambi, Bengkulu, Sumatera Selatan, Kepulauan Bangka Belitung, and Lampung can be prioritized.</li><li>In Java Island: Jawa Barat, Jawa Tengah, and Jawa Timur can be prioritized.</li><li>In Kalimantan Island: Kalimantan Barat can be prioritized.</li><li>In Sulawesi Island: Sulawesi Selatan and Sulawesi Tengah can be prioritized.</li><li>In Lesser Sunda Island: Nusa Tenggara Barat and Nusa Tenggara Timur can be prioritized.</li><li>In Maluku Island: Maluku can be prioritized.</li></ul><h4>Second business question: How to effectively choose time for the flash sale?</h4><p>— — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4><strong>A. Why this business question?</strong></h4><p>Flash sale is a promotion offered by sellers within a short period of time, in this case, at e-commerce. Sellers usually give discounts on their products to gain attention from buyers or perhaps they want to empty their stocks in a short amount of time. However, the sales of products might have a relation with time (for instance: people will less likely to check e-commerce in the early morning). Therefore, sellers need a strategy to decide what time is the best for them to offer the flash sale.</p><h4><strong>B. Hypotheses</strong></h4><ol><li>There are fewer items sold at breakfast, lunch, and dinner time.</li><li>There are fewer items sold during office hours.</li></ol><h4><strong>C. Assumptions</strong></h4><ol><li>During the flash sale period, sellers can only set the time for their flash sale once.</li><li>The time range is as follows:</li></ol><ul><li>Morning: 04:00 WIB —0 9:59 WIB</li><li>Noon: 10:00 WIB — 13:59 WIB</li><li>Afternoon: 14:00 WIB — 23:39 WIB</li><li>Night: 23:30 WIB — 03:59 WIB</li><li>Breakfast: 07:00 WIB — 08:59 WIB</li><li>Lunch: 12:30 WIB — 13:59 WIB</li><li>Dinner: 18:00 WIB — 20:59 WIB</li><li>Office hours: 08:00 WIB — 17:59 WIB</li></ul><h4><strong>D. Constraints</strong></h4><ol><li>Only shipped, approved, delivered, invoiced, and processing ‘order status’ are considered.</li></ol><h4><strong>E. Analysis</strong></h4><p>I have two hypotheses here. I start the first hypothesis analysis by calculating the percentage of items sold in the morning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DtfFYElm0S4fvHegCATSGQ.jpeg" /><figcaption>The percentage of items sold in the morning</figcaption></figure><p>The percentage of items sold in the morning does not exceed 10% of the total. How about the percentage of items sold at breakfast time?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9iJQvbvZdBvnEmngnG1SFQ.jpeg" /><figcaption>The percentage of items sold at breakfast time</figcaption></figure><p>The percentage of items sold at breakfast time is smaller than that not at breakfast time. This means that there are fewer items sold at breakfast. Next, let’s see the percentage of items sold at noon and lunchtime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8IX7dEHnIBoA5yr47naE7g.jpeg" /><figcaption>The percentage of items sold at noon</figcaption></figure><p>Once again, the percentage of items sold at noon is smaller than that not at noon, but it is almost thrice more than in the morning. How about the percentage of items sold at lunchtime?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WnnlZXAaWlKdneXI2f4Z2w.jpeg" /><figcaption>The percentage of items sold at lunchtime</figcaption></figure><p>The percentage of items sold at lunchtime<strong> </strong>is also smaller than that not at lunchtime. This also means that there are fewer items sold at noon. How about the percentage of items sold in the afternoon and at dinner time? (Note: the dinner time is in the afternoon)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eS3dLlhbdmkBCrt8QV_mtg.jpeg" /><figcaption>The percentage of items sold in the afternoon</figcaption></figure><p>The percentage of items sold in the afternoon is the greatest by far. This is likely to happen because the afternoon has the longest time range compared to the morning and noontime range (14:00 WIB to 23:30 WIB). How about the percentage of items sold at dinner time?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TAyfRiGuDTXaJKtmTptrQw.jpeg" /><figcaption>The percentage of items sold at dinner time</figcaption></figure><p>The percentage of items sold at dinner time is also smaller than that not at dinner time. Now, I have concluded that<strong> there are fewer items sold at breakfast, lunch, and dinner time</strong> in which my first hypothesis has been <strong>accepted</strong>. I still have another hypothesis to analyze, which is there are fewer items sold during office hours. To prove this hypothesis, I will visualize the percentage of items sold during office hours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QjSmlnftl21KT4wzs9NZlA.jpeg" /><figcaption>The percentage of items sold during office hours</figcaption></figure><p>Wow! <strong>The percentage of items sold during office hours is greater than that not during office hours</strong>. As I initially expect its reverse, then my second hypothesis is <strong>rejected</strong>. At this moment, why don’t I recommend that<strong> the time to offer the flash sale is during office hours but in the afternoon</strong>? Before going to conclude it, I would like to check whether each product category has its most preferable purchase time or is it mostly the same at all times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8g12MAnwU6n7KW1g9KmG7g.png" /><figcaption>The hourly items sold count</figcaption></figure><p>Since I have 72 product categories, I only display two of them. The “health and beauty” category has its highest items sold around 16:00 WIB (afternoon). On the other hand, the “stationery” category has its highest items sold around 10:00 WIB (noon). I conclude that <strong>each product category has its own preferable purchase time</strong>. In other words, <strong>sellers need to choose the best time to offer the flash sale</strong>.</p><h4><strong>F. Conclusions and Recommendations</strong></h4><p>After performing the data analysis on how to effectively choose time for the flash sale, I conclude that:</p><ol><li>The afternoon has the greatest number of items sold.</li><li>The number of items sold during office hours is greater than not during office hours.</li><li>Each product category has its most preferable purchase time.</li></ol><p>To effectively choose time for the flash sale, my recommendation is as follows:</p><ol><li>Sellers should select the best time to offer the flash sale.</li></ol><p>However, it will be confusing and time-consuming for sellers to conduct their own analysis to select the best time. Therefore, I will help these sellers automatically get the time to offer their flash sale with unsupervised learning — a recommendation system.</p><h3><strong>Data Science — Unsupervised Learning</strong></h3><p>Based on the previous analysis, I imagine what if the recommendation system receives product category as its input and time range as its output? Here’s the algorithm I propose.</p><blockquote><em>The time range recommendation should offer the best time for the flash sale. The best time is the time in which that product category has the greatest number of items sold.</em></blockquote><p>In my data warehouse, I have the information of ‘hour’ when that product category is being sold. To get the best time that has the greatest number of items sold, I group the ‘hour’ for each product category sales and return the ‘hour’ with the highest count. Since I group by its ‘hour’, my recommendation will range from ‘hour’ to before ‘hour’ + 1. For instance, 14:01 WIB and 14:59 WIB will be counted as 14 (14 is the ‘hour’ of 14:01 WIB and 14:59 WIB). Assuming that ‘hour’ 14 has the greatest number of items sold, my recommendation will range from 14:00 WIB to 14:59 WIB.</p><p>I try three unsupervised learning models.</p><ol><li>The first model: to only consider product category.</li><li>The second model: to consider product category and the five nearest states with the targeted customer states.</li><li>The third model: to consider product category and the price.</li></ol><h4><strong>First model</strong></h4><p>Input: product category<br>Output: time range recommendation</p><p>Sample output:</p><p>(1) We highly recommend you to offer flash sale your ‘pet_shop’ products from 14:00 to 14:59 WIB.</p><p>(2) We highly recommend you to offer flash sale your ‘air_conditioning’ products from 20:00 to 20:59 WIB.</p><h4>Second model</h4><p>Input: product category and the five nearest states with the targeted customer states<br>Output: time range recommendation</p><p>Sample output:</p><p>(1) Target customer state: Aceh.<br>We highly recommend you to offer flash sale your ‘pet_shop’ products from 12:00 to 12:59 WIB.</p><p>(2) Target customer state: Bali.<br>We highly recommend you to offer flash sale your ‘pet_shop’ products from 13:00 to 13:59 WIB.</p><p>Both (1) and (2) would like to offer flash sale their ‘pet_shop’ products but different states have different time recommendations.</p><h4>Third model</h4><p>Input: product category and price<br>Output: time range recommendation</p><p>Sample output:</p><p>(1) Price: 12000<br>We highly recommend you to offer flash sale your ‘pet_shop’ products from 14:00 to 14:59 WIB.</p><p>(2) Price: 1000<br>We highly recommend you to offer flash sale your ‘pet_shop’ products from 12:00 to 12:59 WIB.</p><p>Both (1) and (2) would like to offer flash sale their ‘pet_shop’ products but different prices have different time recommendations.</p><p>From these three models, I select one model which is the best. To compare these models, <strong>my metric is to</strong> <strong>compute the number of items that product category is sold between the recommended time range divided by the number of items that product category is sold in total</strong>. The model with the <strong>highest value</strong> calculated by the metric is the <strong>best</strong>.</p><p>The first model is simply straightforward. The second model and the third model are more complex. In the second model, I loop through each product category. I search for the states in which that product has been sold in each product category and their five nearest states. At this point, I might have so many values to represent one product category. All these values are averaged and that averaged value represents the product category score. By performing the same method to all the product categories, the final score for the second model is also the average of all the product categories&#39; averaged scores. The third model has the same intuition as the second model. The difference is the third model uses price instead of customer states. Each product category is categorized into several labels distributed by its price (after normalization) based on the minimum value, the first quartile, the second quartile, the third quartile, and the maximum value. Then, I loop through each label within that product category and average the scores to represent that product category score. Again by performing the same method to all product categories, the final score for the third model is also the average of all the product categories’ averaged scores.</p><p>The results are as follows:</p><ol><li>The first model: 0.11255083696307312</li><li>The second model: 0.20414849066908175</li><li>The third model: 0.29674633777914117</li></ol><p>Since the third model has the highest score, <strong>the third model is the best</strong>. If my recommendation system is applied, the seller only requires to input the product category and its price. Then, the time recommendation to offer flash sale for that product is generated.</p><h4>Third business question: Which states need more sellers?</h4><p>— — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4><strong>A. Why this business question?</strong></h4><p>I want to find out which states in Indonesia need more sellers. Well, if Blibli’s target market is the whole states in Indonesia, then all states in Indonesia can be considered. In this business question, states with the ratio of the number of sellers to the total population lower than a threshold are the states that need more sellers.</p><h4><strong>B. Hypotheses</strong></h4><p>I have no initial guesses for this business question.</p><h4><strong>C. Assumptions</strong></h4><ol><li>Blibli is setting up a campaign to increase the number of sellers.</li></ol><h4><strong>D. Constraints</strong></h4><ol><li>Only delivered transactions are considered.</li></ol><h4><strong>E. Analysis</strong></h4><p>First, I calculate the percentage of the number of items sold per population on each island in Indonesia.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oZnUKoUQZUa0mjxX8Rur-g.jpeg" /><figcaption>The percentage of the number of items sold per population</figcaption></figure><p><strong>Western New Guinea, Java, and Kalimantan Island</strong> are the top three islands with <strong>the highest percentage of the number of items sold per population</strong>. How about the percentage of the number of sellers per population on each island?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h718BQgu33Nq7HxmGY_1GQ.jpeg" /><figcaption>The percentage of the number of sellers per population</figcaption></figure><p><strong>Lesser Sunda, Maluku, and Sumatra Island</strong> are the three islands with <strong>the lowest percentage of the number of sellers per population</strong>. If I compare the percentage of the number of items sold per population, these islands are also the three lowest ones. Below, I visualize the population on each island as well as the number of sellers on each island.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IGYP-A7cGP6R8lYIOrhjQA.jpeg" /><figcaption>The population on each island</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CfSh-RTTvXaK_eSQfJXazw.jpeg" /><figcaption>The number of sellers on each island</figcaption></figure><p>In Java Island, the population is the highest as well as its number of sellers. There is no wonder that the number of sellers per population has a high value. However, Kalimantan Island has the highest ratio of the number of sellers per its population than the other islands’. If I only compare the number of sellers on each island, Kalimantan Island will be the fourth. To create a more generalized comparison, I standardize it with the population on each island. Since I want to find out which states in Indonesia that need more sellers, why don’t Blibli focus on the states in Lesser Sunda, Maluku, and Sumatra Island?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DlVZGyRIvtDks27KbYiMsw.jpeg" /><figcaption>The states to be prioritized in Lesser Sunda, Maluku, and Sumatra Island</figcaption></figure><p>In the chart above, I visualize the states in these three islands as well as calculating the percentage of the number of sellers per population. The states colored in green are the states with their percentage of the number of sellers per population value in the lowest tenth percentile of all states. Therefore, <strong>Nusa Tenggara Barat, Maluku, Aceh, and Lampung can be prioritized for the campaign</strong>.</p><h4><strong>F. Conclusions and Recommendations</strong></h4><p>After performing the data analysis on which states in Indonesia need more sellers, I conclude that:</p><ol><li>Western New Guinea, Java, and Kalimantan Island have the highest percentage of the number of items sold per population.</li><li>Lesser Sunda, Maluku, and Sumatra Island have the lowest percentage of the number of sellers per population.</li></ol><p>To recommend which states that need more sellers, my recommendation is as follows:</p><ol><li>Nusa Tenggara Barat, Maluku, Aceh, and Lampung are states that can be prioritized for the campaign.</li></ol><h4>Fourth business question: Which product category is recommended to new sellers in Java Island?</h4><p>— — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4><strong>A. Why this business question?</strong></h4><p>Based on the previous analysis, Java Island has the highest population in Indonesia. Assume a new seller who resided in Java Island decides to start a business at Blibli. Which product category is recommended to that new seller?</p><h4><strong>B. Hypotheses</strong></h4><p>I have no initial guesses for this business question.</p><h4><strong>C. Assumptions</strong></h4><ol><li>A new seller who resided in Java Island has no idea what product category to sell.</li></ol><h4><strong>D. Constraints</strong></h4><ol><li>The new seller only needs one product category to be recommended.</li></ol><h4><strong>E. Analysis</strong></h4><p>First, I want to see what are the most demanding product categories in Java Island.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p-d7XxPqFblyYmPt5quGcw.jpeg" /><figcaption>Top 10 product categories with the highest demand in Java Island</figcaption></figure><p>The top 10 product categories with the highest demand in Java Island are mostly related to daily needs. On the first rank, the “bed, bath and table” category is the most demanding category. I have known which product categories are the most demanding ones, it’s time to check which product categories are sold the most by sellers who resided in Java Island.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HCeRhYM5F5HGSiY5wySBwA.jpeg" /><figcaption>Top 10 product categories sold by sellers who resided in Java Island</figcaption></figure><p>Okay, most of it seems to be similar to the top 10 most demanding product categories in Java Island. If I compare these charts, I notice that the “bed, bath and table” category is not included in the top 10 product categories sold by sellers who resided in Java Island! Is it included in the top 15?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iw0xE95M1xnN6OPbng5D2w.jpeg" /><figcaption>Top 15 product categories sold by sellers who resided in Java Island</figcaption></figure><p>Looks like “bed, bath and table” ranks 13th by the product categories sold by sellers who resided in Java Island. The percentage of seller count also differs almost thrice from the first rank, “health and beauty” category. Since the percentage of “bed, bath and table” sellers in Java Island is still low and at the same time that category is the most demanding one in Java Island, <strong>why don’t the new seller start a business with “bed, bath and table” category</strong>? A new question comes to my mind. <strong>What if the “bed, bath and table” category is only demanding in Java Island</strong>? For that reason, I look for the most demanding product categories on each island.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w9rHDWFTuTPsieX0Z7tqQw.jpeg" /><figcaption>Top 10 product categories on each island</figcaption></figure><p>Great! The “bed, bath and table” doesn&#39;t only be demanded by buyers who resided in Java Island, but also in Sumatra, Sulawesi, Kalimantan, Lesser Sunda, Western New Guinea, and Maluku Island. Why don’t the new user give it a try?</p><h4><strong>F. Conclusions and Recommendations</strong></h4><p>After performing the data analysis on which product category is recommended to new sellers in Java Island, I conclude that:</p><ol><li>The “bed, bath and table” category is the most demanding product category in Java Island.</li><li>The percentage of “bed, bath and table” sellers in Java Island is still low.</li><li>The “bed, bath and table” is the most demanding product category in Indonesia.</li></ol><p>To recommend which product category is recommended to new sellers in Java Island, my recommendation is as follows:</p><ol><li>The new seller can start the business by selling the “bed, bath and tables” category.</li><li>The previous sellers who haven’t profit much from current sales may also try selling the “bed, bath and tables” category.</li></ol><h4>Fifth business question: How to reduce the transaction cancelation rate?</h4><p>— — — — — — — — — — — — — — — — — — — — — — — — — —</p><h4><strong>A. Why this business question?</strong></h4><p>Product cancelation affects the transaction experience of sellers and users/buyers in the e-commerce platform. As a buyer, a canceled transaction might require buyers to repurchase the product from the other sellers. As a seller, a canceled transaction might require the seller to process a refund to the buyer. In this question, I want to figure out how a seller can reduce his/her transaction cancelation rate.</p><h4><strong>B. Hypotheses</strong></h4><ol><li>The longer the order is approved, the more likely the order is to be canceled.</li><li>The longer the order is picked up, the more likely the order is to be canceled.</li><li>The further the pickup limit date is from the order date, the more likely the order is to be canceled.</li><li>The greater the difference between the pickup limit date and the pickup date, the more likely the order is to be canceled.</li><li>The longer the estimated delivery date, the more likely the order is to be canceled.</li></ol><h4><strong>C. Assumptions</strong></h4><ol><li>Orders can be canceled anytime.</li><li>All sellers use the pickup option to deliver their orders.</li></ol><h4><strong>D. Constraints</strong></h4><ol><li>Only canceled transactions are considered.</li></ol><h4><strong>E. Analysis</strong></h4><p>In my fact table, I have the information of the ‘order date’, ‘order approved date’, ‘pickup date’, ‘pickup limit date’, ‘delivered date’, and ‘estimated delivery date’. I want to figure out how these dates affect the cancelations. First, I analyze how the days&#39; difference between the ‘order date’ and the ‘order approved date’ affects the cancelations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sPLSsJVcbHoVmYjT3plb_g.jpeg" /><figcaption>The percentage of cancelations in between the ‘order date’ and the ‘order approved date’ (2016–2018)</figcaption></figure><p>The chart above shows the percentage of cancelations in between the ‘order date’ and the ‘order approved date’. 0 means the seller approves the order on the same day as the buyer orders the product. My initial guess is that the longer the order is approved, the more likely the order is to be canceled (first hypothesis). In fact, <strong>the highest percentage of cancelations occurs when the days’ difference is 0</strong>. Hence, my first hypothesis has been <strong>rejected</strong>. Next, I analyze how the days’ difference between the ‘order date’ and the ‘pickup date’ affects the cancelations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uZplCF35UlhtAEb4fqC4aQ.jpeg" /><figcaption>The percentage of cancelations in between the ‘order date’ and the ‘pickup date’ (2016–2018)</figcaption></figure><p>Approximately 12% of the canceled transaction occurs when the days’ difference is 0 (the ‘pickup date’ is the same as the ‘order date’). However, if the days’ difference is 1 (the ‘pickup date’ is the next day from the ‘order date’), the percentage of cancelations increases to 30.67% (more than twice). In short, <strong>the longer the order is picked up, the more likely the order is to be canceled</strong> (my second hypothesis is <strong>accepted</strong>). Even though there might be other factors that affect cancelations, <strong>why don’t sellers set the ‘pickup time’ early during working hours to decrease the probability of cancelations</strong>? This is my first recommendation. Next, I analyze how the days&#39; difference between the ‘order date’ and the ‘pickup limit date’ affects the cancelations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oMGcmAWnf_bcMDf0k1U6zQ.jpeg" /><figcaption>The percentage of cancelations in between the ‘order date’ and the ‘pickup limit date’ (2016–2018)</figcaption></figure><p>When the days’ difference is more than three days, the cancelations increase to almost eight times. This shows that <strong>the further the ‘pickup limit date’ is from the ‘order date’, the more likely the order is to be canceled</strong>. Hence, my third hypothesis is <strong>accepted</strong>. To expect that each state in Indonesia has its own freight forwarding company, <strong>why don’t the maximum ‘pickup limit date’ is set to a maximum of three days</strong>? This recommendation becomes my second’. I have analyzed how the ‘order date’ and the ‘pickup limit date’ affect the cancelations. How does the number of days difference between ‘pickup limit date’ and the ‘pickup date’ affect the cancelation?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6H3oazegBU1YbpoLPefSGQ.jpeg" /><figcaption>The percentage of cancelations in between the ‘pickup limit date’ and the ‘pickup date’ (2016–2018)</figcaption></figure><p>In the chart above, there are negatives in the number of days difference. This happens because I subtract the ‘pickup limit date’ from the ‘pickup date’. So for example, -12 means the order is picked up 12 days earlier than the ‘pickup date’. Seems like <strong>the faster the order is picked up from the ‘pickup limit date’, it doesn’t help to reduce the cancelations rate</strong>. Thus, my fourth hypothesis is <strong>rejected</strong>. I have proved four hypotheses. The next one is the last. How does the number of days difference between the ‘order date’ and the ‘estimated delivery date’ affect the cancelations?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KR4vIx03PIHAg5bDeMV02w.jpeg" /><figcaption>The percentage of cancelations in between the ‘order date’ and the ‘estimated delivery date’ (2016–2018)</figcaption></figure><p>I can see that the percentage of cancelations tends to increase if the number of days’ difference is greater than 6 (almost more than a week). <strong>Does the buyers’ patience to wait for the arrival of their products is no longer than a week</strong>? As many factors affect a product to be completely delivered, a better prediction of the ‘estimated delivery date’ might be needed to give a better experience of the transaction.</p><h4><strong>F. Conclusions and Recommendations</strong></h4><p>After performing the data analysis on how to reduce the transaction cancelation rate, I conclude that:</p><ol><li>The days’ difference between the ‘order date’ and the ‘order approved date’ doesn’t seem to affect the cancelation rate.</li><li>The days’ difference between the ‘order date’ and the ‘pickup date’ might affect the cancelation rate.</li><li>A longer ‘pickup limit date’ might affect the cancelation rate.</li><li>The days’ difference between the ‘pickup limit date’ and the ‘pickup date’ doesn’t seem to affect the cancelation rate.</li><li>A longer ‘estimated delivery date’ might affect the cancelation rate.</li></ol><p>To reduce the transaction cancelation rate, my recommendations are as follows:</p><ol><li>The sellers can set the pickup time in a way to make it possible for the logistics party to pick up on the same day.</li><li>The ‘pickup limit date’ can be changed to a maximum of three days.</li><li>The algorithm that determines the ‘estimated delivery date’ needs to be improved.</li></ol><p>The third recommendation suggests that the previous algorithm that determines the ‘estimated delivery date’ needs improvement. Since I have a large amount of data (approximately 100k rows on the fact table), I will bring this recommendation to supervised learning — a machine learning approach to predict the ‘estimated delivery date’.</p><h3>Data Science — Supervised Learning</h3><p>In supervised learning, I need input variables (input features) and a target variable (target feature). Since I want my new ‘estimated delivery date’ to be as close as possible to its ‘delivered date’, the target variable is the real ‘delivered date’ (not the ‘estimated delivery date’). However, the ‘delivered date’ is a DateTime/timestamp dataset. As this is a regression task, my target variable is the days’ difference between the ‘order date’ and the ‘delivered date’ (subtracted the ‘order date’ from the ‘delivered date’). I name it as ‘delivered difference day’.</p><p>For instances:<br>(1) if the ‘order date’ is 2016–08–23 10:00:00 and the ‘delivered date’ is 2016–08–26 10:00:00 then the ‘delivered difference day’ is 3 (3 days).<br>(2) if the ‘order date’ is 2016–08–23 10:00:00 and the ‘delivered date’ is 2016–08–26 06:00:00 then the ‘delivered difference day’ is 2 (2 days 20 hours).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*1cP7wvwbSKEWXEr8OGpmAA.png" /><figcaption>The initial columns to be considered in the prediction</figcaption></figure><p>Initially, I have 113,425 rows and 37 columns. Each row represents a transaction of an item within an order. Then, I add a new column called ‘total item’ that represents how many items are ordered within the same ‘order id’.</p><p>For instances:<br>[row 1] ‘order id’ 1 | ‘order item id’ 1 | “pet shop” product <br>[row 2] ‘order id’ 1 | ‘order item id’ 2 | “telephony” product<br>An order with ‘order id’ 1 has two ordered items (‘order item id’ 1 and 2). Therefore, the total item is 2. After the addition, it will look like below.<br>[row 1] ‘order id’ 1 | ‘order item id’ 1 | “pet shop” product | total item 2<br>[row 2] ‘order id’ 1 | ‘order item id’ 2 | “telephony” product |total item 2</p><p>After the addition of the new feature, I drop the ‘fact key’ and ‘order item id’ columns and the duplicated values. After that, I select the data where its ‘order status’ is delivered and the ‘delivered difference day’ is not null. Some columns have boolean data types (‘f’ for false and ‘t’ for true). Thus, I rename the rows/records with ‘f’ as 0 and ‘t’ as 1. Finally, I drop the ‘order id’ and ‘order status’ columns. The final columns to be considered are as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*vPnqASLBdcX-t3-FozvysQ.png" /><figcaption>The final columns to be considered in the prediction</figcaption></figure><p>The addition column is bolded and colored in blue. The dropped columns are colored in red. The target columns are bolded (‘delivered difference day’ and ‘estimated difference day’). Friendly reminder that my target column for the prediction is only the ‘delivered difference day’. The ‘estimated difference day’ is used to compare my final prediction towards the previous ones. The total columns/features for the input variables were 34 columns. The final total rows are 99,978 rows.</p><blockquote>Column, feature, and variable have been used interchangeably. I use the word ‘column’ to refer to the overall columns in the data (or dataframe when loaded with pandas). When I know which columns are ready to be processed or to be trained, I use the word ‘feature’ to refer to them. I rarely use the word ‘variable’ but I hope that you (the reader) won’t be confused by these terms on this post.</blockquote><h4>Handling missing values</h4><p>Ten features have missing data. Since the number of missing values is really small compared to the total rows, these rows will be dropped except for one feature, the ‘product category’. The ‘product category’ has 1,419 missing values. Therefore, I rename/fill in the null values with “others”. The total rows after dropping the missing values are 99,953.</p><h4>Splitting the data</h4><p>I split this data into three, a training set (for training the machine learning algorithm), a validation set (for hyperparameter tuning), and a test set (act as the real and unseen data). The ratio is 0.855: 0.095: 0.005 respectively. The training set consists of 85,459 rows. The validation set consists of 9,496 rows and the test set consists of 4,998 rows.</p><h4>Checking the outliers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*nav-g8DZZFcflOmemHsWYQ.png" /><figcaption>The price boxplot</figcaption></figure><p>Outliers might affect the model prediction. Outliers are depicted as circles. Since the price feature and other numerical features also have a lot of outliers, I don’t drop the rows. In fact, I leave them as they are.</p><h4><strong>Feature Engineering</strong></h4><p>In this step, I create five new features.</p><p>(1) ‘Product volume’: multiplying the ‘product length’, ‘product height’, and ‘product width’.</p><p>(2) ‘Order time’ (in hour): converting the ‘order minute’ and ‘order second’ to hour and adding it with the ‘order hour’.</p><p>(3) ‘Order daytime’: combining ‘order is morning’, ‘order is noon’, ‘order is afternoon’, and ‘order is night’ and converting it to ordinal (morning is 0, noon is 1, afternoon is 2, and night is 3).</p><p>(4) ‘Meal daytime’: combining ‘is breakfast time’, ‘is lunch time’, and ‘is dinner time’ and converting it to ordinal (breakfast is 0, lunch is 1, and dinner is 2).</p><p>(5) ‘Intra inter state’: comparing whether the ‘customer state’ is the same as the ‘seller state’, 1 if the same, and 0 if it is different.</p><h4>Checking correlations</h4><p>To check the correlations within the numerical features, I use a heatmap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xrRT3Hf07MAjxnvQBVHlsg.png" /><figcaption>The correlation heatmap (Pearson correlation)</figcaption></figure><p>There are three analyzes I want to emphasize:</p><p>(1) ‘Payment value’ is highly correlated with ‘price’ as well as the target variable. Hence, I select ‘payment value’ over ‘price’.<br>(2) ‘Product volume’ is highly correlated with ‘product length’, ‘product height’, and ‘product width’ as well as the target variable. Hence, I select ‘product volume’ over ‘product length’, ‘product height’, and ‘product width’.<br>(3) ‘Order fiscal month’ is highly correlated with ‘order fiscal quarter’ as well as the target variable. Hence, I select ‘order fiscal month’ over ‘order fiscal quarter’.</p><p>Since my target feature is the ‘delivered difference day’, I check all the features&#39; correlations toward it and only select the features with the absolute value of correlations is greater than 0.01. The selected features are ‘shipping cost’, ‘product weight’, ‘order fiscal month’, ‘product volume’, ‘payment value’, ‘payment installments’, ‘order day of week’, ‘total item’, ‘order month’, and ‘intra inter state’. Remember that these features are numerical features.</p><h4>Transforming the data</h4><p>The features mentioned above have to be transformed before fitting to a machine learning algorithm. To transform the data, I create five pipelines.</p><p><strong>(1) First pipeline</strong></p><p>The first pipeline is to create the ‘product volume’ feature from ‘product length’, ‘product height’, and ‘product width’. After that, the ‘product volume’ feature is transformed with log transformation. Finally, the transformed ‘product volume’ feature is standardized with robust scaler.</p><p><strong>(2) Second pipeline</strong></p><p>The second pipeline is to transform the ‘shipping cost’, ‘payment value’, and ‘product weight’ with log transformation as well as standardize them with robust scaler.</p><p><strong>(3) Third pipeline</strong></p><p>The third pipeline is to create the ‘intra inter state’ feature.</p><p><strong>(4) Fourth pipeline</strong></p><p>The fourth pipeline is to convert the ‘customer state’, ‘seller state’, and ‘product category’ features into one-hot encoding representation.</p><p><strong>(5) Fifth pipeline</strong></p><p>The fifth pipeline is to simply concatenate ‘payment installments’, ‘order fiscal month’, ‘order day of week’, ‘total item’, and ‘order month’ to the pipeline.</p><blockquote><a href="https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.RobustScaler.html#:~:text=Scale%20features%20using%20statistics%20that,to%20IQR%3A%20Interquartile%20Range).&amp;text=In%20such%20cases%2C%20the%20median,range%20often%20give%20better%20results.">Robust scaler</a> scales features using statistics that are robust to outliers. As my numerical data has outliers, I prefer to use robust scaler to standard scaler.</blockquote><p>These pipelines are combined into a whole pipeline. This whole pipeline is used to transform the training set, validation set, and test set by calling ‘fit_transform’ and ‘transform’ functions.</p><p>The training set shape after the transformation is 85,459 rows with 150 columns.</p><blockquote>Recall that the chosen numerical features are 10 features. Since ‘customer state’ is converted into a one-hot encoding representation with one column representing a state in Indonesia, then the total number of features from this transformation is 34 (Indonesia has 34 states). ‘seller state’ is also converted into a one-hot encoding representation in which an additional 34 columns are added. Lastly, the ‘product category’ has 72 categories. With each column representing a category, the total features are 72 features. The final number of features is the addition of 10, 34, 34, and 72, which equals 150 features.</blockquote><p>Finally, the machine learning prediction step!</p><h4>Model Training</h4><p>I will make a comparison from these five models: Linear Regression, K Nearest Neighbor, Support Vector Machine, Random Forest, and XGBoost.</p><p>I use the root mean squared error and the mean absolute error as the metric. However, to decide which model is the best, the training time is also taken into account.</p><p>With the default value for each model, the comparison is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*zrI4T7n1Xom7qrWrAWsiyQ.jpeg" /><figcaption>The metrics comparison</figcaption></figure><p>By considering the metrics and the training time, I choose to use XGBoost (with the training speed of 6 seconds, it can give a mean absolute error of 5.2). Root mean squared error tends to be small if the absolute error is also small. Therefore, to get the mean absolute error as low as possible, hyperparameter tuning is conducted.</p><h4>Hyperparameter Tuning</h4><p>The best hyperparameters for the XGBoost model is:</p><p>random_state = 42, learning_rate = 0.01, max_depth = 9, min_child_weight = 7, subsample=0.9, colsample_bytree=0.7, n_estimators=900, objective=’reg:squarederror’</p><p>with:</p><ul><li>Root mean squared value: 8.090016158675295</li><li>Mean absolute error value: 4.991124465873288.</li></ul><h4>Results</h4><p>After hyperparameter tuning is conducted, the test set is fitted to the XGBoost. The result is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oo5RKqekD-XJqtWm_QDgRQ.png" /><figcaption>The real and predicted ‘delivered difference day’ comparison</figcaption></figure><p>The blue-colored line charts are the real values and the orange-colored line charts are the predicted values. To get a closer look at how the predicted values differ from the real values, I display only the first 300 data from the test set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7rnoa8wv-yVdHNeEd5-8JA.png" /><figcaption>The real and predicted ‘delivered difference day’ comparison (first 300 data)</figcaption></figure><p>Okay. Even though the predicted value is not as accurate as the real values, at least it is close to it. If I compare the predicted value with the previous ‘estimated difference day’, it will look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1iApq8jCpBebI77kPvzuqQ.png" /><figcaption>The real ‘estimated difference day’ and the predicted ‘delivered difference day’ comparison (first 300 data)</figcaption></figure><p>Wow! Look at how much the predicted model is better than the existing ‘estimated difference day’. Since the prediction value is close to the real ‘delivered difference day’, this model can be used to generate the <strong>new estimated delivery date</strong>.</p><p>As this model predicted the days’ difference, the <strong>new</strong> <strong>estimated delivery date </strong>will be the addition of the order date with the predicted value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U50ehauaE0qlJwf6" /><figcaption>Photo by <a href="https://unsplash.com/@artbyhybrid?utm_source=medium&amp;utm_medium=referral">Hybrid</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Yes! That’s all!</h3><p>To wrap things up, I have shared my experience from the Data Engineering section, to the Data Analysis section by answering five business questions and bring two business questions to the Data Science section with predictions and recommendations. What I have learned the most while handling this project is that everything takes time and patience. It takes me approximately 205 days to finish the project and 8 days to complete this medium post. I would like to show my special thanks and gratitude to my amazing mentors: Kak <a href="https://www.linkedin.com/in/thisishanskristian/">Hans Kristian</a> as my data engineering mentor, Kak <a href="https://www.linkedin.com/in/gabriella-lairenz-714234b8/">Gabriella Lairenz</a> as my data analysis mentor, and Kak <a href="https://www.linkedin.com/in/johan-sentosa/">Johan Sentosa</a> as my data science mentor as they have helped me throughout the process by providing feedback and mentoring sessions. I hope this writing can be used as your reference as well as to expand your knowledge regarding the data field. Should you have any questions, please feel free to reach me on my LinkedIn profile <a href="https://www.linkedin.com/in/vincent-junitio-ungu/">here</a>. Thanks a lot for your support by reading this post up to this section. Have a great day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae9ec20fe4b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Biological Neural Network (BNN) to Artificial Neural Network (ANN)]]></title>
            <link>https://medium.com/@vincentjunitio/biological-neural-network-bnn-to-artificial-neural-network-ann-91ddd0080d5b?source=rss-adfdc98485a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/91ddd0080d5b</guid>
            <category><![CDATA[artificial-neural-network]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[biological-neural-network]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Vincent Junitio Ungu]]></dc:creator>
            <pubDate>Sat, 23 May 2020 12:53:35 GMT</pubDate>
            <atom:updated>2020-05-23T12:53:35.273Z</atom:updated>
            <content:encoded><![CDATA[<p>Can you name three invention inspired by the nature?</p><p>My answer will be airplanes, submarines, and swim fins. Airplanes were inspired from birds which can fly across the land, submarines were inspired from whales which can stay for a long period of time underwater while swim fins were inspired by how frogs and ducks propel its feet through water.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-Da6JnR8P6sClWOb" /><figcaption>Photo by <a href="https://unsplash.com/@mehdisepehri?utm_source=medium&amp;utm_medium=referral">Mehdi Sepehri</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Today, we can find Artificial Intelligence (AI) everywhere, from recommending videos to watch (Youtube) to translating words (Google Translate). Now, let’s discuss a part of AI study which has been contributing to the development of technology since decades ago, an Artificial Neural Network. Artificial Neural Network was first introduced by Warren McCulloch (a neurophysiologist) and Walter Pitts (a mathematician) in 1943. Artificial Neural Network itself was inspired by neuron and its network in our brain.</p><h3>Biological Neurons</h3><p>Biological Neuron is a cell which can be found in brain. Brain — the main control unit which allows living creatures to have an ability to adapt to a changing environment and the ability to learn — consists of a very large number of neurons. In biology, a neuron is a cell that carries messages (impulses) in nervous system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*LuWxKLBnK8Ig0V0h-7ZsMA.jpeg" /><figcaption>Simplified Structure of a Neuron</figcaption></figure><p><strong>How BNN works</strong></p><p>In brief, dendrites receive impulses from other cells and axons transmit it to the other cells or the other dendrites. When the impulse reach the synaptic terminals (sometimes known as axon terminals), the axon will release neurotransmitter — a chemical substance to bind the dendrite membrane of the receiving neuron. A synaptic terminals do not attach directly to another dendrite. There is a gap called synaptic cleft and thanks to neurotransmitter, the impulse can be passed from one neuron to the others.</p><p>Each neuron connected to thousands of other neurons — form a neural network. This neural network, known as Biological Neural Networks (BNN), seems to have an organized consecutive layers of neurons in the outer layer of the brain.</p><h3>Artificial Neurons</h3><p>Artificial Neural Network (ANN) applies the concept of BNN. We can consider the impulse receives by a dendrite as input, and the transmitted impulse as output. To better understand about ANN, let’s discuss one of the simplest ANN architectures—perceptron.</p><p><strong>Perceptron</strong></p><p>Perceptron were invented by Frank Rosenblatt in 1957. A perceptron is composed of a single layer of Threshold Logic Unit (TLU). Perceptron itself is commonly used for simple linear binary classification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*cGWBVQsVwgF_zyCMEWrQUA.jpeg" /><figcaption>A perceptron with two inputs neurons, one bias, and one output</figcaption></figure><p><strong>How Perceptron works</strong></p><p>TLU computes the sum of the inputs multiplied by its weight and another extra bias neuron which always outputs 1 into weighted sum. Then the weighted sum is fed into step function and output the result.</p><p>Many layers of perceptron form a Multilayer Perceptron (MLP). MLP consists of input layer (the layer consists of input neurons), output layer (the layer consists of output neurons), and one or more layers of TLUs. The additional layers of TLUs are known as hidden layers. If an ANN has many hidden layers, then it is called a Deep Neural Network (DNN).</p><h3>BNN vs ANN</h3><p>Now, you can see that ANN somehow imitates how BNN works. The impulse received by dendrites in BNN as the input layer in ANN. The impulse passes through the axons in BNN as the process from input layers to the output layers through hidden layers in ANN. Finally the transmission from the synaptic terminals to the other dendrites in BNN as the output layer in ANN. However, year by year ANN has become much more distinct from the “real” neural network. Nonetheless, we know that there are still many possibilities of new inventions which can be inspired by the nature.</p><p>Thank you for reading! Please give me a clap if you enjoy the article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91ddd0080d5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>