<?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 Gizem Kaya on Medium]]></title>
        <description><![CDATA[Stories by Gizem Kaya on Medium]]></description>
        <link>https://medium.com/@gizkaya?source=rss-bd281fad5f8a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zp87uWSKMigrw0kxY20Dag.jpeg</url>
            <title>Stories by Gizem Kaya on Medium</title>
            <link>https://medium.com/@gizkaya?source=rss-bd281fad5f8a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 13:23:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gizkaya/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[Jingle Bells and Statistical Tests]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science/jingle-bells-and-statistical-tests-33ea90912099?source=rss-bd281fad5f8a------2"><img src="https://cdn-images-1.medium.com/max/2600/0*1Pczu_1b2CSv19uN" width="4957"></a></p><p class="medium-feed-snippet">Data Types, Hypotheses and Statistical Tests That Fit Them with Festive Christmas Market Examples&#x1F384;&#x1F385;&#x1F3A1;</p><p class="medium-feed-link"><a href="https://medium.com/data-science/jingle-bells-and-statistical-tests-33ea90912099?source=rss-bd281fad5f8a------2">Continue reading on TDS Archive »</a></p></div>]]></description>
            <link>https://medium.com/data-science/jingle-bells-and-statistical-tests-33ea90912099?source=rss-bd281fad5f8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/33ea90912099</guid>
            <category><![CDATA[data-type]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[statistical-analysis]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[hypothesis-testing]]></category>
            <dc:creator><![CDATA[Gizem Kaya]]></dc:creator>
            <pubDate>Wed, 25 Dec 2024 15:01:27 GMT</pubDate>
            <atom:updated>2024-12-26T18:13:54.096Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Deal with Missing Data Like a Pro: Multivariate and Iterative Imputation Algorithms]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science/deal-with-missingness-like-a-pro-multivariate-and-iterative-imputation-algorithms-23f7769da02c?source=rss-bd281fad5f8a------2"><img src="https://cdn-images-1.medium.com/max/2600/0*SA_TtCCggQSSKgfI" width="8192"></a></p><p class="medium-feed-snippet">Using LightGBM, kNN and AutoEncoders for imputation and improving them further via iterative method MICE</p><p class="medium-feed-link"><a href="https://medium.com/data-science/deal-with-missingness-like-a-pro-multivariate-and-iterative-imputation-algorithms-23f7769da02c?source=rss-bd281fad5f8a------2">Continue reading on TDS Archive »</a></p></div>]]></description>
            <link>https://medium.com/data-science/deal-with-missingness-like-a-pro-multivariate-and-iterative-imputation-algorithms-23f7769da02c?source=rss-bd281fad5f8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/23f7769da02c</guid>
            <category><![CDATA[hands-on-tutorials]]></category>
            <category><![CDATA[lightgbm]]></category>
            <category><![CDATA[imputation]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[missing-data]]></category>
            <dc:creator><![CDATA[Gizem Kaya]]></dc:creator>
            <pubDate>Thu, 12 Dec 2024 12:32:13 GMT</pubDate>
            <atom:updated>2024-12-17T15:56:28.619Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Addressing Missing Data]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science/addressing-missing-data-f6f7920bcc55?source=rss-bd281fad5f8a------2"><img src="https://cdn-images-1.medium.com/max/2600/0*2azp79om7UNFWEGR" width="3725"></a></p><p class="medium-feed-snippet">Understand missing data patterns (MCAR, MNAR, MAR) for better model performance with Missingno</p><p class="medium-feed-link"><a href="https://medium.com/data-science/addressing-missing-data-f6f7920bcc55?source=rss-bd281fad5f8a------2">Continue reading on TDS Archive »</a></p></div>]]></description>
            <link>https://medium.com/data-science/addressing-missing-data-f6f7920bcc55?source=rss-bd281fad5f8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6f7920bcc55</guid>
            <category><![CDATA[missing-data]]></category>
            <category><![CDATA[data-preprocessing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Gizem Kaya]]></dc:creator>
            <pubDate>Tue, 26 Nov 2024 18:50:58 GMT</pubDate>
            <atom:updated>2024-11-26T18:50:58.156Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Don’t Be Afraid of the Black Screen.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://gizkaya.medium.com/dont-be-afraid-of-the-black-screen-f44be9e228fe?source=rss-bd281fad5f8a------2"><img src="https://cdn-images-1.medium.com/max/2600/0*NYVZy9uzjSnsYX78" width="5184"></a></p><p class="medium-feed-snippet">Make peace with command prompts and shell scripting with this beginner&#x2019;s guide and they will be your true friends.</p><p class="medium-feed-link"><a href="https://gizkaya.medium.com/dont-be-afraid-of-the-black-screen-f44be9e228fe?source=rss-bd281fad5f8a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://gizkaya.medium.com/dont-be-afraid-of-the-black-screen-f44be9e228fe?source=rss-bd281fad5f8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f44be9e228fe</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Gizem Kaya]]></dc:creator>
            <pubDate>Tue, 05 Nov 2024 20:56:00 GMT</pubDate>
            <atom:updated>2024-11-13T09:49:12.796Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Build a Robust Data Cleaning Pipeline?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://ai.plainenglish.io/how-to-build-a-robust-data-cleaning-pipeline-aec681432993?source=rss-bd281fad5f8a------2"><img src="https://cdn-images-1.medium.com/max/2600/0*rQk39pF63-nVVvGl" width="4722"></a></p><p class="medium-feed-snippet">A clear guide on data cleaning using sensor data with Python.</p><p class="medium-feed-link"><a href="https://ai.plainenglish.io/how-to-build-a-robust-data-cleaning-pipeline-aec681432993?source=rss-bd281fad5f8a------2">Continue reading on Artificial Intelligence in Plain English »</a></p></div>]]></description>
            <link>https://ai.plainenglish.io/how-to-build-a-robust-data-cleaning-pipeline-aec681432993?source=rss-bd281fad5f8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/aec681432993</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-preprocessing]]></category>
            <category><![CDATA[data-analytics]]></category>
            <dc:creator><![CDATA[Gizem Kaya]]></dc:creator>
            <pubDate>Thu, 31 Oct 2024 13:01:00 GMT</pubDate>
            <atom:updated>2024-11-01T13:18:11.135Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Level Up Your Plots: Enhance Essential Visualizations with Matplotlib Customizations]]></title>
            <link>https://python.plainenglish.io/level-up-your-plots-enhance-basic-visualizations-with-matplotlib-customizations-f2b23bc52c2e?source=rss-bd281fad5f8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2b23bc52c2e</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[matplotlib]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Gizem Kaya]]></dc:creator>
            <pubDate>Tue, 22 Oct 2024 11:51:39 GMT</pubDate>
            <atom:updated>2024-10-29T15:57:43.423Z</atom:updated>
            <content:encoded><![CDATA[<p>Data visualization is a crucial skill for not only data analysts but also data scientists. Many strong low code / no code platforms and business intelligence tools are available, which enables interactive data visualization for everyone. However, coding for the visual analysis of the data, especially before starting to work on a machine learning or advanced analytics task, could be more practical sometimes.</p><p>In this article, I will provide brief information about the some essential plots and how to create them with a widely used Python Library: Matplotlib. It is a powerful tool for creating both static and interactive visualizations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0wYrd6ZVGkYT0uMOKr78cQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@campaign_creators?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Campaign Creators</a> on <a href="https://unsplash.com/photos/person-using-macbook-pro-pypeCEaJeZY?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><p>In order to make this tutorial more engaging, I preferred to use a cat-themed dataset, similar to the data we used in <a href="https://medium.com/python-in-plain-english/mastering-dataframe-indexing-in-python-with-pandas-06868808396a"><em>Mastering DataFrame Indexing in Python with Pandas</em></a> article.</p><pre>import pandas as pd<br><br># Expanded previous cat dataframe with more cats and varied data<br>data = {<br>    &quot;name&quot;: [&quot;Whiskers&quot;, &quot;Felix&quot;, &quot;Mittens&quot;, &quot;Socks&quot;, &quot;Luna&quot;, &quot;Shadow&quot;, &quot;Simba&quot;, &quot;Tiger&quot;, &quot;Oscar&quot;, &quot;Bella&quot;],<br>    &quot;breed&quot;: [&quot;Siamese&quot;, &quot;Bengal&quot;, &quot;Persian&quot;, &quot;Sphynx&quot;, &quot;Maine Coon&quot;, &quot;British Shorthair&quot;, &quot;Abyssinian&quot;, &quot;Burmese&quot;, &quot;Scottish Fold&quot;, &quot;Ragdoll&quot;],<br>    &quot;weight&quot;: [4.2, 3.8, 4.5, 3.9, 5.0, 4.8, 4.0, 3.6, 4.3, 5.2],<br>    &quot;height&quot;: [30, 28, 32, 25, 35, 31, 29, 27, 33, 34],<br>    &quot;date_of_birth&quot;: [&quot;2017-04-22&quot;, &quot;2018-09-15&quot;, &quot;2016-12-01&quot;, &quot;2019-07-08&quot;, &quot;2020-03-14&quot;, &quot;2015-06-21&quot;, &quot;2018-01-11&quot;, &quot;2021-02-13&quot;, &quot;2019-11-03&quot;, &quot;2016-08-30&quot;]<br>}<br><br>cats = pd.DataFrame(data)<br><br># Convert date_of_birth to datetime<br>cats[&quot;date_of_birth&quot;] = pd.to_datetime(cats[&quot;date_of_birth&quot;])</pre><h4>1. Histograms: Understanding Distribution</h4><p>We can use histograms to show the distribution of the numerical data. We can say that it is also bar plot where the x axis represents the bin ranges. The code below is used to visualize the distribution of the height column using two different bin configuration:</p><pre>import matplotlib.pyplot as plt<br><br># Histogram with 10 bins<br>cats[&quot;height&quot;].hist(bins=10, color=&#39;skyblue&#39;, edgecolor=&#39;black&#39;, alpha=0.7)<br>plt.title(&quot;Cat Height Distribution (10 bins)&quot;)<br>plt.xlabel(&quot;Height (cm)&quot;)<br>plt.ylabel(&quot;Frequency&quot;)<br>plt.grid(True, which=&#39;both&#39;, axis=&#39;y&#39;, linestyle=&#39;--&#39;, linewidth=0.7)<br>plt.show()<br><br># Histogram with 5 bins<br>cats[&quot;height&quot;].hist(bins=5, color=&#39;orange&#39;, edgecolor=&#39;black&#39;, alpha=0.7)<br>plt.title(&quot;Cat Height Distribution (5 bins)&quot;)<br>plt.xlabel(&quot;Height (cm)&quot;)<br>plt.ylabel(&quot;Frequency&quot;)<br>plt.grid(True, which=&#39;both&#39;, axis=&#39;y&#39;, linestyle=&#39;--&#39;, linewidth=0.7)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*PvYySv9HfuHmt1MISrajmw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*3KbOF4sISLBKhD57PWBVJw.png" /></figure><p>In the first plot, we use 10 bins and in the second plot 5 bins. As it can be seen from the graphs, bin configuration is an important factor to understand data distribution. Even if this dataset is too small, it is possible to observe the change in the visuals.</p><p>Moreover, you can see how to customize the color, add grid lines, or change the transparency (alpha=0.7) in the code to make it more visually engaging.</p><h4>2. Bar Plots: Comparing Categories</h4><p>Bar plots are generally preferred to show the comparison of aggregated values over subgroups, or in other words over categorical data. Let’s look at how we can compare the mean weight of cats based on their breed:</p><pre># Mean weight by breed<br>avg_weight_by_breed = cats.groupby(&quot;breed&quot;)[&quot;weight&quot;].mean()<br><br># Plotting the bar chart<br>ax = avg_weight_by_breed.plot(kind=&quot;bar&quot;, color=&quot;coral&quot;, edgecolor=&quot;black&quot;, title=&quot;Mean Weight by Cat Breed&quot;)<br>plt.ylabel(&quot;Average Weight (kg)&quot;)<br>plt.xticks(rotation=45)<br><br># Adding annotations<br>for i in ax.patches:<br>    ax.annotate(f&#39;{i.get_height():.2f}&#39;, (i.get_x() + i.get_width() / 2, i.get_height()),<br>                ha=&#39;center&#39;, va=&#39;baseline&#39;, fontsize=10, color=&#39;black&#39;)<br><br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*S6cqsKoxV7rDZMYLkocDNQ.png" /></figure><p>In the code, you can see how to add annotations to the graph. In this case, I preferred to display the values on top of each bar to make the graph more informative.</p><h4>3. Line Plots: Tracking Changes Over Time</h4><p>Line plots are very helpful to track changes and observe trends over time.It is so easy to understand patterns like seasonality with a line graph. Let’s see how Felix’s weight has changed in time with a line graph:</p><pre># Line plot for Felix&#39;s weight<br># Lets create a new dataframe which shows Felix&#39;s weight at specified date<br>felix_data = {<br>    &quot;date&quot;: [&quot;2020-01-01&quot;, &quot;2020-06-01&quot;, &quot;2020-12-01&quot;, &quot;2021-06-01&quot;, &quot;2021-12-01&quot;, &quot;2022-06-01&quot;],<br>    &quot;weight&quot;: [3.8, 4.0, 4.2, 4.3, 4.5, 4.7]<br>}<br><br>felix_df = pd.DataFrame(felix_data)<br><br># Convert date column to datetime<br>felix_df[&quot;date&quot;] = pd.to_datetime(felix_df[&quot;date&quot;])<br><br># Plotting the line graph for Felix&#39;s weight over time<br>plt.plot(felix_df[&quot;date&quot;], felix_df[&quot;weight&quot;], linestyle=&#39;--&#39;, marker=&#39;o&#39;, color=&#39;red&#39;, linewidth=2, markersize=8)<br>plt.title(&quot;Felix&#39;s Weight Over Time (Customized)&quot;)<br>plt.xlabel(&quot;Date&quot;)<br>plt.ylabel(&quot;Weight (kg)&quot;)<br>plt.grid(True)<br>plt.xticks(rotation=45)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*OTYRZi-Ce3Ht-A_4czswkg.png" /></figure><p>In the code, you can see how to change line style, data marker type or the color of the line.</p><h4>4. <strong>Scatter Plots: Visualizing Relationships</strong></h4><p>Scatter plots use dots to represent values of two numeric variable. They are one of the best tools to visualize non linear patterns. They often used to observe the relationship between two features. Let’s plot the height vs. weight of the cats to see the relationship between them:</p><pre>import numpy as np<br><br># Scatter plot for height and weight<br>cats.plot(x=&quot;height&quot;, y=&quot;weight&quot;, kind=&quot;scatter&quot;)<br>plt.title(&quot;Height vs Weight of Cats&quot;)<br>plt.xlabel(&quot;Height (cm)&quot;)<br>plt.ylabel(&quot;Weight (kg)&quot;)<br><br># Adding a trend line<br>z = np.polyfit(cats[&quot;height&quot;], cats[&quot;weight&quot;], 1)<br>p = np.poly1d(z)<br>plt.plot(cats[&quot;height&quot;], p(cats[&quot;height&quot;]), &quot;r--&quot;)<br><br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*8MFdNPkCCqQ-1vkDfeDxmA.png" /></figure><h4>5. <strong>Pie Charts: Visualizing Proportions</strong></h4><p>Pie charts help us to visualize fractions / proportions. Each slice shows the proportion of a group within the whole. Since we know that, human brain is not very good at comparing the size of pies, I am not very fan of these charts. I would recommend to use of tree map or stacked bar chart to show comparison. Since it is easier to compare and grasp the difference in the size of rectangles.</p><p>However, let’s try to understand how each breed contributes to the overall cat pack with a pie chart:</p><pre># Customized pie chart<br>cat_breed_counts = cats[&#39;breed&#39;].value_counts()<br># Exploding the largest slice<br>explode = [0.1 if breed == &#39;Maine Coon&#39; else 0 for breed in cat_breed_counts.index] <br><br>cat_breed_counts.plot(kind=&quot;pie&quot;, autopct=&#39;%1.1f%%&#39;, startangle=90, explode=explode, shadow=True)<br>plt.title(&quot;Cat Breed Distribution (Customized)&quot;)<br>plt.ylabel(&quot;&quot;)  # Hides the default y-label<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*eIo8nJ3QjEbcXgNllzsnSA.png" /></figure><p>You can see that the largest slice (Maine Coon) is “exploded” to draw attention. Moreover, you can see the customizations, like adding shadows in the code.</p><h4>6. Subplots: Visualizing Multiple Graphs Together</h4><p>Subplots allows us to show multiple graphs in one figure. Let’s draw a histogram and scatter plot as subplots:</p><pre># Creating subplots<br>fig, axs = plt.subplots(1, 2, figsize=(12, 5))<br><br># Histogram on the first subplot<br>axs[0].hist(cats[&quot;height&quot;], bins=5, color=&#39;purple&#39;, alpha=0.7)<br>axs[0].set_title(&quot;Cat Height Distribution&quot;)<br>axs[0].set_xlabel(&quot;Height (cm)&quot;)<br>axs[0].set_ylabel(&quot;Frequency&quot;)<br><br># Scatter plot on the second subplot<br>axs[1].scatter(cat_pack[&quot;height&quot;], cat_pack[&quot;weight&quot;], color=&#39;green&#39;)<br>axs[1].set_title(&quot;Height vs Weight of Cats&quot;)<br>axs[1].set_xlabel(&quot;Height (cm)&quot;)<br>axs[1].set_ylabel(&quot;Weight (kg)&quot;)<br><br>plt.tight_layout()<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mrPwo7FmTbgO0x9f8iyGyg.png" /></figure><h4>7. Annotations and Legends</h4><p>Annotations and legends can clarify insights and make plots easier to interpret. For example, adding a legend and annotating the maximum weight in a scatter plot:</p><pre># Scatter plot with annotation and legend<br>ax = cats.plot(x=&quot;height&quot;, y=&quot;weight&quot;, kind=&quot;scatter&quot;, color=&quot;orange&quot;, label=&quot;Cats&quot;)<br><br># Annotating the maximum weight cat<br>max_weight_idx = cats[&quot;weight&quot;].idxmax()<br>ax.annotate(cats.loc[max_weight_idx, &quot;name&quot;], <br>            (cats.loc[max_weight_idx, &quot;height&quot;], cats.loc[max_weight_idx, &quot;weight&quot;]),<br>            xytext=(5,5), textcoords=&quot;offset points&quot;, color=&#39;black&#39;, fontsize=12, weight=&#39;bold&#39;)<br><br>plt.title(&quot;Height vs Weight of Cats with Annotation&quot;)<br>plt.xlabel(&quot;Height (cm)&quot;)<br>plt.ylabel(&quot;Weight (kg)&quot;)<br>plt.legend()<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*fg67fWWDM1XktVA8AxGf9A.png" /></figure><p>In the graph above, we can see the cat with the maximum weight highlighted with an annotation showing its name with a legend to describe the data points.</p><p>In this article, we’ve explored not only basic visualizations but also customization of the plots with Matplotlib features, such as transparency in histograms, bar plots with annotations, subplots, trend lines in scatter plots, and pie charts with visual emphasis. By using these techniques, I hope you can be able to create insightful and visually appealing data stories.</p><p>Stay tuned for more articles where we will dive deeper into advanced visualization techniques!</p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a></li><li><a href="https://differ.blog/"><strong>Create a free AI-powered blog on Differ.</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2b23bc52c2e" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/level-up-your-plots-enhance-basic-visualizations-with-matplotlib-customizations-f2b23bc52c2e">Level Up Your Plots: Enhance Essential Visualizations with Matplotlib Customizations</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering DataFrame Indexing in Python with Pandas]]></title>
            <link>https://python.plainenglish.io/mastering-dataframe-indexing-in-python-with-pandas-06868808396a?source=rss-bd281fad5f8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/06868808396a</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[indexing]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[slicing]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Gizem Kaya]]></dc:creator>
            <pubDate>Fri, 11 Oct 2024 17:13:31 GMT</pubDate>
            <atom:updated>2024-10-28T17:40:46.187Z</atom:updated>
            <content:encoded><![CDATA[<p>Pandas is an open-source, and widely used Python library for data analysis and manipulation [1]. In fact, it is probably the Python package that I use most often personally. It is so useful to explore and process the tabular data.</p><p>It provides fast and flexible data structures for data analysis (i.e. <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html">pandas DataFrame</a>). This is why, I use pandas while discussing about indexing in this article. I also use the same DataFrame which we created in <a href="https://medium.com/@gizkaya/getting-started-with-pandas-exploring-and-analyzing-dataframes-4c1a5b6cd101"><em>Getting Started with Pandas: Exploring and Analyzing DataFrames</em></a> article.</p><pre># Create the DataFrame with the sample data<br><br>data = {<br>    &quot;cat_id&quot;: [1, 2, 3, 4, 5, 6],<br>    &quot;cat_name&quot;: [&quot;Whiskers&quot;, &quot;Fluffy&quot;, &quot;Max&quot;, &quot;Bella&quot;, &quot;Shadow&quot;, &quot;Simba&quot;],<br>    &quot;breed&quot;: [&quot;Siamese&quot;, &quot;Persian&quot;, &quot;Maine Coon&quot;, &quot;Siamese&quot;, &quot;Persian&quot;, &quot;Maine Coon&quot;],<br>    &quot;color&quot;: [&quot;Cream&quot;, &quot;White&quot;, &quot;Brown&quot;, &quot;Cream&quot;, &quot;Black&quot;, &quot;Gray&quot;],<br>    &quot;weight&quot;: [4.5, 5.0, 6.0, 4.2, 4.8, 6.5],<br>    &quot;height&quot;: [25, 28, 30, 24, 27, 32],<br>    &quot;date_of_birth&quot;: [&quot;2018-05-20&quot;, &quot;2017-08-15&quot;, &quot;2016-11-12&quot;, &quot;2019-03-09&quot;, &quot;2018-07-22&quot;, &quot;2016-05-30&quot;]<br>}<br><br>cats = pd.DataFrame(data)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WGMy1kGzQLvOuZ9UAHHjPA.jpeg" /><figcaption>DALL-E Illustration — Indexing with Cats DataFrame 😺</figcaption></figure><h3>1. Setting Index</h3><p>Index is essentially a label attached to each row that allows us to select data more easily and efficiently. While the column labels, also known as column names, are typically strings, the row labels, also known as DataFrame indexes, can be either integer or string values. These labels can be used to refer to specific rows, columns, or data points of the DataFrame, because they are unique values.</p><p>Pandas automatically assigns a default index (row numbers starting from 0), but in most cases, it’s more meaningful to set a specific column as the index.</p><h4>Single Column Index</h4><p>We can set a single column as an index using the set_index() method:</p><pre><br># Setting &#39;cat_id&#39; as the index<br>cats_one_ind = cats.set_index(&quot;cat_id&quot;)</pre><p>Setting the <em>cat_id</em> as index allows us to use it as a direct reference to the rows instead of default row numbers assigned by Pandas.</p><h4>Multi-Indexing (Hierarchical Indexing)</h4><p>In some situations, we may need to use more than one feature as index, which is called <strong>MultiIndex</strong>. MultiIndex creates a hierarchy, and there are some nuance differences between the first and second index column, which will be mentioned in the subsetting.</p><pre>#Setting two columns as indexes - id and name<br>cats_two_ind = cats.set_index([&quot;cat_id&quot;, &quot;cat_name&quot;])</pre><h3>2. Resetting the Index</h3><p>We can also reset the index when needed, which can be useful when we want to return to default index or make modifications to the current index.</p><pre># Resetting the index by keeping its content<br>cats_one_ind.reset_index()<br><br># Resetting the index by dropping its content<br>cats_one_ind.reset_index(drop=True)</pre><h3>3. Sorting DataFrame by Index</h3><p>When we want to order the rows of our dataset, using index for sorting could be more efficient.</p><pre># Sort cats_one_ind by index cat_id<br>print(cats_one_ind.sort_index())<br><br># Sort by &#39;cat_id&#39; in multi-index<br>print(cats_two_ind.sort_index(level=&quot;cat_id&quot;))<br><br># Sort cats_two_ind acending by cat_id, then descending by name<br>print(cats_ind.sort_index(level=[&quot;cat_id&quot;, &quot;cat_name&quot;], ascending = [True, False]))</pre><h3>4. Subsetting Rows with Index</h3><p>Subsetting allows us to extract a specific part of the DataFrame. When our DataFrame is indexed, we can subset based on index values more easily.</p><h4>Subsetting with Single Index</h4><p>Assuming our DataFrame cats is indexed by the cat_id column:</p><pre># A list of cats&#39; ids to subset<br>cat_subset = [1, 2]<br><br># Subsetting cats without using index and .loc[]<br>print(cats[cats[&quot;cat_id&quot;].isin(cat_subset)])<br><br># Subsetting cats by using index and .loc[]<br>print(cats_one_ind.loc[cat_subset])</pre><h4>Subsetting with MultiIndex</h4><p>For DataFrames with a multi-index, subsetting is done using tuples to reference rows at multiple levels:</p><pre># Subset by id-name tuple<br>rows_subset = [(1, &quot;Whiskers&quot;), (2, &quot;Fluffy&quot;)]<br><br>print(cats_two_ind.loc[rows_subset])</pre><h3>5. Slicing Data by Index</h3><p>Slicing is extracting a specific subset of consecutive elements based on their position in the DataFrame. This can be done using both index values and row/column numbers. With Pandas methods, slicing is generally done using .loc[] or .iloc[] methods.</p><h4>Slicing with .loc[ ]</h4><p>.loc[] allows us to subset rows and columns using index labels. We can slice rows based on index values, which is much more efficient when the DataFrame is sorted.</p><pre># Sort the DataFrame by index<br>cats_srt = cats_two_ind.sort_index()<br><br># Subset rows from 01 to 05 by using outer index column: id<br>print(cats_srt.loc[1: 5])<br><br># Try to subset rows from Felix to Tofu by using inner index column: name<br># Unfortunately it does not work and gives back an empty result<br>print(temperatures_srt.loc[&quot;Whiskers&quot;: &quot;Simba&quot;])<br><br># Subset rows from 01 - Felix to 05 - Tofu<br>print(temperatures_srt.loc[(1,&quot;Whiskers&quot;): (5, &quot;Simba&quot;)])</pre><h4>Slicing with .iloc[ ]</h4><p>.iloc[] allows us to subset rows and columns using their positions, without considering index labels.</p><pre># Get 3rd row, 2nd column<br>print(cats.iloc[2, 1])<br><br># Get the first 4rows<br>print(cats.iloc[:4])<br><br># Get columns 2 to 4<br>print(cats.iloc[:, 1:4])<br><br># Subsetting in both directions at once<br>print(cats.iloc[:4, 1:4])</pre><h3>6. Subsetting Columns by Index</h3><p>It is also possible to subsetting columns using index values.</p><pre># Subsetting columns from breed to height<br>print(temperatures_srt.loc[:, &quot;breed&quot;:&quot;height&quot;])<br><br># Subsetting rows and columns together<br>print(temperatures_srt.loc[1: 5, &quot;breed&quot;:&quot;height&quot;])</pre><h3>7. Problems of Indexing</h3><p>While indexing offers powerful ways to manipulate DataFrames, it can also present some challenges:</p><ul><li><strong>Violates Tidy Data Principles</strong>: Indexing can sometimes complicate data formatting, making it harder to maintain the “tidy” data structure where each variable is a column, and each observation is a row.</li><li><strong>More Complex Syntax</strong>: Using hierarchical indexing or multi-indexing can add complexity to our code, especially when it comes to slicing or selecting specific data points.</li><li><strong>Slicing Limitations</strong>: Slicing by inner index levels can be less straightforward, requiring extra sorting steps or more complex syntax.</li></ul><p>References</p><p>[1] Pandas Documentation. <a href="https://pandas.pydata.org/pandas-docs/stable/index.html">pandas documentation — pandas 2.2.3 documentation</a></p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a><strong> | </strong><a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0?si=6b071022ddc847b9"><strong>Podcast</strong></a></li><li><a href="https://differ.blog/"><strong>Create a free AI-powered blog on Differ.</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06868808396a" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/mastering-dataframe-indexing-in-python-with-pandas-06868808396a">Mastering DataFrame Indexing in Python with Pandas</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Pandas: Exploring and Analyzing DataFrames]]></title>
            <link>https://python.plainenglish.io/getting-started-with-pandas-exploring-and-analyzing-dataframes-4c1a5b6cd101?source=rss-bd281fad5f8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c1a5b6cd101</guid>
            <category><![CDATA[statistical-analysis]]></category>
            <category><![CDATA[data-exploration]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Gizem Kaya]]></dc:creator>
            <pubDate>Tue, 01 Oct 2024 17:52:53 GMT</pubDate>
            <atom:updated>2024-10-30T16:04:29.791Z</atom:updated>
            <content:encoded><![CDATA[<p>You may have come across with the term Exploratory Data Analysis (EDA). It simply stands for understanding the data, with its patterns, errors, missing values, distribution, outliers and more. The main goal of EDA is knowing the data better, to ensure the results are accurate and reliable of any study or any business decision made upon these data.</p><p>Python’s built-in data structures make it attractive to perform EDA. It has powerful libraries like Pandas which eases to data exploration steps. In this tutorial, we will look some key features of Pandas to explore and analyze our data, which includes basic statistical analysis, subsetting, sorting and grouping. We will create a Pandas DataFrame with a small sample data and use Pandas functions and attributes to analyze this Dataframe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qumh8xK3v10_KrUp5181uQ.png" /></figure><h3>1. Understanding the Basics of DataFrames</h3><p>Pandas defines Dataframes as “two-dimensional, size-mutable, potentially heterogeneous tabular data” (1). Let’s create a Dataframe, including both numeric and categorical features about cats and getting a quick overview of that DataFrame.</p><pre># Lets start by importing numpy and pandas libraries<br>import pandas as pd<br>import numpy as np<br><br># Create the DataFrame with the sample data<br><br>data = {<br>    &quot;cat_id&quot;: [1, 2, 3, 4, 5, 6],<br>    &quot;cat_name&quot;: [&quot;Whiskers&quot;, &quot;Fluffy&quot;, &quot;Max&quot;, &quot;Bella&quot;, &quot;Shadow&quot;, &quot;Simba&quot;],<br>    &quot;breed&quot;: [&quot;Siamese&quot;, &quot;Persian&quot;, &quot;Maine Coon&quot;, &quot;Siamese&quot;, &quot;Persian&quot;, &quot;Maine Coon&quot;],<br>    &quot;color&quot;: [&quot;Cream&quot;, &quot;White&quot;, &quot;Brown&quot;, &quot;Cream&quot;, &quot;Black&quot;, &quot;Gray&quot;],<br>    &quot;weight&quot;: [4.5, 5.0, 6.0, 4.2, 4.8, 6.5],<br>    &quot;height&quot;: [25, 28, 30, 24, 27, 32],<br>    &quot;date_of_birth&quot;: [&quot;2018-05-20&quot;, &quot;2017-08-15&quot;, &quot;2016-11-12&quot;, &quot;2019-03-09&quot;, &quot;2018-07-22&quot;, &quot;2016-05-30&quot;]<br>}<br><br>cats = pd.DataFrame(data)</pre><pre># Start exploring the DataFrame<br><br>print(cats.head())       # Viewing the first few rows<br>print(cats.describe())   # Summary statistics of numerical columns</pre><ul><li><strong>head()</strong> function gives us the first few rows of the DataFrame.</li><li><strong>describe()</strong> function provides valuable statistical analysis results (i.e. mean, standard deviation, min, and max for numeric features).</li></ul><p>We can also examine DataFrame more using the following attributes:</p><pre>print(cats.shape)    # Number of rows and columns<br>print(cats.columns)  # List of column names<br>print(cats.index)    # Row index information<br>print(cats.values)   # Data as a NumPy array</pre><h3>2. Sorting and Subsetting</h3><p>Sorting and subsetting are often the first steps which needed when analyzing data.</p><h4>Sorting Data</h4><p>The following code can be used to sort the DataFrame based on selected feature either in ascending or descending order.</p><pre># Sorting `cats` DataFrame by weight in descending order<br>cats_sorted = cats.sort_values(&quot;weight&quot;, ascending=False)<br>print(cats_sorted)</pre><pre># Sorting by multiple columns:<br># First by `weight` in descending, then by`height` in ascending order<br>multi_sorted_cats = cats.sort_values([&quot;weight&quot;, &quot;height&quot;], ascending=[False, True])<br>print(multi_sorted_cats)</pre><h4>Subsetting Data</h4><p>We can also subset our DataFrame based on the conditions we define. The examples below, show how to filter the cats according to their categorical or numeric features.</p><pre># Filtering cats with height greater than 28<br>tall_cats = cats[cats[&quot;height&quot;] &gt; 28]<br><br># Filtering cats born before January 1st, 2016<br>young_cats = cats[cats[&quot;date_of_birth&quot;] &lt; &quot;2016-01-01&quot;]<br><br># Filtering for British short hair with gray color<br>british_gray = cats[(cats[&quot;breed&quot;] == &quot;Persian&quot;) &amp; (cats[&quot;color&quot;] == &quot;Gray&quot;)]<br><br># Filtering for cats that are either black or gray<br>is_black_or_gray = cats[&quot;color&quot;].isin([&quot;Black&quot;, &quot;Gray&quot;])<br>filtered_cats = cats[is_black_or_gray]</pre><h3>3. Adding New Columns</h3><p>Data preprocessing, or with more fancier terms feature engineering, sometimes requires adding new columns to the existing dataset. We can easily add new columns to our data derived from existing features:</p><pre># Adding a new column with weights in pounds by using the existing weight column in kg<br>cats[&quot;weight_lbs&quot;] = cats[&quot;weight&quot;] * 2.20462</pre><h3>4. Summary Statistics</h3><p>In the beginning, I mentioned that Pandas provides a wide range of methods to quickly summarize our data, which can guide us for further analysis. Here are some of the most commonly used functions useful to understand our dataset better.</p><h4>Basic Summary Statistics</h4><p>There are some built-in methods that can be used to explore our data:</p><ul><li><strong>mean()</strong>: Computes the average value of a series. Useful to understand the central tendency.</li><li><strong>median()</strong>: Finds the median, which is helpful to identify the middle point of the data. We can look median and mean together to have a first guess on the skewness of the data.</li><li><strong>std()</strong>: Shows the standard deviation which helps us to understand variability, how spread out the values are.</li><li><strong>min() &amp; </strong><strong>max()</strong>: Give the smallest and largest values in the dataset.</li></ul><p>Here is the sample code on how to use these functions:</p><pre># Mean height of cats<br>mean_height = cats[&quot;height&quot;].mean()<br>print(f&quot;Mean height: {mean_height} cm&quot;)<br><br># Median weight of cats<br>median_weight = cats[&quot;weight&quot;].median()<br>print(f&quot;Median weight: {median_weight} kg&quot;)<br><br># Standard deviation of height<br>std_height = cats[&quot;height&quot;].std()<br>print(f&quot;Standard Deviation of height: {std_height}&quot;)<br><br># Minimum and maximum weight of cats<br>min_weight = cats[&quot;weight&quot;].min()<br>max_weight = cats[&quot;weight&quot;].max()<br>print(f&quot;Minimum weight: {min_weight} kg, Maximum weight: {max_weight} kg&quot;)</pre><h4>Descriptive Statistics for the Entire DataFrame</h4><p>In order to get an overall picture of our numerical features, we can use <strong>describe()</strong> function. It gives the count, mean, standard deviation, minimum, quartiles, and maximum values for all numerical features in the DataFrame. It provides us insights about the range, distribution, and outliers in our dataset.</p><pre># Summary statistics for all numeric columns in the `cats` DataFrame<br>summary_stats = cats.describe()<br>print(summary_stats)</pre><h4>Applying Custom Functions with .agg()</h4><p>When the built-in methods are not sufficient, we might need to create a custom function. <strong>agg()</strong> function is a powerful tool for this purpose. In the example below, you can see how we can define an inter-quantile range function, which can be useful to understand the spread of the middle 50% of the data, especially when dealing with outliers.</p><pre># A custom function to calculate the Inter-Quartile Range (IQR)<br>def iqr(column):<br>    return column.quantile(0.75) - column.quantile(0.25)</pre><pre># Using &#39;.agg()&#39; to apply the IQR function on cats&#39; weight data<br>iqr_cats_weight = cats[&quot;weight&quot;].agg(iqr)<br>print(f&quot;IQR of weight: {iqr_cats_weight}&quot;)</pre><pre># Applying multiple aggregation functions to multiple columns<br>multi_stats = cats[[&quot;weight&quot;, &quot;height&quot;]].agg([iqr, np.median])<br>print(multi_stats)</pre><h3>5. Grouping and Aggregating</h3><p>We can also use <strong>groupby()</strong> function to group our data on one or more variables. Using <strong>groupby()</strong> together with aggregation methods, such as sum, mean, min, max, etc. can help us to perform calculations on the subsets.</p><pre># Aggregating total weight by breed<br>weight_by_breed = cats.groupby(&quot;breed&quot;)[&quot;weight&quot;].sum()<br>print(&quot;Total weight by breed:&quot;)<br>print(weight_by_breed)<br><br># Proportion of total weight by each breed<br>weight_propn_by_breed = weight_by_breed / weight_by_breed.sum()<br>print(&quot;\nProportion of total weight by breed:&quot;)<br>print(weight_propn_by_breed)<br><br># For each breed, getting statistics for height<br>height_stats_by_breed = cats.groupby(&quot;breed&quot;)[&quot;height&quot;].agg([np.min, np.max, np.mean, np.median])<br>print(&quot;\nHeight statistics by breed:&quot;)<br>print(height_stats_by_breed)</pre><h3>6. Cumulative Calculations</h3><p>Pandas makes it easy to perform cumulative calculations, which can be useful for tracking trends over time. With <strong>cumsum()</strong>, we can track running totals. With <strong>cummax()</strong>, we can monitor peak values in the dataset.</p><pre># Sort by height to visualize growth pattern<br>cats = cats.sort_values(&quot;height&quot;)<br><br># Cumulative sum and max of cats`heights<br>cats[&quot;cum_height&quot;] = cats[&quot;height&quot;].cumsum() # Total height if all cats were stacked on top of each other<br>cats[&quot;cum_max_height&quot;] = cats[&quot;height&quot;].cummax() # Maximum height observed so far<br><br>print(cats[[&quot;cat_name&quot;, &quot;height&quot;, &quot;cum_height&quot;, &quot;cum_max_height&quot;]])</pre><h3>7. Counting Unique Values and Frequencies</h3><p>The frequency of categorical features in the dataset can give us valuable insights. <strong>value_counts()</strong> counts the occurrences of each unique value in a column. Since it is not possible to simply look at the statistical distribution of the categorical variables, unlike numerical ones, <strong>value_counts() </strong>function could be very useful to understand the categorical features. It can show us whether our dataset is balanced or can cause bias if it is used for an machine learning application.</p><pre># Count the number of unique cat names<br>cats_unique = cats.drop_duplicates(subset=&quot;cat_name&quot;)<br>print(cats_unique.value_counts())<br><br># Counting cats according to breeds and ratios<br>cats_counts =cats[&quot;breed&quot;].value_counts()<br><br># normalize=True gives proportions instead of counts<br>cats_ratios = cats[&quot;breed&quot;].value_counts(normalize=True)<br>print(cats_counts)<br>print(cats_ratios)</pre><h3>8. Pivoting Data</h3><p>MS Excel lovers are more keen on working with pivot tables. We all know they are powerful tools to reorganize, summarize or aggregate on the data. The good news is that they are also available in Pandas. Let’s look at how we can perform basic pivoting and multiple aggregations with Pandas.</p><h4>Basic Pivoting</h4><p>In the example below, the pivot table computes the mean height for each breed. The index parameter represents the rows we want to group by, and values specifies the column we want to aggregate.</p><pre># Pivot for mean height for each breed<br>mean_height_by_breed = cats.pivot_table(values=&quot;height&quot;, index=&quot;breed&quot;)<br><br># Print the resulting pivot table<br>print(&quot;Mean height by breed:&quot;)<br>print(mean_height_by_breed)</pre><h4>Multiple Aggregation Functions</h4><p>With Pandas, we can apply multiple functions (like mean and median) to our dataset to analyze different characteristics in a single pivot table.</p><pre># Pivot for mean and median height for each breed<br>mean_med_height_by_breed = cats.pivot_table(values=&quot;height&quot;, index=&quot;breed&quot;, aggfunc=[np.mean, np.median])<br><br># Print the pivot table with mean and median<br>print(&quot;Mean and median height by breed:&quot;)<br>print(mean_med_height_by_breed)</pre><h3>Conclusion</h3><p>In this article, we explored how to leverage the power of Pandas for data exploration and analysis. Whether you’re just getting started with data analysis or looking to brush up on Pandas skills, I hope these fundamental operations can aid your data exploration process.</p><h3>References</h3><p>[1] <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html">https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html</a></p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a><strong> </strong>| <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a></li><li><a href="https://differ.blog/"><strong>Create a free AI-powered blog on Differ.</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c1a5b6cd101" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/getting-started-with-pandas-exploring-and-analyzing-dataframes-4c1a5b6cd101">Getting Started with Pandas: Exploring and Analyzing DataFrames</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Storytelling: Crafting Compelling Narratives]]></title>
            <link>https://ai.plainenglish.io/data-storytelling-crafting-compelling-narratives-041be231a232?source=rss-bd281fad5f8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/041be231a232</guid>
            <dc:creator><![CDATA[Gizem Kaya]]></dc:creator>
            <pubDate>Fri, 19 Apr 2024 08:30:53 GMT</pubDate>
            <atom:updated>2024-10-12T16:35:55.915Z</atom:updated>
            <content:encoded><![CDATA[<p>The rise of <strong>Data Management </strong>concept<strong>,</strong> which we frequently hear about today, began in the 1980s. Conversely, the journey of the term <strong>Data Science</strong> extends from the early 2000s to the present day. Data Science and the essential expertise required for its applications becomes increasingly apperant. It is constantly in the spotlight with new shiny terms that have become quite popular recently, such as <strong>Artificial Intelligence, Machine Learning and Big Data</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A5IBtBe0qUs2FXDqPDEjCg.jpeg" /></figure><p>While this trendy terminology continues to captivate attention, I personally find <strong>Data Storytelling</strong> to be the most intriguing topic to begin with Data Management. Its simplicity resonated, feeling akin to one of us. Data Storytelling, at its essence, can be characterized as the conveyance of information through narrative crafted to engage the target audience. Considering that the ultimate aim of organizations with regard to data management is to glean <strong>actionable outcomes</strong>, Data Storytelling emerges as an indispensable component of this endeavor.</p><p>Especially in recent years, many companies have begun to incorporate central Data Analysis teams into their organizations. These teams have many indicators and analysis reports that are followed in terms of supporting employees in the decision-making process. One of the pitfalls of providing employees with all the data and analysis they need with these reports is that the employee who gets lost in the analysis may miss the main point that needs to be seen. Data Storytelling comes into play at this point as an ability to transfer data not only in numbers or graphs but also as a transfer ability that will enable people to reach the important result. Like in any story, it is mentioned here that what is intended to be conveyed to the target audience with an introduction, development, and conclusion section. For everyone working in the field of data management, even if they don’t define it this way, it is possible to say that Data Storytelling is a concept that they inherently know but may overlook or not think much about.</p><p>Brent Dykes says in an article he wrote that one of the most difficult and important skills required for data storytelling is empathy. Thus, by understanding not only what the target audience wants to achieve from this data analysis but also how they will react to that result and what will motivate them, information transfer can be made.</p><p>Currently, Data Storytelling is not seen as a special role in organizations but rather as a skill that individuals working in the field of Data Analysis should possess. However, it is definite that it is an essential skill for the final goal of the studies conducted in the field of data analysis to be achieved.</p><p>One of the most important points necessary to tell striking stories with data is, of course, visualization. Adhering to certain rules and employing specific techniques can significantly enhance the effectiveness of visualizing data. Here are some additional insights to tell your story with data visualization:</p><ol><li><strong>Simplicity</strong>: One of the cardinal rules of data visualization is to keep it simple and clear. Complex visuals can overwhelm the audience and hinder comprehension. Utilize clear labels, intuitive color schemes, and straightforward design to convey your message effectively.</li><li><strong>Relevance</strong>: Ensure that your visualizations are relevant to the narrative you’re crafting. Each visual should contribute meaningfully to the overarching story, providing context and insights that support the key points you wish to convey.</li><li><strong>Accuracy</strong>: Avoid misleading representations or cherry-picking data points to fit a particular narrative. Present the data accurately and transparently, allowing viewers to draw their conclusions based on factual information.</li><li><strong>Engagement</strong>: Incorporating interactive elements into your visualizations can enhance engagement and facilitate deeper exploration of the data. Tools like Tableau, Power BI, and D3.js offer features for creating interactive dashboards and dynamic visualizations that invite viewers to interact with the data.</li><li><strong>Narrative Structure</strong>: Just as in traditional storytelling, data narratives benefit from a coherent structure that guides the audience through the information. Establish a clear beginning, middle, and end, with each visual component contributing to the progression of the story.</li><li><strong>Highlight</strong>: Use visual hierarchy to emphasize key insights and guide the viewer’s attention. Employ techniques such as size, color, and placement to highlight important data points and relationships within the visualization.</li><li><strong>Accessibility</strong>: Ensure that your visualizations are accessible to all audiences, including those with visual impairments or disabilities. Provide alternative text descriptions for images, use high-contrast colors, and design with accessibility standards in mind.</li><li><strong>Creativity</strong>: Infusing creativity into data visualization enhances its effectiveness and captivates the audience. Experiment with unconventional design elements, storytelling techniques, and interactive features to create visually compelling narratives that resonate with your audience and drive meaningful insights and action.</li></ol><p>By following these guidelines and leveraging the appropriate tools and techniques, you can create compelling data narratives that resonate with your audience and drive meaningful insights and action. I also recommend you to take a look at Orana Velarde’s article compiling good data visualization examples through this <a href="https://visme.co/blog/best-data-visualizations">link</a>.</p><p>Additionally, various tools and platforms are available to aid in data visualization and storytelling:</p><ul><li><strong>Tableau</strong>: A powerful data visualization tool that allows users to create interactive dashboards and reports.</li><li><strong>Microsoft Power BI</strong>: An intuitive business analytics tool that enables users to visualize and share insights from their data.</li><li><strong>Google Data Studio</strong>: A free tool for creating interactive dashboards and reports using data from Google Analytics, Google Ads, and other sources.</li><li><strong>D3.js</strong>: A JavaScript library for creating dynamic, interactive data visualizations in web browsers.</li><li><strong>Infogram</strong>: An online tool for creating infographics, charts, and maps that can be easily embedded into websites and presentations.</li><li><strong>Qlik Sense</strong>: A self-service data visualization and analytics tool that enables users to create interactive dashboards and reports.</li><li><strong>RAWGraphs</strong>: An online tool for creating custom visualizations from raw data, with a focus on simplicity and ease of use.</li><li><strong>Plotly</strong>: An open-source graphing library for Python, R, and JavaScript that offers interactive and publication-quality visualizations.</li><li><strong>Matplotlib</strong>: A Python library for creating static, animated, and interactive visualizations in a variety of formats.</li></ul><p>These tools offer a range of features and capabilities to suit different needs and skill levels, empowering storytellers to bring their data to life in compelling and impactful ways.</p><ul><li><em>Dykes, Brent. Effective Data Storytelling: How to Drive Change with Data, Narrative and Visuals. 2019.</em></li></ul><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a><strong> | </strong><a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0?si=6b071022ddc847b9"><strong>Podcast</strong></a></li><li><a href="https://differ.blog/"><strong>Create a free AI-powered blog on Differ.</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=041be231a232" width="1" height="1" alt=""><hr><p><a href="https://ai.plainenglish.io/data-storytelling-crafting-compelling-narratives-041be231a232">Data Storytelling: Crafting Compelling Narratives</a> was originally published in <a href="https://ai.plainenglish.io/">Artificial Intelligence in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>