<?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 Dewi Safitri on Medium]]></title>
        <description><![CDATA[Stories by Dewi Safitri on Medium]]></description>
        <link>https://medium.com/@dewisafitri_?source=rss-4f62c2be31ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*M0wVOHk9Ofg-mR2mQJBSug.png</url>
            <title>Stories by Dewi Safitri on Medium</title>
            <link>https://medium.com/@dewisafitri_?source=rss-4f62c2be31ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 10:38:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dewisafitri_/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[Amazon Sale Report — Portofolio]]></title>
            <link>https://medium.com/@dewisafitri_/amazon-sale-report-portofolio-c68ef02eaccd?source=rss-4f62c2be31ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/c68ef02eaccd</guid>
            <category><![CDATA[business-analyst]]></category>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Dewi Safitri]]></dc:creator>
            <pubDate>Sat, 16 Sep 2023 05:18:06 GMT</pubDate>
            <atom:updated>2023-09-16T05:18:06.244Z</atom:updated>
            <content:encoded><![CDATA[<h3>Amazon Sale Report — Portofolio</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*l_BkA5wDsVBh7O06BZqwtg.jpeg" /></figure><h3><strong>Introduction</strong></h3><p>The dataset used in this portfolio project is an Amazon sale report data for the months of March to June in the year 2022, focusing on the country of India. This dataset was obtained from Kaggle, which is an online platform that specializes in data science, machine learning, and data analysis competitions. On Kaggle, users can access various datasets, participate in data analysis competitions, share code, and engage with a large data science community. Please note that this data is not actual data but simulated for educational and analytical purposes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*TAhN81H6UZfSul5PrxeQFA.jpeg" /></figure><p>In this project, several tools were utilized to analyze and present the Amazon sales report dataset effectively.</p><p>1. BigQuery: BigQuery, a powerful cloud-based data warehouse provided by Google Cloud, was employed to store and manage the dataset. It enabled efficient data querying and transformation, making it easier to extract valuable insights from the large dataset.</p><p>2. Looker Studio: Looker Studio, a data exploration and visualization platform, was leveraged to create interactive and dynamic dashboards and reports. Looker allowed for in-depth exploration of the dataset, enabling users to interact with the data and gain deeper insights through customized visualizations and reports.</p><p>These tools collectively facilitated data analysis, visualization, and presentation, ensuring that the project’s findings were not only well-researched but also effectively communicated to the intended audience. In this portofolio, I will explain the queries used to display data based on the given business questions and provide an overview of how this data can influence the decisions to be made.</p><h3><strong>Bussiness Question</strong></h3><p><strong>1.</strong> <strong>What are the total sales (Amount) achieved during 2022?</strong></p><p>Total sales are the total amount of revenue earned by a company from the sale of products or services during a certain period. This is one of the most important and frequently used financial metrics to measure the financial performance of a company. A high sales growth rate can indicate healthy growth, while a decline in sales can indicate a problem that needs to be addressed immediately.</p><p>How it is calculated can vary depending on the complexity of the business and the type of product or service being sold. In general, calculating total sales is done by adding up all sales transactions that occurred during the specified period. The following is a query to calculate the total sales achieved during 2022 along with the running results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*urNYbavCy67cW-UQRvtxww.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*S2dIT8CC6NazWnCnkr-Wqg.jpeg" /></figure><p>This data shows the total sales achieved during 2022 by only counting successful transactions, namely by excluding orders with the status canceled, damaged, lost in transit, rejected by buyer, returned to seller and returned to seller. The next thing that can be done is to compare total sales in 2022 with previous years to see whether there is an increase or a decrease and analyze the causes. Apart from the causes, we also need to make strategic planning for the next period by correcting mistakes in the previous period and increasing the potential that needs to be improved.</p><p>Total sales are one of the main indicators of business performance, and their influence on company decisions is very significant. Total sales can influence company decision making. Here are some ways in which total sales can influence a company’s decision making:</p><p>1. Financial Planning: Total sales are vital for financial planning as they provide a baseline for budgeting and forecasting, helping companies allocate resources effectively and set achievable financial goals.</p><p>2. Pricing and Promotion: Sales figures directly influence pricing and promotion decisions, allowing companies to adjust pricing strategies and offer promotions based on their sales performance to maximize revenue and market share.</p><p>3. Inventory Management: Total sales impact inventory management by guiding decisions on stocking levels, preventing overstocking or understocking, and ensuring efficient supply chain operations.</p><p>4. Investment Decisions: Companies with strong sales are often more appealing to investors and lenders, facilitating access to capital for strategic investments and growth initiatives.</p><p>5. Recruitment and Growth: Increasing sales often necessitate expanding the workforce and resources to sustain growth, enabling companies to seize new opportunities and enhance competitiveness.</p><p>6. Business Strategy: Sales data shape overall business strategies, with strong sales potentially leading to ambitious expansion strategies, while weaker sales may trigger strategic reassessment to maintain market relevance and profitability.</p><p><strong>2. What are the total sales (Amount) achieved during 2022 based on category?</strong></p><p>In addition to total sales overall, calculating total sales by category is an important way to analyze the sales performance of a company or product in more depth. Here are some reasons why calculating total sales by category is important and its benefits:</p><p>1. Customer Insight: This helps in identifying the products or services that customers are most interested in and why they choose those products.</p><p>2. Decision Making: This is related to inventory management, new product development, and elimination of underselling products.</p><p>3. Pricing: Products in different categories may have different price elasticities, meaning price changes may affect demand in different ways.</p><p>4. Planning and Budget: Determine the appropriate resource allocation for each category and set realistic sales targets for each category.</p><p>5. Performance Evaluation: It helps in identifying positive or negative trends in sales of a particular product.</p><p>6. Marketing Strategy: Companies can customize marketing campaigns to reflect the unique characteristics of each category. It also helps in identifying opportunities to improve marketing of a particular product.</p><p>By calculating total sales by category, companies can gain deeper insight into their product portfolio, plan more effective business strategies, and provide a better experience to customers. Thus, measuring sales by category can be an invaluable tool in business management. The following is a query to calculate total sales based on category and running results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*pk2UI4iLecUT_Ts0ERO-_A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*ym4ZT7aGf-jtXTElnJquWA.jpeg" /></figure><p>Based on this data, the set, kurta and western dress categories occupy the 3 categories with the highest total sales during 2022, while the dupatta category occupies the last position. This data can be used to evaluate the marketing strategies implemented in each category and used as a reference for making decisions regardinginventory management, new product development, and elimination of underselling products.</p><p><strong>3.</strong> <strong>These businesses tend to use which shipping services (ship_service_level) most frequently?</strong></p><p>Measuring the delivery services most frequently used in a business has many benefits and important relevance in operations management and business strategy. The following is a query to display data regarding the delivery services used in this business and their running results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*AgBrdVBzeU3oom0qMQ8pEw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*-hpED88QDGrbd-PsuuTjlw.jpeg" /></figure><p>Based on the data displayed, customers tend to use expedited shipping services. The expedited shipping method is basically a shipping or shipping method that gets orders to the intended recipient faster than standard shipping methods. This data can be used as a way of thinking to make various business decisions such as:</p><p>1. Cost Optimization: Helps companies plan more efficient shipping strategies and optimize shipping costs.</p><p>2. Customer Service: Helps companies provide a better customer experience. This includes selecting a delivery service that can meet customer expectations regarding delivery time and level of security.</p><p>3. Inventory Planning: Data about the most frequently used delivery services can help in inventory planning. This allows companies to adjust inventory and logistics according to expected demand.</p><p>4. Logistics Efficiency: By evaluating the use of delivery services, companies can identify whether there are opportunities to reduce order processing time, speed up delivery, or reduce shipping costs.</p><p>5. Service Provider Comparison: Data on the most frequently used delivery services allows companies to compare the performance of different delivery service providers.</p><p><strong>4.</strong> <strong>This business has the most sales in what sales channel (Sales_Channel_)?</strong></p><p>To determine the sales channel (Sales_Channel) with the most sales, it is necessary to analyze sales data that covers all sales channels used by this business. This metric is measured from revenue from various sales channels (Sales_Channel_) by calculating the number of transactions for each channel. The following is a query to display this data along with the running results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*x1qXi56WQAOMQmkXEAXR-Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*3OgxSId9oP7V0L4VcT8KHw.jpeg" /></figure><p>This metric needs to be measured because it has several important benefits including:</p><p>1. Marketing Plan Optimization: Companies can plan better marketing strategies and direct more intensive marketing efforts to these channels. This could be customized marketing campaigns or better inventory management in certain channels.</p><p>2. Efficient Resource Allocation: This metric helps companies allocate resources more efficiently. If, for example, sales through e-commerce channels are consistently higher, the company can allocate more stock or operational resources to support this channel.</p><p>3. Stock and Inventory Planning: Knowledge of the most successful sales channels helps in stock and inventory planning.</p><p>4. ROI Evaluation: Measuring top sales by channel also helps in evaluating the return on investment (ROI) of various sales channels. We can see how the costs invested in each channel compare to the revenue generated.</p><p><strong>5.</strong> <strong>Which SKU product has the highest total quantity sold (Qty)?</strong></p><p>To find the product with the SKU (Stock Keeping Unit) that has the highest total quantity sold (Qty), we need to analyze sales data by grouping products based on SKU and then calculating the total Qty for each SKU. The following is a query to display this data and the running results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*MEONQ-uQtqZmbijTVZXZlg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*kcyBXTBHsU8Wn3_NKhj1ng.jpeg" /></figure><p>This data can then be used as a way of thinking for several business decisions that can be made, such as the following:</p><p><strong>1.</strong> Identify Top Products: This metric helps to identify the most successful products in terms of sales.</p><p><strong>2.</strong> Stock Determination: Helps companies to manage inventory better by ensuring that product stock is always available to meet customer demand.</p><p><strong>3.</strong> Decision Making: This data helps to plan sales strategies, promotions or even new product development.</p><p><strong>4.</strong> Product Performance Evaluation: This metric helps to evaluate whether the product is generating high profit margins and whether there is potential to increase sales further.</p><p><strong>5.</strong> ROI Evaluation: Helps in evaluating the return on investment (ROI) for each product, namely by seeing whether the product provides good results based on the costs incurred.</p><p><strong>6.</strong> <strong>What is the total revenue (Amount) from sales shipped to cities within a particular state (ship_state)?</strong></p><p>To calculate the total revenue (Amount) from sales shipped to cities within a particular state (ship_state), we need to perform sales data analysis by grouping sales by state (ship_state) and then calculating the total Amount for each city within the state the. This allows us to know how much revenue is generated from sales in those cities. The following is a query to display this data and the running results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*SZGXaOpRQ8cWvvpuPtS2og.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*KT6XTlvtDYLqcrhFWs-E1Q.jpeg" /></figure><p>Measuring this metric is important because it has several benefits such as:</p><p>1. Local Market Understanding: This metric helps to understand the extent to which local markets within the state contribute to total revenue. This helps in planning more targeted marketing and distribution strategies.</p><p>2. Determining Success in Specific Regions: This can help to know which cities are performing well and which may need further attention.</p><p>3. Customer Segmentation: We can understand customers in each city and adjust marketing strategies or product offerings to meet their needs.</p><p>4. Local Promotion Planning: We can use this information to plan specific promotions or marketing campaigns for certain regions. This can increase brand awareness and sales in the region.</p><p>5. Evaluate Potential Local Taxes and Regulations: This metric can help you understand the implications of local taxes and regulations in the area.</p><p>Thus, measuring total revenue from sales to cities within a state is important for planning, managing, and optimizing business operations at a regional level. This provides the insights needed to make better decisions and improve business performance in the region.</p><p><strong>7.</strong> <strong>Of the total orders, what percentage of orders were made with promotional codes (promotion_ids)?</strong></p><p>Measuring what percentage of total orders have used promotional codes (promotion_ids) has significant business relevance and has several important benefits including:</p><p>1. Evaluate Promotion Effectiveness: By knowing what percentage of orders use promotional codes, we can assess the extent to which the promotion is successful in attracting customers and encouraging them to make a purchase.</p><p>2. Measuring the Impact of Promotions on Revenue: We can see how the use of promotional codes affects the overall revenue of a business. This helps in understanding whether the promotion increases sales or only reduces profit margins.</p><p>3. Future Promotion Planning: We can evaluate which type of promotion is most effective and use it as a guide to plan future promotions.</p><p>4. Customer Segmentation: We can use this data for customer segmentation. Customers who use promotional codes may have different preferences or behavior.</p><p>5. Product Performance Evaluation: We can see whether the use of promotional codes is more common for certain products or categories. This can help in product performance evaluation and pricing strategies.</p><p>6. Promotion ROI Analysis: Measuring what percentage of orders use promotional codes also helps in evaluating the promotion’s return on investment (ROI). We can compare the costs of promotion with the resulting increase in revenue.</p><p>Measuring what percentage of orders use promotional codes is an important step in managing your promotional strategy and overall business. It helps to understand the extent to which promotions contribute to business success and helps to take relevant actions to increase the effectiveness of promotions. The following is a query to display this data along with the running results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*aR0Ag1wWUJWIgt93Uz034w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*nLCbubYR4LEkyY-JwzIkow.jpeg" /></figure><p>Next, we can analyze further regarding the effectiveness of promotions, namely by calculating total orders based on promotional codes (promotion_ids).By analyzing the promotion_ids column, we can see how sales change before, during, and after a certain promotional period. This can help you measure the impact of promotions on revenue. The following is the query and data in question:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*wsPjxBt24k7BnXhLw5rxdQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*1wWq9nxO2ZjtEv92s7Ulrw.jpeg" /></figure><p><strong>8.</strong> <strong>Order Status Analysis</strong></p><p>The “Order Status Analysis” metric is an approach used to understand and identify patterns in the Order Status column in a business or e-commerce platform or other issues that can affect customer satisfaction. These metrics include monitoring, analyzing, and interpreting order status data to identify issues that may impact customer satisfaction. This is important to measure and analyze because it has several key benefits:</p><p>1. Identifying Delivery Issues: This helps to take immediate action to fix the problem and ensure customers receive their orders properly.</p><p>2. Increase Customer Satisfaction: Helps to take actions that can increase customer satisfaction. We can provide updates to customers, offer compensation if necessary, or provide adequate solutions.</p><p>3. Improved Operational Efficiency: This metric helps in identifying aspects in the supply chain or delivery process that may require improvement. By addressing operational issues, we can increase efficiency and reduce the likelihood of future problems.</p><p>4. Logistics Performance Monitoring: We can use order status analysis to monitor the performance of the logistics providers or shipping companies used. If there are frequent problems with deliveries from a particular provider, we may consider changing logistics providers.</p><p>5. Service Quality Analysis: This metric allows us to measure the quality of service provided to customers. By understanding how orders are processed and shipped, we can improve processes and ensure that customers receive quality service.</p><p>The following is a query to display order status data and running results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*anDTO5h-dEDOfT2WgYWhsg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*GQjNEseXV2rK7AbPyMPI-Q.jpeg" /></figure><p>Measuring and analyzing the “Order Status Analysis” metric is an important step in operational management and customer service. The results of this data analysis can be used to help ensure that orders are processed properly, customers are satisfied, and business operations run smoothly. If there are problems during delivery, we can create a strategy to overcome these obstacles in the future.</p><p><strong>9.</strong> <strong>Total Monthly Sales</strong>:</p><p>This metric measures the total revenue generated each month. The way to measure this is by adding up the value of the Amount column for each entry that has a transaction date in the same month. To simplify the analysis process, we can also compare total sales data and the number of promotions given in each month to see the success of the promotions implemented. The following is a query to display this data and the running results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*HO6RaL2LHXH-NT_cqcUeoQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*ppE0PRSQDldZlCZmPtR-OQ.jpeg" /></figure><p>Based on this data, several business decisions that can be made include:</p><p>1. Business Performance Evaluation: This metric provides an immediate picture of a business’s performance from month to month. We can see whether revenue increases, decreases, or remains stable over time.</p><p>2. Trend Monitoring: By periodically measuring total monthly sales, you can identify trends in your business. We may see busy seasons, periods of growth, or declines that may require corrective action.</p><p>3. Financial Planning: This data is important in business financial planning. We can use it to create budgets, set income targets, and manage cash flow.</p><p>4. Strategic Decision Making: This metric helps in strategic decision making. We can use monthly sales data to evaluate the success of marketing campaigns, new product offerings, or changes in sales strategy.</p><p>5. Evaluate Promotion Effectiveness: If running promotions or discounts, we can see whether they have a positive impact on monthly sales.</p><p>6. Monitoring Target Achievement: We can measure the extent to which our business achieves the monthly sales targets that have been set.</p><p>7. Financial Reports: This data is used in preparing financial reports such as income statements to describe business income over a certain period of time.</p><p>By measuring total monthly sales, we can better manage our business, make better decisions, and monitor overall business performance. This is one of the key metrics in financial analysis and business management that helps in strategic planning and decision making.</p><p>To facilitate the presentation of analysis results, I used Looker Studio as a visualization tool. Here is the link to access the dashboard that has been created (<a href="https://lookerstudio.google.com/reporting/465971ed-138b-45b4-b4c2-b23a638f2fb7">click here</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*vmgreyCcK8ZlIIQ4pn3ZLQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*lic4TB9sxV-DO55iGbIj0g.jpeg" /></figure><p>In this portfolio, I’ve used data skills to find important info in Amazon sales data. I made it easy to understand with tools like BigQuery and Looker Studio. This project shows I can work with data and share what I find. I hope it shows how data can help make business decisions, and I’m excited for more data projects. Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c68ef02eaccd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Final Project Portofolio — Python]]></title>
            <link>https://medium.com/@dewisafitri_/final-project-portofolio-python-8f6e2b611927?source=rss-4f62c2be31ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f6e2b611927</guid>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[business-analyst]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Dewi Safitri]]></dc:creator>
            <pubDate>Tue, 29 Aug 2023 09:05:16 GMT</pubDate>
            <atom:updated>2023-08-29T09:05:16.774Z</atom:updated>
            <content:encoded><![CDATA[<h3>Final Project Portofolio — Python</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E4od0LKRNcYZ6ueDyfSqIQ.png" /></figure><p>In this Python portfolio project, we will be addressing a series of questions and tasks related to data analysis. Before diving into the tasks, it’s important to ensure that we’ve covered the following steps:</p><ol><li>Import the required libraries.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*7vB6CWWsqz9bO8Z9pOE9ww.jpeg" /></figure><p>2. Import the necessary datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j7nOeI6okCEpZv3ZGulDig.jpeg" /></figure><p>3. Since the dataset comprises multiple tables, we’ll need to execute SQL operations to merge them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*SyCdehyaW7tezXuhv9PKlw.jpeg" /></figure><p>4. We’ll convert data types, transforming float data to integers for easier processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-I4GUvKUatY73Ito78pk3g.jpeg" /></figure><p>5. We’ll also convert date columns to the DateTime format to facilitate time-based analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*Mx3WdTrcEfLqTV_f9zU64A.jpeg" /></figure><p>Now, let’s proceed with the tasks and showcase the scripts for each of them:</p><h4><strong>Question 1:</strong></h4><p>Dear Data Analyst,</p><p>At the end of this year, the company will be awarding prizes to customers who win the Year-End Festival competition. The Marketing Team seeks assistance in determining the estimated prizes to be awarded to the competition winners. These prizes will be selected from the TOP 5 Products in the Mobiles &amp; Tablets category during the year 2022, with the highest sales quantity (valid = 1). Kindly help us by sending this data to the Marketing Team before the end of this month. We express our gratitude for the assistance provided.</p><p>Best regards, Marketing Team</p><p>Here are the steps to address this question along with the script and the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dE6cS2oNMqxb-H3yQN_Tag.jpeg" /></figure><p>There are several ways to filter data based on specific conditions:</p><ol><li>Creating variables for each condition, as shown in the adjacent image.</li><li>Incorporating each condition into a single script.</li><li>And so on.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*RdYVXFOzvvj5BSONRfFSKA.jpeg" /></figure><p><strong>Question 2:</strong></p><p>Dear Data Analyst,</p><p>Following the joint meeting of the Warehouse Team and the Marketing Team, we have discovered that there is still a significant amount of stock available for products in the Others category at the end of the past year 2022. We kindly request your assistance in checking the sales data for this category in the year 2021 based on sales quantity. Our preliminary assumption is that there has been a decrease in sales quantity in 2022 compared to 2021. (Please also provide data for the top 15 categories.) If indeed there has been a decrease in sales quantity for the Others category, we kindly ask for your help in providing data for the TOP 20 product names that have experienced the highest decrease in 2022 compared to 2021. We intend to use this information for further discussion in the upcoming meeting. Please send us this data no later than 4 days from today. We sincerely appreciate the assistance provided.</p><p>Regards, Warehouse Team</p><p>Below are the steps to address top 15 categories along with the script and the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VXUv9cilfe0Lt7R_ED5gDw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NSAd-iZBvbrHd0KHaB36nw.jpeg" /></figure><p>Below are the steps to address TOP 20 product names that have experienced the highest decrease along with the script and the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NC2fMuibiNQUgRFGeZKxQg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*jnJs64vlC4qpiDhcqakoxw.jpeg" /></figure><p><strong>Question 3:</strong></p><p>Dear Data Analyst,</p><p>Regarding the company’s upcoming anniversary in 2 months, the Digital Marketing Team plans to provide promotional information to customers at the end of this month. The criteria for customers we need are those who have performed check-out but have not yet made payments (is_gross = 1) during the year 2022. We require the data to include Customer IDs and Registered Dates. Kindly assist us in sending this data to the Digital Marketing Team before the end of this month. We extend our gratitude for the assistance provided.</p><p>Best regards, Digital Marketing Team</p><p>Here are the steps to address this question along with the script and the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_df5HvAnxSv0lXqbO1mqg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zX4YpUSnoSAfUFqc-e5Ofg.jpeg" /></figure><p>To download the file containing the list of these customers, we can execute this script, which will result in downloading a .csv file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ONqmcr-a2utmbQrgAFjjxw.jpeg" /></figure><p><strong>Question 4:</strong></p><p>Dear Data Analyst,</p><p>From October to December 2022, we conducted a campaign every Saturday and Sunday. We wish to evaluate whether this campaign had a significant impact on increasing sales (before_discount). We kindly request your assistance in presenting the data as follows: Average daily sales during weekends (Saturday and Sunday) vs. average daily sales during weekdays (Monday to Friday) for each month. Did the sales increase in each of those months? Average daily sales during weekends (Saturday and Sunday) vs. average daily sales during weekdays (Monday to Friday) for the entire 3 months. Please provide this data by the latest next week. We appreciate the assistance provided.</p><p>Regards, Campaign Team</p><p>Below are the steps to address this question along with the script and the result:</p><ol><li>Create new columns for day, month, and month number.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*eM_Dwp-M47mq-QNjFHLuww.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*iDSvb3vE6VdffKAJlqllWQ.jpeg" /></figure><p>2. Calculate the average sales for weekend campaigns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_Nx8SK1BQ3rU8gURjjpxA.jpeg" /></figure><p>3. Calculate the average sales for weekday campaigns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*5THToem11yCKHG9bLSNTKA.jpeg" /></figure><p>4. Merge the weekend and weekday tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*dB4dS25HosulSPa7W7X5Fg.jpeg" /></figure><p>5. Create a bar chart based on the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*ZhOpNgqoCUNZsdVOoECcug.jpeg" /></figure><p>here is the bar chart result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jz-thEOSnFsElABsRgIMNQ.jpeg" /></figure><p>Next, we will address the following questions.</p><ol><li>Storing data for weekends and weekdays in the form of Pandas DataFrames.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Jx6ZTooACg5XcNtylakkQ.jpeg" /></figure><p>2. Calculating the average daily sales for weekends (Saturday and Sunday) vs. the average daily sales for weekdays (Monday-Friday) over the entire 3-month period.<br>Here is the script and its execution results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J5vb5xEWn_dynvlU-ogDYw.jpeg" /></figure><p>In conclusion, this portfolio showcases a series of analytical tasks performed using Python to address various business inquiries. The provided scripts and steps demonstrate the process of data manipulation, filtering, and analysis to derive meaningful insights for decision-making. From determining top products for awards to assessing sales trends during specific campaigns, the portfolio highlights the versatility of Python in handling real-world data challenges. These solutions contribute valuable information to different departments, including Marketing, Warehouse, and Digital Marketing, facilitating informed decisions and strategies. Through this portfolio, I have demonstrated my proficiency in utilizing Python for data analysis, providing actionable insights to support organizational goals.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f6e2b611927" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Final Project Portofolio — SQL]]></title>
            <link>https://medium.com/@dewisafitri_/final-project-portofolio-sql-650d7d618ad6?source=rss-4f62c2be31ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/650d7d618ad6</guid>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[postgresql]]></category>
            <dc:creator><![CDATA[Dewi Safitri]]></dc:creator>
            <pubDate>Thu, 24 Aug 2023 09:15:51 GMT</pubDate>
            <atom:updated>2023-08-29T09:07:20.323Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Final Project Portofolio — SQL</strong></h3><p>I am honored to present an all-encompassing portfolio as a data analyst, encapsulating my profound expertise and accomplishments within the realm of data analysis. Anchored in an unwavering dedication to precision and insightful decision-making, I have adeptly navigated intricate datasets, extracted actionable insights, and seamlessly translated them into meaningful business solutions. As a devoted data analyst, my journey is defined by an unwavering pursuit of excellence, an ardent passion for deciphering intricate patterns, and a proven track record of delivering results that propel strategic growth.</p><p>My voyage as a data analyst is intricately woven with an extensive utilization of SQL to unearth invaluable intelligence from raw datasets. By crafting intricate queries, optimizing performance, and orchestrating large-scale database management, I have exhibited a systematic approach to information retrieval and manipulation. This aptitude, coupled with my skill in translating intricate SQL outcomes into coherent and actionable recommendations, underscores not only my technical prowess but also my commitment to harnessing data as a potent catalyst for organizational advancement.</p><p>Within this portfolio, I will be collaborating with datasets sourced from MySkill through a data analysis bootcamp, leveraging PostgreSQL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aMeQ8qlnMcE8ae4hj2POUw.png" /></figure><p>The datasets to be employed are as follows:</p><p>1. order_detail<br> 2. sku_detail<br> 3. customer_detail<br> 4. payment_detail</p><p>Pertaining to the dataset explanations:</p><p>order_detail:<br> 1. id → unique order identifier / id_order<br> 2. customer_id → unique customer identifier<br> 3. order_date → date of transaction<br> 4. sku_id → unique product identifier (sku stands for stock keeping unit)<br> 5. price → price indicated in price tags<br> 6. qty_ordered → quantity of items purchased by the customer<br> 7. before_discount → total price value of the product (price * qty_ordered)<br> 8. discount_amount → total product discount value<br> 9. after_discount → total product price after applying the discount<br> 10. is_gross → indicates if the customer has not yet paid for the order<br> 11. is_valid → indicates if the customer has made the payment<br> 12. is_net → indicates if the transaction is completed<br> 13. payment_id → unique payment method identifier</p><p>sku_detail:<br> 1. id → unique product identifier (can be used as key for joins)<br> 2. sku_name → name of the product<br> 3. base_price → price of the item as indicated in price tags<br> 4. cogs → cost of goods sold / total cost to sell 1 product<br> 5. category → product category</p><p>customer_detail:<br> 1. id → unique customer identifier<br> 2. registered_date → date when the customer began their membership registration</p><p>payment_detail:<br> 1. id → unique payment method identifier<br> 2. payment_method → payment method used</p><p>The schema of these tables is presented below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*kZQe_dqmwlifTIpPY0pubg.jpeg" /></figure><p><strong>Question 1: During transactions that occurred in 2021, in which month did the highest total transaction value (after_discount) occur? Use is_valid = 1 to filter transaction data. Source table: order_detail.</strong></p><p>To answer this question, the following steps will be undertaken:<br>1. Display the order_date and after_discount columns using the select function.<br>2. Filter transactions by year using the where and between functions.<br>3. Filter transaction data based on is_valid = 1.<br>4. Sort the data based on after_discount values in descending order.<br>5. Display only the top record.</p><p>Below is the query that can be used to retrieve the desired data and the results of running the query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WksDEZ5ylue0wHPA3rmjfQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*ROWzMQjr7m4JNsuOp10RlA.jpeg" /></figure><p>The data indicates that during the year 2021, the highest transaction value (after_discount) was observed in the month of August, amounting to 50,252,128. From this data, several further analyses can be conducted to better understand transaction patterns and influencing factors, such as:<br>1. Seasonal Analysis: To ascertain if the August transaction surge is a consistent trend every year or a unique occurrence in 2021.<br>2. Year-on-Year Comparison: To determine if this transaction increase is a new phenomenon or a recurring trend from previous years.<br>3. Promotion Analysis: Investigating whether specific promotional campaigns were conducted in August and whether this increase is related to any particular discounts or promotions offered.<br>4. Etc.</p><p><strong>Question 2: During transactions in 2022, which category generated the highest total transaction value? Use is_valid = 1 to filter transaction data. Source table: order_detail, sku_detail.</strong></p><p>The steps to answer this question are as follows:<br>1. Display the category column using the select function.<br>2. Calculate the total sales using the sum function on the after_discount column.<br>3. Merge the order_detail and sku_detail tables using the left join function.<br>4. Filter transactions for the year 2022 using the where and between functions.<br>5. Filter transaction data based on is_valid = 1.<br>6. Group the data by category.<br>7. Sort the data based on total sales values in descending order.<br>8. Display the top 1 record.</p><p>Below is the query for retrieving the desired data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQfl1pwQjV5i6HKeAqQqZQ.jpeg" /></figure><p>The results of running the query are as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*2iOMJZ3VaLM0vTwGbjPHow.jpeg" /></figure><p>The data indicates that during the year 2022, the “Mobiles &amp; Tablets” category had the highest total sales value, amounting to 1,836,903,152. Further analyses that can be conducted as a data analyst include:<br>1. Category Growth Analysis: Analyzing the growth trend of the “Mobiles &amp; Tablets” category over recent years to determine if the growth is consistent or fluctuating.<br>2. Contribution to Total Revenue: Evaluating the contribution of “Mobiles &amp; Tablets” to the overall company revenue to understand its significance.<br>3. Product Segmentation: Identifying specific products within the “Mobiles &amp; Tablets” category that contribute significantly to total sales and understanding their market performance.<br>4. Technology Trends: Identifying any technology or product feature trends that may be driving the success of the “Mobiles &amp; Tablets” category.<br>5. Etc.</p><p><strong>Question 3: Compare the transaction values of each category between 2021 and 2022. Identify which categories experienced an increase and which ones experienced a decrease in transaction values from 2021 to 2022.</strong></p><p>The steps to answer this question are as follows:<br>1. Display the category column using the select function.<br>2. Calculate total unique orders using the count distinct function on customer IDs.<br>3. Merge the order_detail and sku_detail tables using the left join function.<br>4. Filter transaction data based on is_valid = 1.<br>5. Group the data by category.<br>6. Calculate the difference in total sales between 2021 and 2022.<br>7. Sort the data based on the difference in total sales.</p><p>Below is the intended query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ahqeGCt0LN1gtS2N-8HUoA.jpeg" /></figure><p>An alternative approach to address this question is through the use of a Common Table Expression (CTE). CTEs are valuable for simplifying complex queries, segregating logic, and enhancing readability. The query created utilizing the CTE method is presented below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GjOaw---HmA7gnWm0LmDIg.jpeg" /></figure><p>The results from both the initial method and the CTE method are as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EUdw8nTfqge-507VFXfyLg.jpeg" /></figure><p>The data indicates that the category experiencing the greatest increase is “Mobiles &amp; Tablets,” while the category facing a decline is “Others.” From this data, several advanced analyses can be conducted:<br>1. Analysis of Increased Total Sales:<br> — What factors contributed to the increase in specific categories? Are there new products or features captivating customers?<br> — Are there shifts in trends impacting sales? For example, new product launches, technological changes, or lifestyle trends.<br> — Why did certain categories experience a decline? Is it due to reduced demand or other factors such as heightened competition from other categories?<br>2. Promotion Analysis:<br> — Did specific promotional campaigns influence the sales increase? Do these promotions have lasting effects or are they temporary?<br>3. Etc.</p><p><strong>Question 4: Display the top 5 most popular payment methods used during 2022 (based on total unique orders).</strong><br>The steps to answer this question are as follows:<br>1. Display the payment_method column using the select function.<br>2. Calculate the total unique orders using the count distinct function on the customer ID.<br>3. Merge the order_detail and payment_detail tables using the left join function.<br>4. Filter data for the year 2022 using the where and between functions.<br>5. Filter data based on value is_valid = 1.<br>6. Group the data by payment_method.<br>7. Sort the data based on total unique orders in descending order.<br>8. Limit the data to the top 5 records.</p><p>Below is the query for retrieving the desired data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NvTq5FCf91EvK1DNf8AVzw.jpeg" /></figure><p>The results of running the query are as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*26lWDjJCtZDPDp36uPcZWQ.jpeg" /></figure><p>The data has demonstrated the top 5 payment methods most frequently used during 2022 (based on total unique orders). From this data, further advanced analyses can be conducted, including:<br>1. Payment Proportion Analysis: Calculating the proportion or percentage of each payment method relative to the total overall orders. This aids in understanding the contribution of each payment method to the company’s revenue.<br>2. Payment Method Trend Analysis: Are there trends in payment method preference changes from year to year? Are there emerging payment methods gaining popularity?<br>3. Cost and Profit Analysis: Do certain payment methods incur higher transaction costs than others? How do these costs impact profit margins?<br>4. Transaction Success Rate Analysis: Are there discrepancies in transaction success rates for different payment methods? Are there methods with a higher likelihood of encountering issues? And more.</p><p><strong>Question 5: Rank these 5 products based on their transaction values: 1. Samsung 2. Apple 3. Sony 4. Huawei 5. Lenovo. Use is_valid = 1 to filter transaction data. Source table: order_detail, sku_detail.</strong><br>The steps to answer this question are as follows:<br>1. Standardize the product names to simpler forms, i.e., Samsung, Apple, Sony, Huawei, and Lenovo, using the case when and like functions.<br>2. Calculate total sales using the sum function.<br>3. Merge the order_detail and sku_detail tables using the left join function.<br>4. Filter data for the year 2022 using the where and between functions.<br>5. Filter data based on value is_valid = 1.<br>6. Group the data by product_brand.<br>7. Sort the data based on total sales in descending order.</p><p>Below is the query for retrieving the desired data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GjOaw---HmA7gnWm0LmDIg.jpeg" /></figure><p>Below is the query in question and its corresponding results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*y2kA8fqFRiOMzSKjq1J5_A.jpeg" /></figure><p>The data has presented the ranking of these 5 products based on their transaction values. From this data, advanced analyses can be pursued, such as:<br>1. Contribution to Revenue Analysis: Calculating the contribution of each product to the total revenue. This aids in identifying products with the most substantial contributions to the company’s revenue.<br>2. Correlation with Promotions Analysis: Is there a correlation between product sales and specific promotional campaigns? Are there increased sales after the launch of promotions or discounts?<br>3. Price Analysis: How does product price influence sales? Are there higher-priced products that also yield significant transaction values?<br>4. Profit Analysis: Do products with higher transaction values also generate significant profits? What are the profit margins for each product?<br>5. Customer Review Analysis: Is there a correlation between positive or negative customer reviews and product sales performance? How do reviews impact sales?<br>6. Etc.</p><p>As I conclude this portfolio, I sincerely hope that this exposition has demonstrated my strong commitment to the pivotal role of SQL in data analysis. I believe that a solid foundation in utilizing SQL to unearth valuable insights from data can significantly contribute to supporting fact-based decision-making and strategic growth of an organization. With eagerness, I am prepared to continue delving into the intricacies of data, applying my knowledge, and further honing my skills to confront the evolving challenges of data analysis. With a steadfast belief in untapped potential, I aspire to continue delivering a positive impact through my role as a data analyst, capable of transforming information into meaningful knowledge.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=650d7d618ad6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python]]></title>
            <link>https://medium.com/@dewisafitri_/python-ff2cd70bee6c?source=rss-4f62c2be31ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff2cd70bee6c</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Dewi Safitri]]></dc:creator>
            <pubDate>Wed, 23 Aug 2023 08:21:39 GMT</pubDate>
            <atom:updated>2023-08-23T08:21:39.398Z</atom:updated>
            <content:encoded><![CDATA[<p>Python is a widely-used high-level programming language known for its versatility. Developed in the late 1980s, Python stands out due to its easily readable and understandable syntax. It supports object-oriented, functional, and procedural programming paradigms, making it suitable for a wide range of projects, from web development to data science, artificial intelligence, automation, and more.</p><p><strong>WHY PYTHON?</strong><br> — Easy to learn, especially for beginners.<br> — Clear and efficient syntax.<br> — An interpreted language, well-suited for dynamic programming (like data manipulation).<br> — Boasts an extensive ecosystem for both web development and data analysis.</p><p><strong>Here are few important things about python:</strong></p><ul><li>Introduction to Notebooks: Notebooks (like Colab or Jupyter Notebook) harness Python’s capabilities as an interpreted language using a block-based coding system. This enables the dynamic execution of code block by block. Here’s an example.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*6QPxqeqKvwTpfI631JttmQ.jpeg" /></figure><ul><li>Python is capable of performing mathematical operations based on their priority from highest to lowest.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*qWGrZnQuejvcDwSoDOTR3w.jpeg" /></figure><ul><li>Variables in programming are used to store data, information, or values. In Python, variables are assigned using the ‘=’ operator. In the example provided, the number 2 is assigned to the variable ‘value,’ and the word “Imam” is assigned to the variable ‘name.’ The ‘print()’ function is used to display variable contents in the console.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*oygiRYrvdlV4-D3pubRn3A.jpeg" /></figure><ul><li>Here are the Data Types in Python.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*ZVzN6vM9nQpqGtQ1xIpVLg.jpeg" /></figure><ul><li>Data Collection:<br>In Python, data collections can be stored in forms like lists, tuples, sets, and dictionaries.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3xElpJgFGgpqK-vvoLKAPQ.jpeg" /></figure><ul><li>Errors in Python:<br>Below are examples of error messages in Python that indicate issues within the input script.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lzl_oh4KP52P1V-GG2wk0w.jpeg" /></figure><ul><li>Object Types in Python:<br>Python is an object-oriented language. There are various object types in Python. Let’s start with the most common ones: strings, integers, and floats. Every time you work with text in Python, you’re using string objects. On the other hand, the most common numeric types are integers (e.g., -1, 0, 100) and floats, which represent real numbers (e.g., 3.14, -42.0).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8KmW7WvEsioORMr8yEr90Q.jpeg" /></figure><p><strong>MINI TASK:</strong><br><strong>Create a comprehensive personal biodata using a dictionary, then attempt to retrieve and display your nickname using a key.</strong></p><p>Below are the script and the output for this task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*TPrUBqPnb0fFekoAmRk1Vw.jpeg" /></figure><p><strong>Working with Pandas:</strong><br>Before starting the task, it’s essential to ensure the required module is imported. Here’s the script for it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*ZvFpSdgCTMU5MYE2GvUybw.jpeg" /></figure><p>Next, we’ll import a dataset, which can be done through various methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-HY6yDNKpBypSc3ICKJ7A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*WPsLemWzFCVnnjeoO26_ew.jpeg" /></figure><p><strong>MINI TASK:</strong><br><strong>Question 1: Compare the number of immigrants from India and China from 1980 to 2013.</strong></p><p>Step 1: Obtain the dataset for China and India, and display the data frame.<br>Below is the script and its output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*hHR-Qg4WRmJFCwPX01aBQg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S048R3gP6si9sAqY1MGx3g.jpeg" /></figure><p>Step 2: Plot the graph.</p><p>We’ll explicitly specify a line plot by passing the ‘kind’ parameter to ‘plot()’. Since ‘df_CI’ is a data frame with ‘Country’ as an index and years as columns, we need to transpose it using the ‘transpose()’ method to switch rows and columns before creating the graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*klIbyZCZr-I99d79dT668A.jpeg" /></figure><p>Below is the script to create the graph based on the question, along with the output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FX0LR8osjTQfA8YygB-cNQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*FP3n_5PQl4RenjvBfSQpOw.jpeg" /></figure><p><strong>Question 2: Compare the trend of the top 5 countries contributing the most to immigration to Canada.</strong><br>Below is the script to answer this question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bxR4-zF-jaZdDCIAlYJYsw.jpeg" /></figure><p>Here’s the requested graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KQyiTX_qiVaq7uHJdDMBew.jpeg" /></figure><p><strong>Python in Data Analysis:</strong><br>In this section, we’ll explore some applications of Python in data analysis that we’ll practice.<br>1. Convert the Date column to Datetime type.<br>2. Create additional columns for day, month, and month number.<br>3. Filter by month and year.<br>4. Use ‘sort_values’.<br>5. Utilize ‘pivot_table’ and ‘groupby’.<br>6. Transform groupby output into a DataFrame.<br>7. Create and use simple functions on a DataFrame.<br>8. Generate simple visualizations using matplotlib.<br>9. Execute SQL in Colab using sqlite3.</p><p><strong>Question 1: Display the top 5 cities during 2016 based on the highest profit</strong> values. Also, visualize the data using a bar chart.<br>Below is the script to display the top 5 cities and its output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*XBIcATCtL3vPT-WklQzatA.jpeg" /></figure><p>Next, create a bar chart from the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*81LshljM5dWAgzhGOp39Gg.jpeg" /></figure><p>Below is the requested bar chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r488roEY4muQ-7OVpbaEsw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff2cd70bee6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BigQuery]]></title>
            <link>https://medium.com/@dewisafitri_/bigquery-e88cddc18735?source=rss-4f62c2be31ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/e88cddc18735</guid>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Dewi Safitri]]></dc:creator>
            <pubDate>Sat, 19 Aug 2023 05:36:03 GMT</pubDate>
            <atom:updated>2023-08-19T05:36:03.510Z</atom:updated>
            <content:encoded><![CDATA[<p>BigQuery is a cloud-based data analytics service provided by the Google Cloud Platform (GCP). It stands as one of the many offerings within GCP designed to enable the management, analysis, and extraction of insights from data with scalability and high-speed capabilities. Functioning as a data warehouse, BigQuery is adept at storing and managing large and diverse volumes of data from various sources. It leverages distribution techniques and parallel processing to facilitate fast and efficient data querying. Users can execute SQL queries to analyze data, generate reports, and gain insights based on analytical inquiries.</p><p>In this portfolio section, I will present a variety of queries aimed at addressing business inquiries using the BigQuery software. The questions and datasets utilized in this context are sourced from the Data Analysis Bootcamp hosted by MySkill.</p><p><strong>Task 1. Display Loss-Incurring Transactions Occurring Between 2018 and 2019 in the City of Los Angeles, Sorted by Greatest Loss.</strong><br>To address this inquiry, data needs to be filtered based on the order year (order_date) and city, with the focus on displaying only Los Angeles data and transactions with negative profits. Below is the query that can be utilized to present this data, along with the resulting output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*xXJoJJlVg3GJG8Tf7g-s8Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*SCctzv5FvbOclKW0vDHpfw.jpeg" /></figure><p>From the results, it is discernible that loss-incurring transactions took place in the years 2018 and 2019 in Los Angeles. This dataset serves as an initial point for conducting further analyses to comprehend the patterns and characteristics of these transactions. The first step is to analyze the temporal trends of loss-incurring transactions in Los Angeles during 2018 and 2019. This could involve generating graphs or visualizations to ascertain whether certain months exhibit a higher incidence of loss-incurring transactions.</p><p>Furthermore, it’s possible to analyze the most common transaction types associated with these loss cases. Identifying these types may reveal specific patterns related to particular locations, customer types, or influencing factors. Spatial analysis, such as mapping the locations of these loss-incurring transactions in Los Angeles, could reveal geographical patterns linked to regions susceptible to such activities.</p><p>By delving deeper into the data, potential causes of these loss-incurring transactions can be identified. This can lead to the development of preventative action recommendations and strategies to mitigate the impact of such transactions in the future. The insights garnered from this analysis can provide invaluable guidance for future security policies and risk mitigation strategies.</p><p><strong>Task 2. Display Profitable Transactions Occurring in Q1 2018 in Henderson, Sorted by Greatest Profit.</strong><br>To display this information, we must filter the data to only show profitable transactions, filter the transaction date (order_date) to display transactions occurring during Q1 of 2018, and limit the results to transactions in the city of Henderson. The query below demonstrates this and provides the outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*EonDY8SyFF6OGz-mmYGtvw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*ku7kFIuHiViJvnXH6gk1_g.jpeg" /></figure><p>From the data concerning profitable transactions during Q1 2018 in Henderson, several pertinent findings can be deduced, each of which bears significant implications for business analysis and decision-making. The following aspects can be gleaned from the data:</p><p>1. Early-Year Financial Performance: Profitable transactions during Q1 2018 indicate a positive financial standing for businesses or sectors in the city of Henderson at the beginning of the year. This may be attributed to factors like holiday seasons, special events, or prevailing consumption trends in Q1.</p><p>2. Growth Potential: The elevated volume of profitable transactions during this period suggests a potential for business growth in Henderson. This may motivate the business team to identify successful strategies from Q1 and harness them for further growth endeavors.</p><p>3. Trend and Customer Preference Analysis: By assessing the most prevalent types of products or services resulting in profitable transactions, we can discern trends and customer preferences during Q1 2018. This information aids in designing product offerings aligned with customer needs.</p><p>4. Reasons for Performance Changes: Significant fluctuations in profitable transactions compared to preceding or subsequent periods could indicate changes in market behavior or external factors influencing business performance in Henderson.</p><p>5. Marketing Evaluation: Should there be a sharp increase in profitable transactions during Q1 2018, further analysis can help determine whether specific marketing campaigns or promotional tactics contributed to this outcome.</p><p>6. Enhanced Competitiveness: Notable growth in profitable transactions may signify increased competitiveness within Henderson’s business landscape. This analysis could prompt discussions on maintaining competitive advantage and fostering ongoing innovation.</p><p>In this analytical sequence, the subsequent step involves conducting further investigations and delving deeper to comprehend the context underlying these findings. Advanced analytical tools, such as statistical modeling or machine learning, can also aid in identifying more complex relationships influencing business performance in Q1 2018 in Henderson.</p><p><strong>Task 3. Display the Best-Selling Products (product_name).</strong><br>To showcase the best-selling products, we can employ aggregate sum syntax and group by clauses to calculate the quantity sold for each product. The query below demonstrates the presentation of this data, along with the ensuing results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*_RzoO99_9bfeBnKh9AAOSQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*JjkONq-_iQUPeyysRx8O5w.jpeg" /></figure><p>The table has effectively displayed the sold quantities for each product. From this data, pivotal aspects emerge that contribute to analysis and decision-making. The following key insights can be gleaned from the data:</p><p>1. Top-Performing Products: By analyzing sold quantities, we discern products that exhibit the highest sales performance. This information aids in recognizing market-popular products that significantly contribute to revenue.</p><p>2. Product Performance Comparison: A comparative analysis of sold quantities across various products affords insights into their relative performances within the portfolio. This facilitates identification of high-demand products with growth potential.</p><p>3. Popularity Trends: Tracking changes in sold quantities over time reveals product popularity trends. Such insights are invaluable for devising marketing strategies and inventory management in response to demand fluctuations.</p><p>4. Product Associations: Scrutinizing sold quantities of related or frequently co-purchased products unveils correlations in customer transactions. This insight guides cross-selling strategies or bundled offerings.</p><p>5. Seasonal Analysis: By assessing sold quantities over different time periods, seasonal demand patterns can be identified. This guides targeted marketing campaigns or promotions during specific periods.</p><p>6. Inventory Planning: Through sold quantity analysis, efficient inventory management and stocking strategies can be planned. This insight prevents stockouts or excessive inventory accumulation.</p><p>7. Consumer Behavior Insights: This data provides insights into consumer preferences, such as favored product types or demand trends. This informs more tailored marketing strategies aligned with customer needs.</p><p>8. Product Profitability Analysis: Comparing sold quantities with product profit margins enables measurement of individual product profitability. This aids in identifying products with the highest contribution to profits.</p><p>With deeper analysis through appropriate analytical tools, more intricate correlations can be identified between factors such as price, promotions, or external influences, and sold quantities. These insights provide valuable guidance for informed business decisions and the development of effective sales strategies.</p><p><strong>Task 4. Display the Most Unprofitable Products in 2017.</strong><br>To exhibit the most unprofitable products in 2017, we can filter data based on profit and transaction dates (order_date), focusing solely on transactions with profit &lt; 0 occurring in the year 2017. The query below demonstrates this approach and provides the executed outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*Gf4nRi6civoQepgcUfDquA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*oNP4y1s2pl-pTpOPzJyufA.jpeg" /></figure><p>From this data, several important insights can be extracted to inform analysis and decision-making. The following facets are discernible from the data:</p><p>1. Ineffectual Products: This dataset identifies products that had adverse impacts on business during 2017. It encompasses products that faced poor sales or potentially led to operational losses.</p><p>2. Marketing Strategy Evaluation: By analyzing unprofitable products, an evaluation of the efficacy of marketing strategies implemented in 2017 is possible. Consider identifying products struggling to attract customer interest or convey product value effectively.</p><p>3. Root Causes of Loss: Further analysis can ascertain reasons behind the unprofitability of these products. Factors such as excessive pricing, quality issues, or market competition may contribute to the products’ underperformance.</p><p>4. Segmentation and Targeting: Understanding unprofitable products aids in identifying customer segments unresponsive to these products. This presents opportunities to revisit segmentation and targeting strategies.</p><p>5. Quality Evaluation: This data prompts a deeper evaluation of the quality of unprofitable products. Thorough examination and testing might be necessary to identify potential issues.</p><p>6. Strategic Shifts: In light of these findings, there’s an opportunity to contemplate restructuring or adjusting product strategies. This might involve price changes, quality improvements, or discontinuation of unprofitable products.</p><p>7. Portfolio Diversification: The results of this analysis stimulate thoughts on product portfolio diversification. Identifying unprofitable products informs decisions about introducing new products or allocating more resources to successful ones.</p><p>8. Enhanced Customer Research: This data encourages intensified customer research to understand why these products underperformed. Gathering customer feedback and analyzing their preferences informs future product enhancements.</p><p>Through further analysis and investigation, deeper insights into factors influencing these products’ poor performance can be obtained, allowing the formulation of more effective improvement strategies.</p><p><strong>Task 5. Display a List of Customers with Transactions Exceeding $10,000 along with Transaction Values.</strong><br>To present this data, we shall filter the data based on the value obtained from the aggregate sum function applied to sales as the transaction value. Subsequently, we will display only those entries with transaction values surpassing $10,000. The following query outlines this procedure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*8PRBYLjYB2iN8kPekGO-3Q.jpeg" /></figure><p>Aside from the aforementioned method, we can also utilize Common Table Expression (CTE). A Common Table Expression (CTE) is a SQL concept used to create and manage temporary result sets or subqueries that can be utilized within one or several SQL queries. CTE offers a more structured and organized approach for composing complex queries, enhancing the readability and maintenance of SQL code.</p><p>For this task, we will create a CTE to group customers with transaction values exceeding $10,000 as “rich_customer”. The following query illustrates this approach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jiQLY2z6JEcFdDnIA9oC6w.jpeg" /></figure><p>Here are the executed results using both the initial method and the CTE approach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*W90C-0TDCppgQYARj56NNg.jpeg" /></figure><p>Task 6. Calculate the Average Transaction Value from the List of Customers in Task 1.<br>Based on the preceding data, our next step is to calculate the average transaction value from the mentioned customer list. The approach involves using the aggregate average function applied to the transaction values within the designated customer group. The following query illustrates this procedure, along with the results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*8v3Tq_BtbYsXOaoI-HR_GQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*RxoJb2WioD7UAJUPPGc1jg.jpeg" /></figure><p><strong>Task 7. Display a List of Customers with Transaction Values Exceeding the Average (Task 2).</strong><br>Derived from the calculated average transaction value, we shall then display customer data from this group with transaction values surpassing the computed average. The following query can be employed for this purpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*-HVg1KWO6zjd4MKp61jixQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*7o13gspXroCmkrp2kPLYVA.jpeg" /></figure><p>From this dataset, we can derive invaluable insights that contribute to business analysis and decision-making. The following are some pertinent pieces of information gleaned from this data:</p><p>1. Most Contributing Customers: By analyzing customers with transaction values exceeding $10,000, we can identify the customers that significantly contribute to the company’s revenue. This aids in recognizing pivotal customers worthy of special attention or incentives.</p><p>2. Customer Segmentation: Through this data, we can discern characteristics and behaviors of customers conducting transactions beyond $10,000. This facilitates the development of more refined and focused segmentation strategies to cater to diverse customer needs.</p><p>3. Preferred Products and Services: Analyzing products or services purchased by high transaction value customers unveils those most preferred by this customer segment. This information enhances marketing and product offering strategies.</p><p>4. Relationships and Cross-Selling Opportunities: This data sheds light on potential associations between products or services purchased by high transaction value customers, opening avenues for more effective cross-selling strategies.</p><p>5. Consumption Trends: By observing transactions exceeding $10,000 over time, consumption trends influencing future customer purchases can be identified. This aids in marketing strategy planning and inventory management.</p><p>6. Customer Loyalty: The data assists in measuring customer loyalty, particularly if high transaction value customers are repeat purchasers. This information can be utilized for developing loyalty programs or customer incentives.</p><p>Through further analysis and integration with additional datasets, more profound insights and specific information about high transaction value customers can be attained. These insights serve as the foundation for crafting smarter marketing strategies and improved decision-making.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e88cddc18735" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQLite — Simple Data Analysis]]></title>
            <link>https://medium.com/@dewisafitri_/sqlite-simple-data-analysis-5d3c4c92d373?source=rss-4f62c2be31ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d3c4c92d373</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sqlite]]></category>
            <dc:creator><![CDATA[Dewi Safitri]]></dc:creator>
            <pubDate>Fri, 18 Aug 2023 12:22:05 GMT</pubDate>
            <atom:updated>2023-08-18T12:22:05.341Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQLite — Simple Data Analysis</h3><p>SQLite is a well-known relational database management system renowned for its compact size, user-friendliness, and ability to operate as a single-file database. It is an open-source software widely employed across diverse applications and platforms. SQLite eliminates the need for a separate server and can be seamlessly integrated into applications.</p><p>Differing slightly from PostgreSQL, data import in sqlite.online allows for direct CSV data import without the necessity of querying column names and data types for each column. The process is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*SrucCC_MinBDyx5vDBEAzA.jpeg" /></figure><p><strong>Data Analysis</strong><br><strong>Task 1. Display the names of Consumer segment customers who have made purchases of tables.</strong></p><p>The initial task entails presenting only the names of consumers who have made table purchases. This can be accomplished by filtering the subcategory column to exclusively display ‘Tables’ data. The pertinent query is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*CG5ALmlOvonm0TI7DbNR2w.jpeg" /></figure><p>The resulting output from executing this query is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*qSXq_AClE1AxxLZMPZWs3A.jpeg" /></figure><p>From the presented table of consumers who have purchased tables, several insightful aspects can be deduced, providing valuable insights for consumer analysis and business strategies. The following are key points inferred from the data:</p><p>1. Product Demand for Tables: Through this data, demand levels for table products can be identified. This analysis aids in gauging product popularity, detecting purchasing trends for tables, and facilitating effective inventory management.<br>2. Customer Profiles: The data allows for the identification of customer profiles more inclined toward table purchases. Factors such as age, gender, geographic location, or style preferences can be involved. This information is invaluable for crafting more targeted and effective marketing campaigns.<br>3. Cross-Selling Opportunities: If other products are frequently purchased alongside tables, opportunities for bundling or offering discounts can be identified.<br>4. Price and Value Analysis: Transactional table data enables the analysis of relevant price and value trends for customers. This insight can aid in determining optimal pricing and assessing customer spending tendencies on table purchases.<br>5. Seasonal Analysis: By examining data across various time periods, seasonal patterns in table purchases can be identified. This supports planning seasonal marketing campaigns or special promotions.<br>6. Marketing Effectiveness Evaluation: The data can be employed to evaluate the effectiveness of marketing campaigns focused on tables. Comparing periods before and after campaigns can quantify their impact on sales.<br>7. Customer Behavior: Analyzing this data provides insights into customer behavior, such as purchase frequency, recurring purchase patterns, and the average time between purchases.</p><p>In this context, deeper analysis can be performed using analytical tools and statistical modeling to identify more complex trends, test hypotheses, and develop more informed and targeted business strategies. By leveraging this data, businesses can take more informed and efficient steps to meet customer needs and optimize sales strategies.</p><p><strong>Task 2. Display the names of customers from the Corporate and Home Office segments originating from Los Angeles city and having transactions during the year 2018.</strong></p><p>To achieve the desired data presentation, filters need to be applied to the segment column to exclusively show Corporate and Home Office consumer data, the city column to display only Los Angeles, and the order_date column to display transactions made during the year 2018. The following is the query and its resultant output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*WXuVFMLX9aeTuu7d9ZHuog.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*4fLL1C2enV6fsgf-iXbXcQ.jpeg" /></figure><p>The displayed table presents transaction data from the Corporate and Home Office segments originating in Los Angeles and transacting during 2018. Key insights gleaned from this data aid in further analysis and strategic decision-making:</p><p>1. Customer Segmentation: By segregating transaction data based on customer segments (Corporate and Home Office), differences in purchasing patterns, product preferences, and transaction behavior between these segments can be identified. This offers valuable insights into understanding the needs and preferences of each segment.<br>2. Segment Performance: Analyzing the total transaction value for each segment enables the evaluation of relative performance between the Corporate and Home Office segments. This helps identify segments contributing most to revenue and opportunities for business growth.<br>3. Popular Products: Transaction data helps identify products most frequently purchased by the Corporate and Home Office segments in Los Angeles. This aids in planning inventory strategies, promotions, and product development.<br>4. Seasonal Trends: Analyzing data over 2018 reveals seasonal patterns in purchases for both segments. This aids in planning marketing campaigns or special offers focused on specific periods during the year.<br>5. Average Transaction Analysis: Calculating the average transaction value for both segments sheds light on the average product quantity purchased by customers in each segment. This also helps measure customer loyalty and value.<br>6. Campaign Success Evaluation: If specific periods in 2018 experienced transaction increases, they can be linked to specific marketing campaigns or promotions conducted during those times.<br>7. Profitability Analysis: Comparing total transaction values with customer acquisition costs and related operational expenses allows measuring the profitability of each customer segment.<br>8. Strategy Development: The data identifies opportunities to develop more segmented and effective marketing strategies, as well as adjust product offerings based on the preferences and needs of the Corporate and Home Office segments.</p><p>In this analysis, the next step involves advanced analytical techniques such as statistical modeling or machine learning to identify more intricate relationships between variables present in the data. This provides richer insights, aiding in formulating better-informed business strategies.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d3c4c92d373" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PostgreSQL — creating database]]></title>
            <link>https://medium.com/@dewisafitri_/postgresql-creating-database-275fd725c231?source=rss-4f62c2be31ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/275fd725c231</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Dewi Safitri]]></dc:creator>
            <pubDate>Thu, 17 Aug 2023 13:02:40 GMT</pubDate>
            <atom:updated>2023-08-17T13:02:40.421Z</atom:updated>
            <content:encoded><![CDATA[<h3>PostgreSQL — creating database</h3><p>A Database Management System (DBMS) is a software designed to manage, store, organize, and retrieve data within a database. DBMS facilitates structured, efficient, and secure data management. A database, in itself, is a well-organized collection of data, which can encompass various types of information such as text, numbers, images, videos, and numerous other data formats. To process data within a DBMS, SQL (Structured Query Language) is required. SQL is a programming language used to manage and access relational databases. It empowers users to create, modify, and delete data structures within a database, as well as execute data retrieval (query) for analysis or other purposes. It stands as the standard language for communication with Relational Database Management Systems (DBMS).</p><p>There exist numerous SQL commands, which can be categorized into five functional groups:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*g7rujYn_yhiA07by-FWbtQ.jpeg" /></figure><p>Example of popular DBMS include MySQL, PostgreSQL, Oracle Database, Microsoft SQL Server, MongoDB, and many more. The choice of the appropriate DBMS depends on specific organizational or project requirements, such as the type of data to be stored, data volume, query complexity, and other factors. In this section, I will employ PostgreSQL to process and analyze data, aiming to extract valuable insights crucial for a company.</p><p><strong>Data Preparation</strong><br>Before commencing, it is essential to create a database and tables. The following steps outline the process of creating a database in PostgreSQL:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*hiU4Shxqikgrzb4eMlHgBQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*76WU1P33N-QUT66g8s5Mzg.jpeg" /></figure><p>This is the database that has been established.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*ts-dLJjtMTMHdNNppX804Q.jpeg" /></figure><p>Once the database is created, the subsequent step involves crafting tables. In PostgreSQL, tables are created using queries, specifically the CREATE TABLE query. Here’s an example query to generate a table with the necessary columns and data types within the “tokopaedi” database, along with the resultant table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/219/1*yWwEAue2y9sxzjaiQUCawQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*lYnGo6NBsJVhGvdtWEeJUQ.jpeg" /></figure><p>Following table creation, data will be populated into the table using the data import feature, employing a .csv file provided by MySkill. The subsequent steps illustrate this process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/257/1*Rppx3aaVnEDfr1JsAqTlzg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*S2tmtdOLJ__uAnJ7JZSFew.jpeg" /></figure><p>The outcome of the preceding data import process is depicted below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*-nekD3WIby1uyVbSE7KMSQ.jpeg" /></figure><p>In this meticulous endeavor, I endeavor to harness the capabilities of PostgreSQL to systematically transform raw data into meaningful insights, thus contributing to informed decision-making within the organizational context.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=275fd725c231" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Spreadsheet]]></title>
            <link>https://medium.com/@dewisafitri_/google-spreadsheet-25e0f20621a5?source=rss-4f62c2be31ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/25e0f20621a5</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[spreadsheet-to-database]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Dewi Safitri]]></dc:creator>
            <pubDate>Thu, 17 Aug 2023 12:34:03 GMT</pubDate>
            <atom:updated>2023-08-17T12:34:03.702Z</atom:updated>
            <content:encoded><![CDATA[<p>Google Spreadsheet is an online-based software service developed by Google for creating tables, conducting simple calculations, and manipulating data. This software is widely utilized by data analysts due to its comprehensive feature set, which aids in efficiently managing, analyzing, and presenting data. Google Spreadsheet offers the advantage of easy sharing and collaboration, a change history feature, convenient accessibility, and cost-effectiveness.</p><p><strong>Data Preparation</strong><br>Before harnessing Google Spreadsheet to process data, it is necessary to import the data into Google Spreadsheet. The process of importing data into Google Spreadsheet can be carried out from various sources such as CSV (Comma Separated Value), TSV (Tab Separated Value), Excel files (.xls, .xlsx), or from URLs or websites.</p><p>In this instance, data import will be performed from a CSV file provided by MySkill. The following are the steps for importing data from both local storage and Drive:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/247/1*qnM4AU-JGMgM_TSp6Bi0uA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*57hWXnljTNpOWAK5RekODw.jpeg" /></figure><p><strong>Data Formatting &amp; Cleansing</strong><br>Data formatting serves the purpose of aligning the data format with the required format for analysis, while data cleansing aims to refine the data by removing unnecessary information, resulting in a data frame that contains only the necessary data.</p><p>In this dataset, the format of the “discount” column is transformed into a percentage format, and the formats of the “sales” and “profit” columns are converted into dollar currency format with a maximum of two decimal places. This formatting step is executed using the number formatting feature provided in the spreadsheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*sKi8C34xIKkyihiUGkQKVg.jpeg" /></figure><p>Subsequently, negative profit values are highlighted in red to facilitate observation. This is achieved by configuring conditional formatting, as depicted in the illustration, so that profit values less than 0 are colored in red.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*NdCKrCAcjZqHEV3DM_hihg.jpeg" /></figure><p>The next step involves converting the data format into proper case using the text formatting function “proper()”. This formula comprehensively corrects the text data format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*G69LhuvQw3OKQ2I0qBFPQQ.jpeg" /></figure><p>Following that, duplicate data is removed using the “remove duplicates” feature, accessible through:<br>Data -&gt; Data cleanup -&gt; Remove duplicates<br>The specified columns for removal of duplicates are order_id, customer_id, postal_code, and product_id.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*rVtx1oH8BEdF8B6UfWIPuw.jpeg" /></figure><p>The final step is data validation, aimed at minimizing input errors that could lead to inconsistent or improper data. Data validation can be accessed through:<br>Data -&gt; Data validation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*6zqTC2pSEUSS-gXVwED1Uw.jpeg" /></figure><p>And thus concludes the data analysis tasks using Google Spreadsheet. The subsequent section will delve into the upcoming task using SQL. Until then, looking forward to the next part :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25e0f20621a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>