Applied Data Visualization with R and ggplot2
eBook - ePub

Applied Data Visualization with R and ggplot2

Create useful, elaborate, and visually appealing plots

Dr. Tania Moulik

Condividi libro
  1. 140 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Applied Data Visualization with R and ggplot2

Create useful, elaborate, and visually appealing plots

Dr. Tania Moulik

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Develop informative and aesthetic visualizations that enable effective data analysis in less time

Key Features

  • Discover structure of ggplot2, grammar of graphics, and geometric objects
  • Study how to design and implement visualization from scratch
  • Explore the advantages of using advanced plots

Book Description

Applied Data Visualization with R and ggplot2 introduces you to the world of data visualization by taking you through the basic features of ggplot2. To start with, you'll learn how to set up the R environment, followed by getting insights into the grammar of graphics and geometric objects before you explore the plotting techniques.

You'll discover what layers, scales, coordinates, and themes are, and study how you can use them to transform your data into aesthetical graphs. Once you've grasped the basics, you'll move on to studying simple plots such as histograms and advanced plots such as superimposing and density plots. You'll also get to grips with plotting trends, correlations, and statistical summaries.

By the end of this book, you'll have created data visualizations that will impress your clients.

What you will learn

  • Set up the R environment, RStudio, and understand structure of ggplot2
  • Distinguish variables and use best practices to visualize them
  • Change visualization defaults to reveal more information about data
  • Implement the grammar of graphics in ggplot2 such as scales and faceting
  • Build complex and aesthetic visualizations with ggplot2 analysis methods
  • Logically and systematically explore complex relationships
  • Compare variables in a single visual, with advanced plotting methods

Who this book is for

Applied Data Visualization with R and ggplot2 is for you if you are a professional working with data and R. This book is also for students who want to enhance their data analysis skills by adding informative and professional visualizations. It is assumed that you know basics of the R language and its commands and objects.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Applied Data Visualization with R and ggplot2 è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Applied Data Visualization with R and ggplot2 di Dr. Tania Moulik in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatik e Datenvisualisierung. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2018
ISBN
9781789617672
Edizione
1
Argomento
Informatik

Basic Plotting in ggplot2

This chapter will cover basic concepts of ggplot2 and the Grammar of Graphics, using illustrative examples. You will generate solutions to problems of increasing complexity throughout the book. Lastly, you will master advanced plotting techniques, which will enable you to add more detail and increase the quality of your graphics.
In order to use ggplot2, you will first need to install R and RStudio. R is a programming language that is widely used for advanced modeling, statistical computing, and graphic production. R is considered the base package, while RStudio is a graphical interface (or IDE) that is based on R. Visualization is a very important aspect of data analysis, and it has its own underlying grammar (similar to the English language). There are many aspects of data analysis, and visualization is one of them. So, before we go further, let's discuss visualization in more detail.
By the end of this chapter, you will be able to:
  • Distinguish between different kinds of variables
  • Create simple plots and geometric objects, using qplot and ggplot2
  • Determine the most appropriate visualization by comparing variables
  • Utilize Grammar of Graphics concepts to improve plots in ggplot2

Introduction to ggplot2

ggplot2 is a visualization package in R. It was developed in 2005 and it uses the concept of the Grammar of Graphics to build a plot in layers and scales. This is the syntax used for the different components (aesthetics) of a geometric object. It also involves the grammatical rules for creating a visualization.
ggplot2 has grown in popularity over the years. It's a very powerful package, and its impressive scope has been enabled by the underlying grammar, which gives the user a very file level of control - making it perfect for a range of scenarios. Another great feature of ggplot 2 is that it is programmatic; hence, its visuals are reproducible. The ggplot2 package is open source, and its use is rapidly growing across various industries. Its visuals are flexible, professional, and can be created very quickly.
Read more about the top companies using R at https://www.listendata.com/2016/12/companies-using-r.html.

You can find out more about the role of a data scientist at https://www.innoarchitech.com/what-is-data-science-does-data-scientist-do/.

Similar Packages

Other visualization packages exist, such as matplotlib (in Python) and Tableau. The matplotlib and ggplot2 packages are equally popular, and they have similar features. Both are open source and widely used. Which one you would like to use may be a matter of preference. However, although both are programmatic and easy to use, since R was built with statisticians in mind, ggplot2 is considered to have more powerful graphics. More discussion on this topic can be found in the chapter later. Tableau is also very powerful, but it is limited in terms of statistical summaries and advanced data analytics. Tableau is not programmatic, and it is more memory intensive because it is completely interactive.
Excel has also been used for data analysis in the past, but it is not useful for processing the large amounts of data encountered in modern technology. It is interactive and not programmatic; hence, charts and graphs have to be made with interactivity and need to be updated every time more data is added. Packages such as ggplot2 are more powerful in that once the code is written, ggplot is independent of increases in the data, as long as the data structure is maintained. Also, ggplot2 provides a greater number of advanced plots that are not available in Excel.
Read more about Excel versus R at https://www.jessesadler.com/post/excel-vs-r/.

Read more about matplotlib versus R at http://pbpython.com/visualization-tools-1.html.

Read more about matplotlib versus ggplot at https://shiring.github.io/r_vs_python/2017/01/22/R_vs_Py_post.html.

The RStudio Workspace

So, before we go further, let's discuss visualization in more detail. Our first task is to load a dataset. To do so, we need to load certain packages in RStudio. Take a look at the screenshot of a typical RStudio layout, as follows:

Loading and Exploring a Dataset Using R Fu...

Indice dei contenuti