Building Interactive Graphs with ggplot2 and Shiny
3.9 (20 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
172 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Building Interactive Graphs with ggplot2 and Shiny to your Wishlist.

Add to Wishlist

Building Interactive Graphs with ggplot2 and Shiny

Build stunning graphics and interactive visuals for real-time data analysis and visualization with ggplot2 and Shiny
3.9 (20 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
172 students enrolled
Created by Packt Publishing
Last updated 8/2015
Current price: $12 Original price: $85 Discount: 86% off
4 days left at this price!
30-Day Money-Back Guarantee
  • 1.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion

Training 5 or more people?

Get your team access to Udemy's top 2,000 courses anytime, anywhere.

Try Udemy for Business
What Will I Learn?
  • Create interactive web pages and combine elements to produce sophisticated graphs
  • Make basic statistical plots (lines, paths, bar plots, histograms, and boxplots) with ggplot 2
  • Combine graphical elements and put more information on your plots
  • Address big data by plotting summary plots very quickly
  • Customize your plots to your own style and requirements
  • Understand reactive programming in Shiny for building interactive web pages
  • Get to grips with scoping and make your code more efficient
  • Publish and share your work
View Curriculum
  • Following an example-driven approach, this course offers a practical way to learn how to build interactive graphs with ggplot 2 and Shiny with the help of easy-to-understand examples and step-by- step instructions.

This course helps you move beyond the default graphics offered by R and shows you how to start making elegant and publication-ready plots. It equips you with a good command over ggplot 2 to build sophisticated and interactive graphs that suit your own data requirements.

This practical course shows you how to build statistical plots layer by layer by following along with the examples provided. You’ll first get familiar with the basics of ggplot2 by understanding the use of the building blocks of standard statistical plots and see how you can combine elements to make new graphics. Next, you’ll learn how to customize your graphs, and finally you’ll explore how to make interactive webpages to present your work or analyze your data.

About the Author

Christophe Ladroue has many years of experience in machine learning and statistics. Most of his work has been focused on developing tools for the analysis of biological data, from genetics to physiology, and his scientific publications span from medical journals to pure statistics. He has used and has been teaching R and ggplot2 for a few years and he occasionally posts related articles on his personal blog

Who is the target audience?
  • If you are a software programmer, application developer, or web developer with basic to intermediate knowledge of R programming and you want to build elegant graphs to display data that you can showcase to your clients, this course is for you.
  • No knowledge of web technologies is required.
Compare to Other Shiny Courses
Curriculum For This Course
40 Lectures
Getting Started with ggplot2
5 Lectures 15:00

ggplot2 is not installed by default. A simple command allows you to install it. The free editor, RStudio, should also be installed. It'll be necessary when the manipulate package is presented.

Setting Up ggplot2

ggplot2 plots do not rely on one plot function, but are built incrementally layer by layer.

Understanding the Structure of a Plot

Graphical elements can be controlled by either aesthetics or parameters. The difference can appear confusing at first.

Mapping Data to Graphical Elements with Aesthetics

A typical error when using ggplot2 is to use the concepts of mapping and setting aesthetics together. We clarify these two concepts with a simple example.

Understanding Some Subtleties with Aesthetics

A ggplot object in a script will not produce a plot unless an explicit call to print() is made.

Using ggplot2 in Scripts
Understanding Basic Plots
5 Lectures 11:34

Data like quantity evolving through time are often presented with a connected line.

Drawing Lines

It's often of interest to draw paths on the plane, for example, to draw the movement of a particle.

Preview 01:46

Bar charts show the composition of your data against a certain criterion.

Bar Charts

Histograms and density plots show the whole distribution of a quantity.

Histograms and Density Plots

Boxplots show a visual summary of your data for easy comparison.

Using Boxplots
Using Conditional Plots
5 Lectures 09:53

Use more than two variables on your plot.

Using Group and Color

Use more than 2 variables on your plot.

Using Size and Color

Multiple data points having the same values hide each other. Move them about a bit to see them all.

Preview 02:06

Many graphs on one plot can be confusing. Put them all in their own subplots.

Faceting with One Variable

Many graphs on one plot can be confusing. Put them all in their own subplots.

Faceting with Two Variables
Using Statistics in Our Plot
5 Lectures 09:49

It might be difficult to see a trend in the data with lots of points on a plot. Draw a fitting curve to see the trend more clearly.

Linear Trends

Given what you know about the data, you might want to fit a specific model.

Non-linear Trends

You might want to check the data against particular values. Add whichever function you want on top of the plot.

User-Defined Function

Very large datasets must be summarized before they are plotted. A dedicated package makes it very easy.

BigVis: Visualizing Big Data

Extreme values are bound to occur in very large datasets and produce misleading plots. Learn how to remove them automatically.

BigVis: Smoothing Plots and Peeling Data
Customizing Your Graphs
5 Lectures 11:18

Plot on a log scale. Investigate an extract of the plot.

Controlling the Axes

Change the order of the variables to something more appropriate than the default.

Ordering Variables

Change the default colors to get a better contrast or convey an idea.

Customizing the Color Palette for Categorical Variables

Change the default colors. Investigate only a range of values by using multiple gradients.

Preview 02:48

Customize the axis labels and the legend titles. Flip both axes to help readability.

Customizing the Axes Labels and the Legends
Shiny – Part 1
5 Lectures 14:39

Create an interactive web page in R with Shiny. Firstly, install Shiny.

Preview 01:48

Understand how a Shiny app is structured.

Understanding the Structure of a Shiny App

Add textual reports to your webpage: free text, function outputs, and tables.

Rendering Text

Shiny is based on the concept of reactive programming.

Understanding Reactive Programming

Control the updating of reports by using a submit button.

Using a Button to Avoid Frequent Updates
Shiny – Part 2
5 Lectures 12:26

A report can be composed of semantically different elements and can also get quite busy. Use tabs to separate parts of the reports and get a cleaner interface.

Creating and Using Tabs

A good understanding of scoping can lead to great improvements in user experience.


If a user wants to, they can upload their own data to the Shiny app.

Uploading a File

Suppose a user wants to save the results in a file. Add a Download button for such situations.

Downloading a File

Let others use your interactive report on their machine, or share your report on the Internet.

Sharing Your Work
Putting Everything Together
5 Lectures 12:18

Let the user explore their data with interactive plots and reports.

Preview 02:10

Let the user choose a variable and plot its evolution through time automatically.

Building a Time Series Plot

Make a bubble chart in ggplot2. Turn it into a motion chart with Shiny.

Making a Bubble Chart in ggplot2

Make the user interface adapt to different situations.

Making Conditional Panels

We have built the important components of our dashboard separately. Let's put them together.

Building the Dashboard
About the Instructor
Packt Publishing
3.9 Average rating
8,274 Reviews
59,180 Students
687 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.