<?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 Novita Fitriani on Medium]]></title>
        <description><![CDATA[Stories by Novita Fitriani on Medium]]></description>
        <link>https://medium.com/@novitaftr?source=rss-3fffb5c33015------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ETH_J_pMAtAd4ZDq</url>
            <title>Stories by Novita Fitriani on Medium</title>
            <link>https://medium.com/@novitaftr?source=rss-3fffb5c33015------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:39:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@novitaftr/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[ETL Data Automation Using Airflow, MySQL, and PostgreSQL]]></title>
            <link>https://medium.com/@novitaftr/etl-data-automation-using-airflow-mysql-and-postgresql-4fac33132282?source=rss-3fffb5c33015------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fac33132282</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[etl-pipeline]]></category>
            <dc:creator><![CDATA[Novita Fitriani]]></dc:creator>
            <pubDate>Wed, 25 Sep 2024 13:36:37 GMT</pubDate>
            <atom:updated>2024-09-25T13:36:37.920Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*wXiJHDAN8J4tn6S2nHCpTw.jpeg" /><figcaption>source image : <a href="https://iabac.org/blog/data-engineering-career-path">https://iabac.org/blog/data-engineering-career-path</a></figcaption></figure><h3><strong>About the Project</strong></h3><p>This project involves a simple ETL process using Apache Airflow to extract data from MySQL and load it into PostgreSQL every day at 7 AM. The processed data is stored in a staging area in Parquet format. After the ETL process is complete, a simple analysis job runs, and the results are emailed at 9 AM. There are three DAGs involved: the ETL DAG, the aggregation DAG, and the report delivery DAG.</p><p><strong>Project Background</strong></p><p>This project is designed to automate the Extract, Transform, Load (ETL) process using Airflow, focusing on efficiency and the automated transfer of data between databases. The goal is to simplify scheduled data analysis and automate the delivery of reports based on the latest data.</p><p><strong>Who Benefits<br></strong>This project provides valuable support to organizations or teams that require seamless data movement between database platforms and seek regular access to scheduled data analysis.</p><h3>Problem Statement</h3><p><strong>Main Challenge</strong></p><p>The main challenge is to automatically transfer data from MySQL to PostgreSQL every day. This ensures that the latest data is always ready for analysis, and automated reports based on this analysis are sent out at scheduled times.</p><p><strong>Objective</strong></p><p>The goal is to create a scheduled ETL pipeline using Airflow. This pipeline will extract data every day at 7 AM, load it into a staging area in PostgreSQL, aggregate the data, and send reports via email every day at 9 AM</p><h3>Data Platform Understanding</h3><p><strong>Overview</strong></p><p>Data is extracted from MySQL and loaded into PostgreSQL in a staging area using Parquet format for efficient processing and storage. After aggregation, the final results are saved in PostgreSQL tables.</p><p><strong>Data Flow Diagram</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*NW22_4Y9eDhr6Jeb-leDYQ.png" /></figure><h3><strong>Data Understanding</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*IBhupTzqlSnjMjjxr_KrGA.png" /><figcaption>This project uses data from MySQL and PostgreSQL</figcaption></figure><ul><li>This project uses simple data consisting of seven names.</li><li>The data is stored in a table in MySQL and extracted each time the process runs.</li><li>After extraction, the data is loaded into PostgreSQL and stored in Parquet format in the staging area.</li><li>During the ETL process, data quality issues such as missing values or duplicates may arise. Missing values will be filled in or removed, and duplicate names will be eliminated to ensure data accuracy.</li></ul><h3>Transformation &amp; Consideration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*W4I4rQ6LN3kYMXhXSr-WCA.png" /></figure><ul><li>The ETL process involves extracting data from MySQL using Apache Airflow’s MySqlHook.</li><li>Saving it in Parquet format to reduce file size and enhance access speed. Transforming the data for aggregation by cleaning and preparing it in a Pandas DataFrame.</li><li>Loading it into PostgreSQL while utilizing Airflow for task automation and management.</li><li>Apache Airflow is used to automate the ETL process, making task scheduling and management easier, while Parquet format is chosen for its smaller file size, faster access, and compatibility with many data tools.</li></ul><h3>Data Modeling (Business)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*ja5J8ceQJLoCBPjgVwbufQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*AG89bHZ0at5ufg7z4m7cdg.png" /></figure><p>After the ETL process, the total number of names, average name length, and first letter distribution are analyzed. Names are also categorized as Short (5 characters or less) or Long (more than 5 characters).</p><h3>Send Report Automation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*W4I4rQ6LN3kYMXhXSr-WCA.png" /></figure><p>The report delivery process runs daily at 9 AM, retrieving the latest data from the ‘user_analysis’ table using PostgresHook. If data is available, it converts it to an HTML table and sends an email titled “Daily User Analysis Report.” The process logs the success of the email delivery or if no new data is found.</p><h3>Summary</h3><p>This project successfully built an automated ETL pipeline that efficiently processes data from MySQL to PostgreSQL and sends reports with the latest information. It overcame challenges like managing database connections and missing data by using PostgresHook for easier access and adding logic to handle unavailable data.</p><h3>Recommendation</h3><p>To further improve the ETL process, it is recommended to present data in both document and visualization formats. Incorporating monitoring features, optimizing performance through parallel processing, automating data cleaning, and integrating AI/ML techniques will also improve efficiency and scalability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fac33132282" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Telco Customer Churn Analysis: A Comprehensive Exploration through Deep Dive EDA — Part 2]]></title>
            <link>https://medium.com/@novitaftr/telco-churn-patterns-a-comprehensive-exploration-through-deep-dive-exploratory-data-analysis-e99033994a92?source=rss-3fffb5c33015------2</link>
            <guid isPermaLink="false">https://medium.com/p/e99033994a92</guid>
            <category><![CDATA[churn-prediction]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[deep-dives]]></category>
            <dc:creator><![CDATA[Novita Fitriani]]></dc:creator>
            <pubDate>Mon, 11 Mar 2024 15:49:51 GMT</pubDate>
            <atom:updated>2024-03-18T03:53:49.417Z</atom:updated>
            <content:encoded><![CDATA[<h3>Telco Customer Churn: A Comprehensive Analysis through Deep Dive EDA — Part 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*nTEI03zS3cS6ktUB7xoSlQ.png" /><figcaption><a href="https://www.analyticsvidhya.com/blog/2022/01/churn-analysis-of-a-telecom-company/">Image Source</a></figcaption></figure><p>After previously analyzing Telco Customer Churn data through a series of processes, starting from Data Collection and Preparation, Data Cleansing, gaining an overview of the data (General Info), Statistical Summary, Univariate analysis, and Bivariate analysis, we will now proceed with a more in-depth analysis through the following 4 questions:</p><ol><li>What types of internet services are most commonly used by customers?</li><li>Which contract types are predominantly chosen by customers?</li><li>How does customers churn relate to having dependents, types of internet service, and contract choices?</li><li>Does the length of time using Telco’s service affect the customer churn rate?</li></ol><p>Through these four questions in the deep dive EDA, the aim is to understand, explore, and gain deep insights into Telco Customer Churn data. This process is designed to identify patterns, trends, and critical relationships within the dataset, providing a solid foundation for informed and strategic decision-making.</p><ol><li><strong>Types of internet services are most commonly used by customers</strong></li></ol><pre># Type of Internet Service wit the most commonly used by customers<br>top_internet_service = (df<br>            .groupby(&#39;InternetService&#39;)<br>            .agg(num_trx=(&#39;customerID&#39;,&#39;count&#39;))<br>            .reset_index()<br>            .sort_values(&#39;num_trx&#39;,ascending=False)<br>            )<br>top_internet_service</pre><pre># Plotting the bar chart with a reduced figure size<br>plt.figure(figsize=(10, 6))<br>bar_plot = sns.barplot(data=top_internet_service, x=&#39;InternetService&#39;, y=&#39;num_trx&#39;, hue=&#39;InternetService&#39;, palette=&#39;bright&#39;)<br><br># Adding labels to each bar<br>for index, value in enumerate(top_internet_service[&#39;num_trx&#39;]):<br>    bar_plot.text(<br>        index,<br>        value + 0.1,  # Adjust this value for vertical positioning of the label<br>        str(value),<br>        ha=&#39;center&#39;,<br>        va=&#39;bottom&#39;,<br>        fontsize=10<br>    )<br><br>plt.title(&#39;Preferred of type Internet Service&#39;)<br>plt.xlabel(&#39;Type Internet Service&#39;)<br>plt.ylabel(&#39;Number of Customers&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*QwwMotZuB_xnD8K1HHmJBw.png" /></figure><p>The most commonly used types of internet services by customers are Fiber Optic with total customers are 3096. This indicates that many customers prefer high-speed internet and are interested in advanced technology, emphasizing the importance of a stable and reliable connection in their choice of internet service.</p><p><strong>2. Contract types are predominantly chosen by customers</strong></p><pre>#  the preferred payment methods among customers<br>top_contract = (df<br>            .groupby(&#39;Contract&#39;)<br>            .agg(num_trx=(&#39;customerID&#39;,&#39;count&#39;))<br>            .reset_index()<br>            .sort_values(&#39;num_trx&#39;,ascending=False)<br>            )<br>top_contract</pre><pre># Plotting the bar chart<br>plt.figure(figsize=(10, 6))<br>bar_plot = sns.barplot(data=top_contract, x=&#39;Contract&#39;, y=&#39;num_trx&#39;, hue=&#39;Contract&#39;, palette=&#39;tab20&#39;)<br><br># Adding labels to each bar<br>for index, value in enumerate(top_contract[&#39;num_trx&#39;]):<br>    bar_plot.text(<br>        index,<br>        value + 0.1,  # Adjust this value for vertical positioning of the label<br>        str(value),<br>        ha=&#39;center&#39;,<br>        va=&#39;bottom&#39;,<br>        fontsize=10<br>    )<br><br>plt.title(&#39;Preferred of Contract&#39;)<br>plt.xlabel(&#39;Contract&#39;)<br>plt.ylabel(&#39;Number of Customers&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*NRlCTDgY3oCyY1ATCWpk2g.png" /></figure><p>Customers predominantly choose the “Month-to-month” contract type with total customers are 3875. This means that half of the customers prefer making month-to-month payments without a long-term commitment. This preference can be interpreted as an indication that customers value financial flexibility, the ability to adapt to changing needs, and the freedom to stop using the service without significant consequences.</p><p><strong>3. How does customers churn relate to Dependents, Internet Service, and Contract</strong></p><pre>ef bivariate_bar_plot(df, ordinal_columns, target_variabel, type):<br><br>    if type == &#39;bar&#39;:<br><br>        fig, axs = plt.subplots(1, 2, figsize=(12,5))<br><br>        colors = [&quot;Set2&quot;, &quot;flare&quot;]<br><br>        for index, axes in enumerate(axs.flatten()):<br><br>            plot = sns.countplot(x = ordinal_columns[index], hue = target_variabel, data=df,<br>                                 ax = axes, palette = colors[index])<br><br>            plot.set(xlabel=&#39;&#39;, ylabel = &#39;Frequency&#39;, title=ordinal_columns[index])<br><br>            for index, p in enumerate(axes.patches):<br>                height = p.get_height()<br>                x = p.get_x() + (p.get_width()/2)<br>                if x != 0.0:<br>                    axes.text(x, y = height + 30, s = &#39;{:.0f}&#39;.format(height), ha = &#39;center&#39;)<br><br>    elif type == &#39;barstacked&#39;:<br><br>        fig, axs = plt.subplots(1,3, figsize = (18,5))<br><br>        colors = [[&#39;tomato&#39;,&#39;lightseagreen&#39;], [&#39;#A569BD&#39;,&#39;#00ACC1&#39;], [&#39;#00ACC1&#39;, &#39;#FB8C00&#39;] ]<br><br>        for index, axes in enumerate(axs.flatten()):<br>            df_stack = df.groupby([target_variabel, ordinal_columns[index]]).size().reset_index()<br>            df_stack = df_stack.pivot(columns= target_variabel, index= ordinal_columns[index], values=0)<br>            df_reverse = df_stack[df_stack.columns[::-1]]<br><br>            df_reverse.plot(kind=&#39;bar&#39;, stacked=True, ax = axes,<br>                            title = ordinal_columns[index], color = colors[index],<br>                            ylabel = &#39;Frequency&#39;).set_xlabel(&quot;&quot;)<br><br>            axes.tick_params(axis=&#39;x&#39;, rotation=0)<br><br>            for c in axes.containers:<br>                label = [int(l.get_height()) for l in c]<br>                axes.bar_label(c, labels = label, label_type = &#39;edge&#39;)</pre><pre>columns = [&#39;Dependents&#39;, &#39;InternetService&#39;, &#39;Contract&#39;]<br>bivariate_bar_plot(df, columns, &#39;Churn&#39;, &#39;barstacked&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vwLCFSad3bZFet-pPlpVhw.png" /></figure><p><strong>Graph 1 — Dependants</strong></p><p>The relationship between customer churn and having dependents suggests that customers without dependents are more likely to churn compared to those with dependents. Customers without dependents are more likely to churn using the service. On the graph, the red color shows that 1543 customers without dependents stopped using the service, which is much more than those with dependents. This suggests that those without dependents are using the service for themselves. So, when they decide to churn, it’s often influenced by personal factors like their own financial stability, personal changes, and flexibility in spending, without considering family needs.</p><p><strong>Graph 2 — Internet Service</strong></p><p>More customers experience churn among those using fiber optic internet service compared to those using DSL. The purple-colored graph indicates the number of customers facing churn, where a total of 1297 fiber optic users are affected. This value is higher than both other user categories. Possible reasons could involve service quality issues, cost and package differences, and less satisfactory user experiences. However, looking back at the graph, the lowest churn occurs among customers without internet service, specifically only 113 individuals. This means that customers with internet service are more likely to churn compared to those without internet service. This could be due to financial constraints, leading them to choose essential services like telephone-only subscriptions.</p><p><strong>Graph 3 — Contract</strong></p><p>Customers who churn are more prevalent among those who choose monthly contracts compared to annual contracts (one year and two years). The blue-colored graph illustrates customers churning based on different contract choices, indicating that a total of 1655 individuals churned in the monthly payment category. This highlights that monthly contracts provide flexibility for customers to unsubscribe each month without significant consequences. Uncertain financial considerations drive some customers to opt for this choice to adjust service costs to their monthly financial conditions.</p><p><strong>4. Churn vs Tenure</strong></p><pre># Create the histogram<br>plt.figure(figsize=(10, 6))<br>ax = sns.histplot(data=df, x=&#39;tenure&#39;, bins=range(0, max(df[&#39;tenure&#39;]) + 2, 1), hue=&#39;Churn&#39;, multiple=&quot;stack&quot;, palette=&quot;bright&quot;)<br><br># Set plot title and labels<br>plt.title(&quot;Churn rate by tenure&quot;)<br>plt.xlabel(&quot;Months&quot;)<br>plt.ylabel(&quot;Count&quot;)<br><br># Show the pl</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*_V7dYbrcWNY5roGSWZTCkQ.png" /></figure><p>The graph indicates that customers who churn are more likely to be those who have used the service for less than 5 months. The highest frequency of customer churn occurs in the first month of service usage. This suggests that many customers decide to stop using the service within the initial five months, with the majority discontinuing in the very first month. Possible reasons for this trend could include unsatisfactory initial experiences, quick assessments of the service, potential offers from competitors, or early customer dissatisfaction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e99033994a92" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Telco Customer Churn: A Comprehensive Analysis through Deep Dive EDA — Part 1]]></title>
            <link>https://medium.com/@novitaftr/analyzing-telco-churn-patterns-with-eda-2c896010ba60?source=rss-3fffb5c33015------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c896010ba60</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[univariate-analysis]]></category>
            <category><![CDATA[churn-prediction]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[bivariate-analysis]]></category>
            <dc:creator><![CDATA[Novita Fitriani]]></dc:creator>
            <pubDate>Mon, 11 Mar 2024 15:21:13 GMT</pubDate>
            <atom:updated>2024-03-18T03:54:06.598Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*nTEI03zS3cS6ktUB7xoSlQ.png" /><figcaption><a href="https://www.analyticsvidhya.com/blog/2022/01/churn-analysis-of-a-telecom-company/">Image Source</a></figcaption></figure><p>In the internet age we live in, looking into why customers stop using a service is super important. It’s like figuring out why friends stop hanging out. By understanding why people leave, companies can get better at keeping them around. In this competitive online world, knowing and dealing with customer churn (when people leave a service) is a big advantage. So, checking out why customers leave is not just about keeping them — it’s a key step for companies to grow and succeed in the internet-connected world we live in.</p><p>In this Medium post, I’d like to share an analysis using Exploratory Data Analysis (EDA) that leverages statistical, univariate, and bivariate approaches to delve into Telco customers who have experienced churn. By exploring various aspects, I aim to uncover new insights into the factors playing a role in customer churn. Please take a moment to read and explore the findings.</p><p>To analyze Customer Churn, we’re using a dataset from Kaggle called T<a href="https://www.kaggle.com/datasets/blastchar/telco-customer-churn?resource=download">elco Customer Churn</a> curated by BlastChar. Before diving into the analysis, let’s understand the data first. This dataset has info about customers who recently left, shown in the ‘Churn’ column. It also includes details about the services they signed up for, like phone, internet, and more. Plus, there’s info about how long they’ve been a customer, their contract, payment method, and personal details like gender, partners, and dependents.</p><p><strong>1. Data Cleansing</strong></p><p>To ensure a clean dataset before proceeding with further analysis, we need to undergo a standard data cleaning process, which includes handling missing values and duplicate entries. It’s essential to ensure the dataset is tidy before diving into more in-depth analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/1*Sxddp_YMd-DuHnJGT-xxzA.png" /><figcaption>In the DataFrame, there are 11 data in the `TotalCharges` contains white space so we must exclude rows with TotalCharges column contains white space</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*CQY9-__Jc1X1MlzCWKc17A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*X1_5tb_LpM5nBl0UsEvL0A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*-zcUCzFj7LBqXHBKS_voXw.jpeg" /><figcaption>The <em>monthlyCharges</em> variable has an incorrect data type (object), and it needs to be converted to a float data type</figcaption></figure><p>Observations:</p><ul><li>After excluding rows with TotalCharges column contains white space, the dataset comprises <strong>21 columns</strong> and a total of <strong>7032 rows</strong>.</li><li>The dataset has <strong>no missing values</strong> (non-null counts are consistent across all columns).</li><li>All data types seem <strong>appropriate</strong>, given the corresponding column name.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*7o237VC-8t27nUT78dGM_w.jpeg" /></figure><p>Also, ensure that there are no duplicate entries in the data, ensuring each primary key is unique and not repeated.</p><p><strong>2. General Info</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1CdlJPL5IVVNfRj_VLRLEw.jpeg" /></figure><p><strong>Observations:</strong></p><ul><li>All columns, except the tenure, MonthlyCharges, and TotalCharges, contain categorical or binary data.</li><li>The PhoneService, PaperlessBilling, Partner, Dependents, and Churn columns appear to be categorical with values like Yes or No.</li><li>The MultipleLines, InternetService, OnlineSecurity, OnlineBackup, DeviceProtection, TechSupport, StreamingTV, and StreamingMovies columns appear to have categorical data with values like Yes, No, and No internet/phone service.</li><li>SeniorCitizen is apparently also binary (0,1).</li><li>No obvious defects are identified in the data, and the column names align with their respective entries.</li></ul><p><strong>3. Statistical Summary</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*IMUohwYvvhB3whNUQFDA2A.jpeg" /></figure><p>Observations:</p><ul><li>Minimum and maximum values in each column make sense, indicating no outliers or unrealistic data points.</li><li>SeniorCitizen is a binary column (0 or 1), representing whether a customer is a senior citizen.</li><li>Tenure represents the months a customer has been with the service, with a mean of around 32 months. Customer tenure ranges from 1 month up to a maximum of 72 months (6 years).</li><li>MonthlyCharges has a mean of around 64.80, ranging from 18.25 to 118.75. About 75% of customers pay less than $89.86 per month.</li><li>TotalCharges has a mean of approximately 2283.30, ranging from 18.80 to 8684.80. About 75% of customers have total charges less than $3794.74. The distribution appears positively skewed, indicating a concentration of customers with lower total charges.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*7_q2xLZrTJoevw7eNXuk1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*4i0kbb-G-LEEvDtLyeo3qQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*ihAG5HegUq0soau915n2IA.png" /></figure><p><strong>Observations:</strong></p><ul><li>Gender distribution is balanced: 3549 males and 3483 females.</li><li>Partner status shows a slight imbalance: 3639 without a partner, 3393 with a partner.</li><li>Majority have no dependents (4933), while 2099 have dependents.</li><li>Most individuals have PhoneService (6352), only 680 don&#39;t.</li><li>MultipleLines distribution: 3385 with no multiple lines, 2967 with, and 680 without phone service.</li><li>Fiber optic is the most common InternetService (3096), followed by DSL (2416), and 1520 have no internet service.</li><li>Majority lack OnlineSecurity (3497), while 2015 have it. 1520 have no internet service. Similar trend for OnlineBackup, DeviceProtection, and TechSupport.</li><li>More individuals lack StreamingTV (2809) than those who have it (2703). Similar trend for StreamingMovie.</li><li>Contract distribution: Month-to-month (3875), two-year (1685), one-year (1472).</li><li>4168 individuals have PaperlessBilling, 2864 do not.</li><li>PaymentMethod distribution is relatively balanced: Electronic check (2365), mailed check (1604), bank transfer (automatic) (1542), credit card (automatic) (1521).</li><li>Churn status imbalance: 5163 not churning, 1869 churning.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nik_AvDdggI5sCjIpwSmfQ.jpeg" /></figure><p><strong>Observations:</strong></p><ul><li>Gender has two values: &#39;Male&#39; and &#39;Female&#39;, with &#39;Male&#39; being the most common (3549).</li><li>Categories like Partner, Dependants,PhoneService, PaperlessBilling, and Churn have &#39;Yes&#39; and &#39;No&#39; options. &#39;No&#39; is the top value for Partner, Dependants, andChurn, while &#39;Yes&#39; is the top value for PhoneService and PaperlessBilling.</li><li>MultipleLines, OnlineSecurity, OnlineBackup, DeviceProtection, TechSupport,StreamingTV, and StreamingMovies have three options, with &#39;No&#39; being the most common.</li><li>InternetService has three options, and &#39;Fiber optic&#39; is the most prevalent with a value of 3096.</li><li>Contract has three options, and the majority opt for a month-to-month contract (3875).</li><li>PaymentMethod offers four choices, and &#39;Electronic check&#39; is the most common with a value of 2365.</li></ul><p><strong>4. Univariate Analysis</strong></p><pre># group column names based on type<br># it will make our life easier onwards<br>category_columns = [&#39;Churn&#39;, &#39;gender&#39;, &#39;Partner&#39;, &#39;Dependents&#39;,&#39;PhoneService&#39;, &#39;PaperlessBilling&#39;, &#39;MultipleLines&#39;,&#39;OnlineSecurity&#39;, &#39;OnlineBackup&#39;,<br>                    &#39;DeviceProtection&#39;, &#39;TechSupport&#39;, &#39;StreamingTV&#39;, &#39;StreamingMovies&#39;]<br><br>ordinal_columns = [&#39;InternetService&#39;, &#39;Contract&#39;, &#39;PaymentMethod&#39;]<br><br>numerical_columns = [&#39;SeniorCitizen&#39;, &#39;tenure&#39;, &#39;MonthlyCharges&#39;, &#39;TotalCharges&#39;]</pre><p><strong>Boxplot to detect outliers</strong></p><pre># adjust the figure size for better readability<br>plt.figure(figsize=(12,6))<br><br># plotting<br>features = numerical_columns<br>for i in range(0, len(features)):<br>    plt.subplot(1, len(features), i+1)<br>    sns.boxplot(y=df[features[i]], color=&#39;skyblue&#39;)<br>    plt.tight_layout()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZJujluvheI18eZ0unDUMw.png" /></figure><p><strong>Observations:</strong></p><ul><li>For SeniorCitizen outliers might not be as relevant since it&#39;s a binary variable.</li><li>No outliers detected in Tenure, MonthlyCharges, and TotalCharges.</li><li>Tenure shows a consistent distribution without extreme values, indicating similar customer tenures.</li><li>MonthlyCharges lack outliers, suggesting uniformity in charges without significant deviations.</li><li>TotalCharges exhibit no outliers, indicating a uniform distribution without exceptionally high or low charges.</li></ul><p><strong>KDE plot for knowing the distribution form</strong></p><pre># adjust the figure size for better readability<br>plt.figure(figsize=(12,6))<br><br>#plotting<br>features = numerical_columns<br>for i in range(0, len(features)):<br>    plt.subplot(2, len(features)//2 + 1, i+1)<br>    sns.histplot(x=df[features[i]], color=&#39;purple&#39;, kde=True)<br>    plt.xlabel(features[i])<br>    plt.tight_layout()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f82TfGWUve80bZbsJS5iuA.png" /></figure><p><strong>Observation:</strong></p><ul><li>The majority of customers are non-SeniorCitizens. The maximum value of 1 for SeniorCitizen indicates the presence of SeniorCitizens in the dataset.</li><li>Tenure shows a balanced distribution, with clear clusters indicating very short or very long subscription periods.</li><li>MonthlyChargesare mostly balanced, although several customers are evident in the histogram with peaks at lower values, suggesting the presence of customers paying lower monthly fees.</li><li>The histogram for TotalCharges is positively skewed, with a concentration towards lower values. A significant number of customers appear to have lower total charges, as evidenced by the peak around the lower values.</li></ul><p>So, overall, we can conclude that a significant portion of customers has shorter durations. Monthly charges are distributed more evenly, while total charges show a skew towards lower values, implying that many customers have lower overall expenditures.</p><p><strong>Countplot for Categorical Columns</strong></p><pre>def categorical_plots(df, category, type):<br><br>    num_cols = 3<br>    length = len(category)<br>    num_rows = length // 3 + 1 if length % 3 != 0 else length // 3<br><br>    size_x = num_cols * length if type == &#39;categorical&#39; else num_cols * 7<br>    size_y = num_cols * num_rows if type == &#39;categorical&#39; else num_cols * 2<br><br><br>    fig, axs = plt.subplots(num_rows, num_cols, figsize=(size_x,size_y))<br><br>    colors = [&#39;#EC7063&#39;, &#39;#A569BD&#39;,&#39;#EC407A&#39;, &#39;#2196F3&#39;, &#39;#00ACC1&#39;, &#39;#FB8C00&#39;, &#39;#51a027&#39;]<br><br>    for index, axes in enumerate(axs.flatten()[:len(category)]):<br>        df[category[index]].value_counts(normalize=True).plot(kind=&#39;bar&#39;,<br>                                                              ax = axes,<br>                                                              title = category[index].capitalize(),<br>                                                              color = colors[index]).set_xlabel(&quot;&quot;)<br>        axes.set_ylim(0,1)<br><br>        if type == &#39;categorical&#39;:<br>            axes.tick_params(axis=&#39;x&#39;, rotation=0)<br>        else:<br>            axes.tick_params(axis=&#39;x&#39;, rotation=45)<br><br>        position = df[category[index]].value_counts(normalize=True)<br>        get_position = position.tolist()<br>        data_point = position.apply(lambda x : x*100).astype(&#39;str&#39;).apply(lambda x : x[:5] +&quot; %&quot;).tolist()<br><br>        for i in range(len(get_position)):<br>            axes.text(i, get_position[i], data_point[i],<br>                      ha=&#39;center&#39;, color = &#39;black&#39;, fontsize=10)<br><br>    plt.subplots_adjust(wspace=0.2,<br>                        hspace=0.3)</pre><pre>category_1 = category_columns[:len(category_columns)//2]<br>category_2 = category_columns[6:]</pre><pre>categorical_plots(df, category_1, &#39;categorical&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*---DY4iRDGcT-xdvWazqog.png" /></figure><p><strong>Observations:</strong></p><ul><li>The majority of customers, around 73.42%, remained subscribed, while approximately 26.57% of customers decided to stop subscribing, indicating churn.</li><li>The distribution of users, both in terms of gender and partner statuses, is impressively balanced. We have an equitable representation of both male and female users, as well as individuals with and without partners.</li><li>There’s a clear difference between customers with and without dependents, where 29.84% have dependents. This raises a question about whether this demographic affects customers’ decisions to stop using the service. Similar patterns are noticed in the use of telephone services.</li><li>There’s a somewhat similar percentage of customers choosing paperless billing and not, most customers show a strong preference for using paperless billing.</li></ul><pre>categorical_plots(df, category_2, &#39;categorical&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fPk-2WGSTEs4vpna6k08A.png" /></figure><p><strong>Observations:</strong></p><ul><li>Almost the same persentage of customers use or don’t use features like MultipleLines, OnlineSecurity, OnlineBackup, DeviceProtection, TechSupport, StreamingTV, and StreamingMovies. But most folks is not use them.</li></ul><pre>categorical_plots(df, ordinal_columns, &#39;ordinal&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H9doCoF7NBozpL9ZSKihfg.png" /></figure><p><strong>Observations:</strong></p><ul><li>The majority of customers prefer fiber optic service over DSL and no internet service, according to the service usage graph. This raises the question of whether the type of service affect customer churn.</li><li>A clear difference in the contract graph shows that more than 50% of customers prefer monthly payments instead of annual contracts.</li><li>Electronic checks are the most popular payment method among customers, while other payment methods show relatively equal percentages.</li></ul><p>Based on these observations, we can concentrate on the Dependents, Internet Service, and Contract variables to see if these factors influence customer churn.</p><p><strong>6. Bivariate Analysis</strong></p><p><strong>Does Contract affect Churn?</strong></p><pre># Create the bar plot<br>plt.figure(figsize=(10, 6))<br>ax = sns.countplot(x=&#39;Contract&#39;, hue=&#39;Churn&#39;, data=df, palette=&quot;bright&quot;)<br><br># Add percentage labels on top of the bars<br>total = float(len(df))<br>for p in ax.patches:<br>    height = p.get_height()<br>    if height != 0:  # Add this condition to check if the height is not zero<br>        ax.text(p.get_x() + p.get_width() / 2, height + 10, f&#39;{(height/total) * 100:.2f}%&#39;, ha=&quot;center&quot;)<br><br># Set plot title and labels<br>plt.title(&quot;Churn Rate by Contract Status&quot;)<br>plt.xlabel(&quot;Contract&quot;)<br>plt.ylabel(&quot;Frequency&quot;)<br><br># Show the plot<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*8ytIHeNoYxxTXWixksGY5g.png" /></figure><p>The churn rate among monthly contract (month to month) customers is significantly higher compared to customers with long-term (one year and two year) contracts. Customers with long-term (one year and two year) contracts exhibit a lower likelihood of discontinuing the service (churning).</p><p><strong>Does Internet Service affect Churn?</strong></p><pre># Create the bar plot<br>plt.figure(figsize=(10, 6))<br>ax = sns.countplot(x=&#39;InternetService&#39;, hue=&#39;Churn&#39;, data=df, palette=&quot;bright&quot;)<br><br># Add percentage labels on top of the bars<br>total = float(len(df))<br>for p in ax.patches:<br>    height = p.get_height()<br>    if height != 0:  # Add this condition to check if the height is not zero<br>        ax.text(p.get_x() + p.get_width() / 2, height + 10, f&#39;{(height/total) * 100:.2f}%&#39;, ha=&quot;center&quot;)<br><br># Set plot title and labels<br>plt.title(&quot;Churn Rate by Internet Service&quot;)<br>plt.xlabel(&quot;Internet Service&quot;)<br>plt.ylabel(&quot;Frequency&quot;)<br><br># Show the plot<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*md7OjuTIQ2WEqzvcDuA4RA.png" /></figure><p>The highest churn rate occurs among customers using fiber optic, followed by those using DSL (internet service that uses a phone line connection) service. This means that customers with internet service are more likely to churn compared to customers without internet service.</p><p><strong>Does Dependents affect Churn?</strong></p><pre># Create the count plot<br>plt.figure(figsize=(8, 6))<br>ax = sns.countplot(x=&#39;Dependents&#39;, hue=&#39;Churn&#39;, data=df, palette=&quot;bright&quot;)<br><br># Add percentage labels on top of the bars<br>total = float(len(df))<br>for p in ax.patches:<br>    height = p.get_height()<br>    if height != 0:  # Add this condition to check if the height is not zero<br>        ax.text(p.get_x() + p.get_width() / 2, height + total*0.01, f&#39;{(height/total) * 100:.2f}%&#39;, ha=&quot;center&quot;)<br><br># Set plot title and labels<br>plt.title(&quot;Churn Rate by Dependents status&quot;)<br>plt.xlabel(&quot;Dependents&quot;)<br>plt.ylabel(&quot;Frequency&quot;)<br><br># Show the plot<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*e8UolnrwuUt5LswZfKkyLg.png" /></figure><p>From this graph, we observe that churn is more prevalent among customers without dependents compared to those with dependents. This suggests that customers with dependents are less inclined to churn compared to those without dependents.</p><p><strong>Correlation</strong></p><pre># change the categorical value to numeric value<br># No phone service / No internet service = 0, No = 1, Yes = 2<br><br>df_changes = df.copy()<br>for col in df_changes[categorical]:<br>    df_changes[col].replace({&quot;No phone service&quot; : 0}, inplace=True)<br>    df_changes[col].replace({&quot;No internet service&quot; : 0}, inplace=True)<br>    df_changes[col].replace({&quot;No&quot; :  1}, inplace=True)<br>    df_changes[col].replace({&quot;Yes&quot; : 2}, inplace=True)<br><br>plt.figure(figsize=(15,5))<br>sns.heatmap(df_changes.corr(numeric_only = True),cbar=True,annot=True,cmap=&#39;Blues&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1FEu-wfF7ZAoHvNxP1V3A.png" /></figure><p><strong>Observations :</strong></p><ul><li>Tenure and TotalCharges show a strong positive correlation of 0.83, indicating a close relationship between the two variables. It&#39;s indicated that customers who maintain longer subscription periods tend to experience higher total charges. This means that if customers stay with the service for a long time, they&#39;ll end up paying more each month and gathering bigger total charges over time.</li><li>SteamingTV, StreamingMovie, and MonthlyCharger are also strongly correlated. StreamingTV and StreamingMovie are closely related as both involve video content streaming. Users subscribing to StreamingTV services might also be interested in StreamingMovie services, and vice versa. Additionally,MonthlyCharger is strongly correlated with StreamingTV/StreamingMovie, as these streaming services typically require a monthly subscription fee.</li><li>Even though we found strong connections in other areas, it turns out that the chance of customers leaving (churn) doesn’t seem closely tied to other things. This is evident from the low correlation values with other variables.</li></ul><h3>Conclusion</h3><ol><li>The data does not contain major issues. There are only some NULL values and duplicated rows. We’ve handled them accordingly.</li><li>Overall, the minimum and maximum values make sense for each column.</li><li>No outliers detected</li><li>The majority of customers, around 73.42%, remained subscribed, while approximately 26.57% of customers decided to stop subscribing, indicating churn.</li><li>From barcharts of Churn and Contract column, We can say that, customers who choose a month-to-month contract are more likely to churn.</li><li>From barcharts of Churn and InternetService column, We can say that, Customers with DSL internet and fiber optic service are more likely to churn using the service compared to those without internet.</li><li>From barcharts of Churn and Dependent column, We can say that, customers with dependents are less likely to stop using the service.</li><li>From correlation heatmap: We can see that tenure has highly correlated with MonthlyCharges.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c896010ba60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Visualization — Choosing the Right Charts for Categorical and Numerical Data!]]></title>
            <link>https://medium.com/@novitaftr/data-visualization-using-python-c1c29006bed4?source=rss-3fffb5c33015------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1c29006bed4</guid>
            <category><![CDATA[categorical-data]]></category>
            <category><![CDATA[numerical-data]]></category>
            <category><![CDATA[matplotlib]]></category>
            <category><![CDATA[seaborn]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Novita Fitriani]]></dc:creator>
            <pubDate>Sun, 10 Mar 2024 11:15:52 GMT</pubDate>
            <atom:updated>2024-03-16T05:45:16.887Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*xvsRwmi5ReZxg8sNQK_aOg.jpeg" /><figcaption><a href="https://media.mehrnews.com/d/2019/07/31/4/3194094.jpg">source</a></figcaption></figure><p>Data visualization is a technique for communicating data, representing data using graphs, charts, etc. The main aim of data visualization is to make information easy to understand. Studies show that people get information faster and better when it’s presented visually. It’s not just about showing graphs — we need to choose the right kind of graphs and communicate them well. This way, the data we share is accurate and helps in making better decisions.</p><p>Before we create visualizations, it’s important to know the type of data we’re working with. This understanding helps us pick the right way to show information. Different data needs different charts or graphs. When we know our data well, we can easily see patterns, share our findings clearly, and make better decisions based on accurate visuals. So, let’s begin by talking about the different types of data!</p><p>In a research study, there are two types of data: Categorical and numerical.</p><p><strong>1. Categorical data</strong></p><p>Categorical data represents qualitative variables that fall into specific categories or groups. There are two main types: nominal and ordinal.</p><p>Nominal data is like labels for categories without any order or ranking. For example, when we talk about gender, ethnicity, marital status, or car brands, each category is separate, and there’s no ranking or specific order. They’re just distinct groups, and we don’t use them to show any kind of numerical relationship.</p><p>Ordinal data represents categories with a natural order or ranking. Examples include education level (e.g., high school, bachelor’s degree, master’s degree), income brackets, or survey responses (e.g., strongly agree, agree, neutral, disagree, strongly disagree). The categories have a logical sequence but may not have consistent intervals between them.</p><p>Ordinal data is like categories that have a clear order or ranking. For instance, when we talk about education levels such as high school, bachelor’s degree, or master’s degree, or income brackets, and even survey responses like strongly agree, agree, neutral, disagree, and strongly disagree, these categories follow a logical sequence or ranking. However, the spaces or intervals between these categories might not always be the same.</p><p><strong>2. Numerical data</strong></p><p>Numeric data consists of numbers and is often quantitative in nature, and it comes in two main types: discrete and continuous.</p><p>Discrete numeric data means using whole numbers to count things or put them into categories. For example, you could count the number of students in a class, the books sold, or the cars in a parking lot using whole numbers.</p><p>Continuous numeric data refers to measurements, like height or temperature, where values can be any number within a range. It’s like measuring things precisely, allowing for a wide variety of values.</p><p>The next question is, how do we visualize each of these data types? Here, I’ll show you based on a project I’m working on in my bootcamp. It involves visualizing and analyzing the distribution of a categorical, continuous, categorical-continuous, and continuous-continuous feature using Python with seaborn and matplotlib.</p><p>To create these visualizations, we used data available on Kaggle related to <a href="https://www.kaggle.com/c/house-prices-advanced-regression-techniques/data"><em>House Prices — Advanced Regression Techniques</em></a><em>.</em> Before we show you the pictures, let’s quickly understand our data. The dataset includes various factors like Garage type, Above Ground Living Area, and other characteristics. However, I won’t go into a detailed analysis here because our focus is just on making visualizations and briefly explaining the insights we get from them.</p><pre>import pandas as pd<br>import numpy as np<br><br>import seaborn as sns<br>import matplotlib.pyplot as plt</pre><p><strong>1. Count of one categorical feature</strong></p><pre><br>garage_type_counts = df[&#39;GarageType&#39;].value_counts()<br><br>plt.figure(figsize=(10, 6))<br>bar_plot = sns.barplot(<br>    x=garage_type_counts.index,<br>    y=garage_type_counts.values,<br>    hue=garage_type_counts.index,<br>    palette=&#39;bright&#39;,<br>    legend=False)<br><br>for index, value in enumerate(garage_type_counts.values):<br>    bar_plot.text(<br>        index,<br>        value + 0.1,<br>        str(value),<br>        ha=&#39;center&#39;,<br>        va=&#39;bottom&#39;)<br><br>bar_plot.set_ylim(0, 1000)<br><br>plt.title(&#39;Count of GarageType&#39;)<br>plt.xlabel(&#39;Garage Type&#39;)<br>plt.ylabel(&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*_YBEopb1HbuKA-VVaN7WZw.png" /></figure><p>The ‘Attchd’ (Attached) garage type predominates, exhibiting a significantly higher frequency than other types. This suggests that the majority of houses in the dataset feature garages directly connected to the house. This preference for attached garages is likely driven by the convenience and accessibility they offer, contributing to easier access and enhanced security for homeowners.</p><p><strong>2. Distribution of one continuous feature</strong></p><pre>fig, ax = plt.subplots()<br>sns.histplot(df[&#39;GrLivArea&#39;], kde=True,color=&#39;purple&#39;)<br>ax.set(<br>    xlabel=&quot;Above Ground Living Area&quot;,<br>    ylabel=&quot;Frequency&quot;,<br>    title=&quot;Distribution of Above Ground Living Area&quot;<br>)<br><br>#Summary Statistics<br>summary_stats = df[&#39;GrLivArea&#39;].describe()<br>print(&quot;Summary Statistics:&quot;)<br>print(summary_stats);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*AJ3jzC0ekkYmZoeM01qqHw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/1*W1e6lSPcCjERUELcKuYfwA.jpeg" /></figure><p>The mean above-grade (ground) living area (GrLivArea) for properties in this dataset is approximately 1515.46 square feet, with the majority falling within the range of 1129.5 to 1776.75 square feet. However, there are outliers with significantly larger areas, reaching a maximum of 5642 square feet. These variations likely stem from diverse architectural designs, lot sizes, and potential renovations, contributing to the broader spectrum of living spaces observed in the dataset.</p><p><strong>3. Categorical-continuous</strong></p><pre>plt.figure(figsize=(12, 6))<br>sns.boxplot(x=&#39;GarageType&#39;,<br>            y=&#39;SalePrice&#39;,<br>            data=df, hue=&#39;GarageType&#39;,<br>            palette=&#39;bright&#39;,<br>            legend=False)<br><br>plt.title(&#39;Distribution of SalePrice for Each GarageType&#39;)<br>plt.xlabel(&#39;Garage Type&#39;)<br>plt.ylabel(&#39;Sale Price&#39;)<br><br>plt.show()<br><br>#Summary Statistics<br>summary_stats = df.groupby(&#39;GarageType&#39;)[&#39;SalePrice&#39;].agg<br>([&#39;count&#39;, &#39;mean&#39;, &#39;median&#39;, &#39;min&#39;, &#39;max&#39;, &#39;sum&#39;])<br>print(&quot;\nSummary Statistics of Total SalePrice:&quot;)<br>print(summary_stats)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5brD5UnvSJQry1RgIc2DFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*RblwgliqjT-2PheTdakoJg.jpeg" /></figure><p>The boxplot data shows that houses with BuiltIn garages have the highest average sale price, around $254,751, while those with CarPort garages have the lowest average sale price, about $109,962. Houses with an inside garage (BuiltIn) are more expensive because they usually have extra space and interior improvements, making them more valuable and comfortable, which drives up the selling price.</p><p><strong>4. Continuous-continuous</strong></p><pre>plt.figure(figsize=(10, 6))<br>sns.scatterplot(<br>    x=&#39;GrLivArea&#39;,<br>    y=&#39;SalePrice&#39;,<br>    data=df, color=&#39;blue&#39;,<br>    alpha=0.5)<br><br>sns.regplot(<br>    x=&#39;GrLivArea&#39;,<br>    y=&#39;SalePrice&#39;,<br>    data=df,<br>    scatter=False,<br>    color=&#39;mediumblue&#39;,<br>    line_kws={&#39;linewidth&#39;: 2})<br><br>plt.title(&#39;Relationship between GrLivArea and SalePrice&#39;)<br>plt.xlabel(&#39;Above Ground Living Area&#39;)<br>plt.ylabel(&#39;Sale Price&#39;)<br><br>plt.show()<br><br>#Summary statistics<br>summary_stats = df[[&#39;GrLivArea&#39;, &#39;SalePrice&#39;]].describe()<br>print(&quot;\nSummary Statistics:&quot;)<br>print(summary_stats)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*_jiMGwy8qDbBh296YYbE0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*7QWKrf54lBlR5nBSzyvGLA.jpeg" /></figure><p>The positive correlation between GrLivArea and SalePrice suggests that larger living areas tend to fetch higher prices in the real estate market. This aligns with the common perception that larger living spaces offer more comfort, functionality, and desirability, leading to increased demand and subsequently higher sale prices. Additionally, larger living areas often imply more spacious and luxurious accommodations, which can contribute to their higher valuation.</p><p>There are many more examples I haven’t talked about yet. Let’s go deeper and talk about more things! I’m looking forward to sharing experiences from other projects that use different techniques for visualizing and analyzing data. Let’s keep exploring the interesting world of data and analysis together!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1c29006bed4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Science Overview]]></title>
            <link>https://medium.com/@novitaftr/data-science-overview-2b30139be4be?source=rss-3fffb5c33015------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b30139be4be</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Novita Fitriani]]></dc:creator>
            <pubDate>Wed, 20 Dec 2023 14:47:53 GMT</pubDate>
            <atom:updated>2023-12-21T02:21:17.306Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s data-driven era, data science plays a crucial role. Let me share a bit about what data science is, how it contributes to industries, and why I’m interested in learning about it.</p><p><strong>Let’s begin by understanding what data science means</strong></p><p>Data science is about finding useful patterns and insights from large sets of data. It involves capturing, maintaining, and processing data, exploring and analyzing it, and then communicating the findings to help businesses and policymakers make smart decisions. It uses a mix of statistics, computer science, and other tools to make sense of big data.</p><p>Imagine data science as a detective for big data. It sorts through heaps of information, both structured and unstructured, to find patterns and valuable insights. Envision it as a journey: first, we collect and organize data, then we clean and explore it. Data scientists use advanced tools to dig into the data, asking important questions. They analyze, build models, and, like magic, turn data into understandable stories that assist businesses in making smarter decisions. It’s like solving puzzles with computers!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jNdf-3wlJGhrucNC_4SQxw.png" /><figcaption>Image from <a href="https://www.sudeep.co/data-science/2018/02/09/Understanding-the-Data-Science-Lifecycle.html">sudeep.co</a></figcaption></figure><p>Data scientists spend a lot of time getting data ready for action. Imagine it like cleaning up a messy room before finding what you need. Most data isn’t perfect — it’s messy, unorganized, and full of noise. So, we transform it, check for errors, and use math tricks to clear out the noise. It’s like solving a puzzle! While data analytics already knows the questions, data science takes a big picture approach, asking better questions to uncover more insights. Think of it as exploring the unknown to find hidden treasures in data.</p><p>Data scientists also use fancy algorithms to fit data into a model, kind of like fitting puzzle pieces together. The choice of model depends on the data type and what the business needs. They then test the model to see how well it works. If it needs tweaking, they adjust it until it’s just right. There’s a variety of models to choose from. Once everything is perfect, they put the model to work for smarter business decisions.</p><p><strong>Data Science vs Data Analyst</strong></p><figure><img alt="Image from starship-knowledge.com" src="https://cdn-images-1.medium.com/max/1024/1*FTp-buUTaEU5CM1MUYsU0g.jpeg" /><figcaption>Image from <a href="https://starship-knowledge.com/tag/data-science-vs-data-analytics">starship-knowledge.com</a></figcaption></figure><p>Data science and data analyst, though sometimes confused, have distinct roles. Data science explores massive datasets for trends, while data analyst works with specific, often structured, datasets. Data analyst focuses on historical data, while data science involves predictive modeling.</p><p>In summary, data scientists predict and explore large datasets, while data analysts answer specific questions with a focused approach, both requiring mathematical and analytical skills.</p><p><strong>How data science relates to statistics, data mining, AI, and machine learning</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W1lhbAFqSyoLJvSDxB8yBg.jpeg" /><figcaption>Image <a href="https://starship-knowledge.com/tag/data-science-vs-data-analytics">starship-knowledge.com</a></figcaption></figure><p>Data science is a mix of skills from different areas like business, computer science, math, and stats. It deals with big data, which is often messy and includes non-numbers. Data scientists work on tasks like collecting, processing, and analyzing this data to find useful information. In data science, there are four main areas: getting data, organizing it, analyzing it, and storing it. We call these the ‘4As’ of data science. Using statistics, which is a branch of math, helps a lot in this process. Statistics helps data scientists collect data better, analyze it, and draw conclusions. They use statistical methods to make sure their results are reliable. Stats also help in exploring and summarizing data accurately. Overall, statistics is a key tool for making predictions and drawing meaningful conclusions in data science.</p><p>Data mining is a technique used in business and data science, aiming to render data more usable for specific purposes. While data science involves the analysis of both structured and unstructured data, data mining mainly deals with structured data. Data science, artificial intelligence (AI), and machine learning work in tandem. AI simulates human brain function, while machine learning, a subset of data science, involves feeding computers data for them to learn and make decisions. Deep learning, a subset of AI, mimics the human brain’s processing and decision-making using hierarchical artificial neural networks.</p><p><strong>Now, let’s explore the role of data science in the industry</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*J1g46ydVBmBotutgbXcZTA.jpeg" /><figcaption>Image from <a href="https://www.analyticsvidhya.com/blog/2019/06/what-does-data-scientist-do-daily-basis-top-5-quora-answers/">analyticsvidhya.com</a></figcaption></figure><p>In the future, data science is set to undergo significant changes. Automation will play a key role, with more tasks in the data science life cycle becoming automated. This trend is driven by the increasing investment in machine learning and AI, aiming to enhance ROI. As automation increases, more people across various industries will have access to usable data, fostering quicker progress in AI and machine learning. Let’s take a closer look at how data science crucial it is for the industry:</p><ol><li><strong>Business</strong></li></ol><p>In the realm of business, data science contributes to better understanding customer needs through data analysis. It refines marketing strategies, optimizes pricing for e-commerce companies, and provides insights into purchasing patterns. Business analytics and data science share a focus on solving business problems, with business analytics concentrating on profit and costs. Business intelligence, a subset of data analysis, analyzes existing data to gain insights into business trends, while data science takes a more exploratory, future-facing approach.</p><p>2. <strong>Finance</strong></p><p>In finance, data science aids in fraud detection, risk assessment, and predicting customer payment behavior. For example, banks using data science can predict if customers will make their payments on time or not, helping them manage risks and avoid problems in the financial world.</p><p>3. <strong>Government</strong></p><p>Data science also plays a crucial role in transforming policy work, helping policymakers shape effective policies using data-driven insights. Government agencies can leverage data science for tasks such as combatting census undercount using big data and machine learning.</p><p>4. <strong>Marketing</strong></p><p>Data science can help companies tweak prices and marketing strategies for better profits. In e-commerce, for example, data science guides pricing decisions to match what the market can bear. It also helps businesses create and market products more efficiently by targeting the right customers. Using data, it reveals how people buy under different conditions. Think of it as a crystal ball for predicting future trends. Data scientists can figure out the best prices, advertising bids, and ways to get new customers based on existing data patterns.</p><p>5. <strong>Predicting the stock market</strong></p><p>Predicting the stock market using data science involves dealing with randomness, stationarity, and complex time series analysis. Data scientists use statistical concepts and machine learning to make predictions about changes in stock values based on past data.</p><p><strong>Finally, I’ll conclude by explaining the reasons for my interest in delving into data science</strong></p><p>In today’s digital world, data is crucial, and being skilled in data science is a big advantage. This opens up job opportunities in different industries, as companies use data to shape their strategies. I want to contribute by helping understand data and providing insights for better decision-making. Let’s explore the wonders of data science!</p><p>Source :</p><p><a href="https://www.heavy.ai/learn/data-science">https://www.heavy.ai/learn/data-science</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b30139be4be" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>