DATA VISUALIZATION IN R

Sanskar wagavkar
5 min readApr 7, 2021

--

Introduction

Data Visualization is a graphical representation of data. It gives us a lot more information from the data than the raw data. By using visual elements like graphs, charts and maps, data visualization tools provide an accessible way to see and understand trends, outliers and patterns in data. Data Visualization is the technique by which we can represent the large amount of data in understandable format (Graphs, Pie Chart and Maps).

Data visualization is that the representation of information or information during a graph, chart, or other visual format. It communicates relationships of the info with images. this can be important because it allows trends and patterns to be more easily seen. With the increase of huge data upon us, we want to be ready to interpret increasingly larger batches of knowledge. Machine learning makes it easier to conduct analyses like predictive analysis, which might then function helpful visualizations to present. Whether you’re employed in finance, marketing, tech, design, or anything, you would like to visualize data. That fact showcases the importance of knowledge visualization.

Description

Data Visualization

· Data visualization helps to tell stories by curating the data.

· Leading the target audience to focus on business insights to discover areas that require attention.

· It is easy to understand.

R Programming

· R is a programming language and free software environment.

· It is statistical computing and graphics supported by the R Foundation for Statistical Computing.

· The R language is widely used among statisticians and data miners for developing statistical software and data analysis

Types of Data visualization

Pie Chart

A pie chart is a type of graph that represents the data in circular graph. The slices of pie show relative size of the data.

Bar Chart

The picturing of a grouped data, within the variety of vertical or horizontal rectangular bars, where the lengths of the bars are resembling the measure of information, are referred to as bar graphs or bar charts. The bar chart helps to match the various sets of knowledge among different groups easily.

Scatter Plot

Scatter plots are the graphs that present the link between two variables in an exceedingly data-set. It represents data on a 2-dimensional plane or on a Cartesian system.

Histogram

Histogram feels like a bar graph, but measures frequency instead of trends over time. The x-axis of a histogram lists the “bins” or intervals of the variable, and also the y-axis is frequency, so each bar represents the frequency of that bin. for instance, you’ll measure the frequencies of every answer to a survey question. The bins would be the answer: “unsatisfactory,” “neutral,” and “satisfactory.” this might tell you ways many folks gave each answer.

Line Chart

A line chart illustrates is changes over time. The x-axis is typically a period of your time, while the y-axis is quantity. So, this might illustrate a company’s sales for the year attenuated by month and the way many units a factory produced every day for the past week. So how line graph works.

Map Chart

Much of the info handled in businesses features a location element, which makes it easy for instance on a map. An example of a map visualization is mapping the quantity of purchases customers made in each state within the U.S. during this example, each state would be shaded in and states with less purchases would be a lighter shade, while states with more purchases would be darker shades. Location information also can be very valuable for business leadership to grasp, making this a very important data visualization to use.

What is ggplot2?

· ggplot2 is a plotting package that makes it simple to create complex plots from data in a data frame.

· Ggplot2 is a data visualization package for the statistical programming language R.

· In general, ggplot2 is a tool which breaks a graph into semantic component.

Advantages of Data Visualization

· Data Visualization is more effective than spreadsheets

· It is very easy to understand

· Speeds up the decision-making processes

· Exploring business insights

· Grasping the latest trends

Disadvantages of Data Visualization

· Data Visualization dashboards are mostly interactive

· It gives estimation not accuracy

· Improper Design issue

· Lack of assistance

Program

Step 1

To implement in R let’s first install the ggplot2 package:

Step 2

Now let’s load the package:

Step 3

Before moving further let’s transform the data into factors first:

Transforming data into factor is very essential step.

Step 4

Draw the graph which we are familiar with, which is bar graph:

Output

from executing the above code we get our bar plot which is shows below: -

Conclusion

Data visualization should communicate a data set clearly and effectively by using graphics. The best visualization makes it easy to comprehend data at a glance. They take complex information and break it down in a way that makes it simple for the target audience to understand and on which base their directions

--

--

No responses yet