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

Compartir libro
  1. 140 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Applied Data Visualization with R and ggplot2

Create useful, elaborate, and visually appealing plots

Dr. Tania Moulik

Detalles del libro
Vista previa del libro
Índice
Citas

Información del 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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Applied Data Visualization with R and ggplot2 un PDF/ePUB en línea?
Sí, puedes acceder a Applied Data Visualization with R and ggplot2 de Dr. Tania Moulik en formato PDF o ePUB, así como a otros libros populares de Informatica y Visualizzazione di dati. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2018
ISBN
9781789617672
Edición
1
Categoría
Informatica

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...

Índice