<?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 Hasali Perera on Medium]]></title>
        <description><![CDATA[Stories by Hasali Perera on Medium]]></description>
        <link>https://medium.com/@hasaliperera?source=rss-1e2117c4ec9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oO_Ga0K9SGWpDypJi8SScA.jpeg</url>
            <title>Stories by Hasali Perera on Medium</title>
            <link>https://medium.com/@hasaliperera?source=rss-1e2117c4ec9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 14:10:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hasaliperera/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[Specialized Data visualization tools with R]]></title>
            <link>https://hasaliperera.medium.com/specialized-data-visualization-tools-with-r-fe94330987a1?source=rss-1e2117c4ec9------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe94330987a1</guid>
            <category><![CDATA[radar-charts]]></category>
            <category><![CDATA[r-programming]]></category>
            <category><![CDATA[data-visualization-tools]]></category>
            <category><![CDATA[r-data-science]]></category>
            <category><![CDATA[box-plot]]></category>
            <dc:creator><![CDATA[Hasali Perera]]></dc:creator>
            <pubDate>Wed, 26 May 2021 07:10:05 GMT</pubDate>
            <atom:updated>2021-05-26T07:10:05.566Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GUzAdxqrD0HssKE48JQmsg.png" /></figure><p>The basic visualization tools such as bar charts, histograms, pie charts, and scatter plots are very popular tools among R users. Other than those basic visualizations, there are many plots we can create using R. So through this article, I’m hoping to introduce you to Two Specialized Data Visualization Tools we can create using R — <strong>Boxplots and Radar Charts .</strong></p><p><strong>Box Plots</strong></p><p>Box plot is a way of representing data through quartiles. This helps in <em>detecting the shape</em>, <em>center value,</em> and <em>variability </em>of the distribution. First and Foremost, we should install the relevant libraries to R studio. So for the boxplot, we need <strong><em>ggplot2 </em></strong>library and <strong><em>plotly</em></strong> library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*E4f4LyfZEEn1W8Jo2EKMoQ.png" /><figcaption>installing packages</figcaption></figure><p>Since we don’t have a dataset to create the boxplot, I generated two samples of data from two normal distributions with slightly different parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*CA4Q_c-V-lOuf2biv6NRvA.png" /><figcaption>Generating Randam Data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*TvF0EmijLFfA6gUHptlqVw.png" /><figcaption>The data sets</figcaption></figure><p>Here, I have set the seed value to make the generated data sets reproducible Then I created a data frame and generated two random data sets as X and Y.</p><p>Now let’s see how we can create the box plot using the above datasets and R. It’s pretty easy; Only takes one line of code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*vbBtnCeKaVc5CQMOShyMNw.png" /><figcaption>Creating the Box Plot</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*dJkyacsv_4ZTaaQmSgteWw.png" /><figcaption>Box Plots</figcaption></figure><p>So quickly to summarize; the bold line in the middle of the box indicates median; (the second quartile). Bottom and Top lines of ech data set represents first and third quartiles respectively. <em>Interquartile Range</em> is represented by the <em>height of the box.</em></p><p>We also can<em> </em>add outline colors and fill colors to the code (eg: <strong><em>color=I(“red”)</em></strong> and <strong><em>fill=I(“blue”)</em></strong>)</p><p>Code link : (<a href="https://github.com/hasaliiii/Data-Visualization-with-R/blob/b3cb154e10e2f7d4cc758aacdeb76ef9f7e0c1a3/Box%20Plot.RData"><em>https://github.com/hasaliiii/Data-Visualization-with-R/blob/b3cb154e10e2f7d4cc758aacdeb76ef9f7e0c1a3/Box%20Plot.RData</em></a>)</p><p><strong>Radar Charts</strong></p><p>Radar Chart is a useful data visualization tool to analyze multivariate data( three or more variables) in one plot. Each axes shows variables and lines drawn through these axises shows differences of plotted topics and variables.</p><p>In order to draw a radar chart we need a library named “<em>fmsb</em>” which has a <em>tool to create the radar char</em>t . first let’s see how to install <em>fmsb</em> library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*PpsJDU89o8Z2JeVL01QkTA.png" /><figcaption>installing fmsb library</figcaption></figure><p>So to plot the radar chart; I have defined a data set. If you have a data set you can import the data set to Rstudio and continue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*C9vxvHB5W-Lx0fK5zUHvpg.png" /><figcaption>Defining Dataset</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*KV_bgLxjQnNcf4JYrAcG-w.png" /><figcaption>Data Frame</figcaption></figure><p>To make the radar chart look nicer, we can also <strong><em>define fill colours</em></strong> and <strong><em>line colours</em></strong>. After that; we can create the radarchart using the code given below. Don’t forget to include a <strong><em>legend</em>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*biZGeNldIeHHRFqO376IbQ.png" /><figcaption>Defining fill/line colours, creating randarchart and legend</figcaption></figure><p>Here’s the radar chart I obtained from the above code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*X38_htoqBI_SqPatnhP3tg.png" /><figcaption>Radar Chart of Test Scores</figcaption></figure><p>Code link: (<a href="https://github.com/hasaliiii/Data-Visualization-with-R/blob/341c237013f82595429fed6d6756ce6cf888143e/radar%20charts%20new.R">https://github.com/hasaliiii/Data-Visualization-with-R/blob/341c237013f82595429fed6d6756ce6cf888143e/radar%20charts%20new.R</a>)</p><p>Hope this article might help someone, Let me know if there’s something unclear :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe94330987a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>