Page 250 - Data Science class 11
P. 250

coding For data

             science Visualisation


             using r-studio
                                                                                    07










                    learning outcome



                  7.1  Introduction                       7.2  Data Visualisation and ggplot2 package
                  7.3  R Built-in Data Sets               7.4  Pie Chart/Graph
                  7.5  Bar Chart or Bar Graph             7.6  Line Charts
                  7.7  Histograms                         7.8  Scatterplots
                  7.9  Box Plot                           7.10 Maps using ggplot2
                  7.11 Statistical analysis in R



        7.1 IntroductIon

                                                                               th
        You have learnt about different types of graphs in Chapter 3 of the 8  and 9  standards under the heading "Data
                                                                       th
                                                                                           th
        Visualisation". You have further learnt about the use of statistics in data science in the 10  standard of the data
        science subject.

        7.2 data VIsualIsatIon and ggplot2 package

        An essential aspect of data science includes data Visualisation. You can represent such Visualisations as scatter plots,
        box plots, bar charts, histograms, pie charts, etc.

        Although we have functions to plot scatter plots, box plots, and time series plots in R, we can also plot them by
        including a package named ggplot2. ggplot2 is a plotting package that simplifies the creation of complex plots from
        data in a data frame. This package provides a more programmatic interface to specify what variables to plot, how they
        should be displayed, and other general visual properties. Thus, one needs to make minimal changes if the underlying
        data source changes and the Visualisation changes from scatter plot to bar plot.
        ggplot2 is an R package used for statistical computing and data representation using Data Visualisation. It is based
        on the "Grammar of Graphics," which consists of a set of rules and independent components that can be used to
        represent data in a variety of formats.

        ggplot2 is dedicated to data Visualisation. It can greatly improve the quality and aesthetics of your graphics, and will
        make you much more efficient in creating them.
        The ggplot2 package can be easily installed using the R function packages().

        Make sure that you have already installed the package ggplot2 in R. Take care that the Internet is available. Otherwise,
        go to the tool menu and click on the Install packages... option as shown below:
          248   Touchpad Data Science-XI
   245   246   247   248   249   250   251   252   253   254   255