Visualization

ggplot2: Histogram

Introduction This is the eleventh post in the series Elegant Data Visualization with ggplot2. In the previous post, we learnt to build box plots. In this post, we will learn to build histogram specify bins modify color fill alpha bin width line type line size map aesthetics to variables A histogram is a plot that can be used to examine the shape and spread of continuous data.

ggplot2: Box Plots

Introduction This is the 9th post in the series Elegant Data Visualization with ggplot2. In the previous post, we learnt how to build bar charts. In this post, we will learn to: build box plots modify box color fill alpha line size line type modify outlier color shape size alpha The box plot is a standardized way of displaying the distribution of data. It is useful for detecting outliers and for comparing distributions and shows the shape, central tendancy and variability of the data.

ggplot2: Bar Plots

Introduction This is the ninth post in the series Elegant Data Visualization with ggplot2. In the previous post, we learnt to build line charts. In this post, we will learn to: build simple bar plot stacked bar plot grouped bar plot proportional bar plot map aesthetics to variables specify values for bar color bar line color bar line type bar line size Libraries, Code & Data We will use the following libraries in this post:

ggplot2: Line Graphs

Introduction This is the 8th post in the series Elegant Data Visualization with ggplot2. In the previous post, we learnt to build scatter plots. In this post, we will learn to: build simple line chart grouped line chart map aesthetics to variables modify line color type size Libraries, Code & Data We will use the following libraries in this post: readr ggplot2 All the data sets used in this post can be found here and code can be downloaded from here.

ggplot2: Scatter Plots

Introduction This is the fifth post in the series Elegant Data Visualization with ggplot2. In the previous post, we learnt about text annotations. In this post, we will: build scatter plots modify point color fill alpha shape size fit regression line Libraries, Code & Data We will use the following libraries in this post: readr ggplot2 All the data sets used in this post can be found here and code can be downloaded from here.

ggplot2: Text Annotations

Introduction This is the sixth post in the series Elegant Data Visualization with ggplot2. In the previous post, we learnt to modify the axis and plot labels. In this post, we will learn to add text to the plots. add custom text modify color modify size modify fontface modify angle Libraries, Code & Data We will use the following libraries in this post: readr ggplot2 All the data sets used in this post can be found here and code can be downloaded from here.

ggplot2 - Introduction to Aesthetics

Introduction This is the fourth post in the series Elegant Data Visualization with ggplot2. In the previous post, we learnt about geoms and how we can use them to build different plots. In this post, we will focus on the aesthetics i.e. color, shape, size, alpha, line type, line width etc. We can map these to variables or specify values for them. If we want to map the above to variables, we have to specify them within the aes() function.

ggplot2 - Introduction to geoms

Introduction This is the third post in the series Elegant Data Visualization with ggplot2. In the previous post, we learnt how to create plots using the qplot() function. In this post, we will create some of the most routinely used plots to explore data using the geom_* functions. Libraries, Code & Data We will use the following libraries in this post: readr ggplot2 tibble dplyr All the data sets used in this post can be found here and code can be downloaded from here.

ggplot2: Quick Tour

Introduction This is the second post in the series Elegant Data Visualization with ggplot2. In the previous post, we understood the concept of grammar of graphics and even built a bar plot step by step while exploring the different components of a plot/chart. In this post, we will learn to quickly build a set of plots that are routinely used to explore data using qplot(). It can be used to quickly create plots but also has certain limitations.

Data Visualization with R - Combining Plots

Introduction This is the tenth post in the series Data Visualization With R. In the previous post, we learnt how to add text annotations to plots. In this post, we will learn how to combine multiple plots. Often, it is useful to have multiple plots in the same frame as it allows us to get a comprehensive view of a particular variable or compare among different variables. The Graphics package offers two methods to combine multiple plots.

Data Visualization with R - Text Annotations

Introduction This is the ninth post in the series Data Visualization With R. In the previous post, we learnt how to add legend to a plot. In this post, we will learn to add text annotations. There are occassions when you want to display additional information in a plot. This is usually achieved by adding text either inside the plot or on the margins. For example, you might want to label a line/bar or add formulas to better communicate what is shown in the plot.

Data Visualization with R - Legends

Introduction This is the eighth post in the series Data Visualisation With R. In the previous post, we learnt to build histograms. In this post, we will learn how to: position the legend within the plot modify the layout using ncol and horiz arguments add title using the title set of arguments modify the appearance and position of the legend box modify the appearance of the text in the legend box Legends are used to convey information about the data being represented by a plot.

Data Visualization with R - Histogram

Introduction This is the seventh post in the series Data Visualization With R. In the previous post, we learnt about box and whisker plots. In this post, we will learn to: create a bare bones histogram specify the number of bins/intervals represent frequency density on the Y axis add colors to the bars and the border add labels to the bars A histogram is a plot that can be used to examine the shape and spread of continuous data.

Data Visualization with R - Box Plots

Introduction This is the sixth post in the series Data Visualization With R. In the previous post, we learnt how to build bar plots. In this post, we will learn to create univariate/multivariate box plots interpret box plots create horizontal box plots detect outliers modify box color use formula to compare distributions of different variables use notches to compare medians Libraries, Code & Data All the data sets used in this post can be found here and code can be downloaded from here.

Data Visualization With R - Bar Plots

Introduction This is the fifth post in the series Data Visualization With R. In the previous post, we learnt how to build line graphs. In this post, we will visualize categorical data using univariate and bivariate bar plots. create simple bar plot stacked bar plot grouped bar plot modify bar direction color line color width labels modify axis range remove axes from the plot specify the line type of the X axes offset the Y axes modify legend Libraries, Code & Data All the data sets used in this post can be found here and code can be downloaded from here.

Data Visualization With R - Line Graphs

Introduction This is the fourth post in the series Data Visualization With R. In the previous post, we learnt how to build scatter plots. In this post, we will build line graphs. To be more specific we will learn to create line plots add color to lines modify line type/style modify line width add points to the lines modify axis range add additional lines to the plot Libraries, Code & Data All the data sets used in this post can be found here and code can be downloaded from here.

Data Visualization With R - Scatter Plots

Introduction This is the third post in the series Data Visualization With R. In the previous post, we learned how to add title, subtitle and axis labels. We also learned how to modify the range of the axis. In this post, we will learn how to create scatter plots. adding color to the points modify shape of the points modify size of the points Libraries, Code & Data All the data sets used in this post can be found here and code can be downloaded from here.

Data Visualization With R - Title and Axis Labels

Introduction This is the second post of the series Data Visualization With R. In the previous post, we explored the plot() function and observed the different types of plots it generated. In this post, we will learn how to add: Title Subtitle Axis Labels to a plot and how to modify: Axis range In the previous post, we created plots which did not have any title or labels.

Data Visualization With R - Introduction

Introduction This is the first post of the series Data Visualization With R. The objective of the series is to provide a gentle introduction to working with base graphics in R. We will come up with a similar series using ggplot2 shortly. what is data visualization why visualize data understand R graphics system graphics ggplot2 lattice build some simple plots Libraries, Code & Data All the data sets used in this post can be found here and code can be downloaded from here.