R Tutorial: Moving Beyond Simple Interactivity
Skills:
Data Literacy80%
Want to learn more? Take the full course at https://learn.datacamp.com/courses/intermediate-interactive-data-visualization-with-plotly-in-r at your own pace. More than a video, you'll learn hands-on coding & quickly apply skills to your daily work.
---
plotly makes it easy to create clean interactive graphics entirely in R, but interactive tooltips are only the beginning of plotly's capabilities. In this course, you will explore how to super-charge your interactive graphics using animations and linked brushing.
Over the next two chapters, we will explore two primary datasets.
The first dataset contains six economic indicators on economic conditions in countries across the world from 1960 to 2017. These indicators include: adjusted per capita GDP, a measure of carbon dioxide emissions, military spending as a percentage of GDP, and the urban population as a percentage of the whole population.
The second dataset you will explore in the next two chapters contains economic indicators for each state in the United States, along with Washington D.C. These data include the real GDP, employment level, homeownership rate, housing price index, and population of each state.
In the next chapter, you will learn how to create animated plots, including the animated bubble chart of carbon dioxide emissions against per capita GDP. Using animation, it's easy not only to see the clear relationship between carbon dioxide emissions and income, but also the clear rise of China and India in both indices.
This rise is so clear because animation draws our attention to changes over time far better than comparing small multiples.
Before we animate a bubble chart, let's review how one is created by reproducing the 2014 snapshot of carbon dioxide against income.
We begin by filtering the world indicators data set to extract the rows for 2014.
Next, we create the canvas for our plot, mapping income to x, co2 to y, and country names to the hoverinfo text.
Finally, add the markers trace, m
What You'll Learn
The video demonstrates how to use Plotly in R to create interactive graphics, including animated plots and linked brushing, using the crosstalk package to extend hover tool tips and create dynamic highlighting.
Full Transcript
plotly makes it easy to create clean interactive graphics entirely in r but interactive tooltips are only the beginning of plotlist capabilities in this course you'll explore how to supercharge your interactive graphics using animations in linked brushing over the next two chapters we'll explore two primary data sets the first data set contains six indicators of economic conditions in countries across the world from 1960 to 2018 these indicators include adjusted per capita gdp a measure of carbon dioxide emissions military spending as a percentage of gdp and the urban population as a percentage of the whole population the second data set you'll explore contains economic indicators for each u.s state along with washington d.c these data include the real gdp employment level home ownership rate housing price index and population in thousands in the next chapter you'll learn how to create animated plots such as this animated bubble chart of carbon dioxide emissions against per capita gdp using animation it's easy not only to see the clear relationship between carbon dioxide emissions and income but also the clear rise of china and india in both indices this rise is so clear because animation draws our attention to changes over time far better than comparing small multiples before we animate a bubble chart let's review how one is created by reproducing the 2014 snapshot of carbon dioxide against income we begin by filtering the world indicators data set to extract the rows for 2014. next we create the canvas for our plot mapping income to x co2 to y and country names to the hover info text finally we add the marker's trace mapping population to the size of the markers and six underscore regions to the color we also pass a list to the marker's argument refining the appearance of the points we allow the size of the points to be governed by the diameter rather than the area by setting size mode equal to diameter and shrink the points a touch by setting size ref to 2. you'll also learn how to create linked graphics without creating a shiny app via the crosstalk package in this example we use a bar chart to select the world region to highlight on the mobile chart allowing for easy comparison of selected regions to the rest of the world linked to brushing can also be persistent as shown here allowing us to select multiple regions to call out and compare this can be quite useful to compare clusters in this course you'll also learn how to extend hover tool tips to include dynamic highlighting via the crosstalk package here we use dynamic highlighting to focus on a single state's housing price index trajectory to see how it compares to the others before diving deeper into plotly let's create the base plots that will augment with animation dynamic highlighting and linked brushing in later chapters
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from DataCamp · DataCamp · 4 of 60
1
2
3
▶
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
SQL Server Tutorial: Date manipulation
DataCamp
R Tutorial: Intermediate Interactive Data Visualization with plotly in R
DataCamp
R Tutorial: Adding aesthetics to represent a variable
DataCamp
R Tutorial: Moving Beyond Simple Interactivity
DataCamp
Python Tutorial: Why use ML for marketing? Strategies and use cases
DataCamp
Python Tutorial: Preparation for modeling
DataCamp
Python Tutorial: Machine Learning modeling steps
DataCamp
R Tutorial: The prior model
DataCamp
R Tutorial: Data & the likelihood
DataCamp
R Tutorial: The posterior model
DataCamp
R Tutorial: An Introduction to plotly
DataCamp
R Tutorial: Plotting a single variable
DataCamp
R Tutorial: Bivariate graphics
DataCamp
Python Tutorial: Customer Segmentation in Python
DataCamp
Python Tutorial: Time cohorts
DataCamp
Python Tutorial: Calculate cohort metrics
DataCamp
Python Tutorial: Cohort analysis visualization
DataCamp
R Tutorial: Building Dashboards with flexdashboard
DataCamp
R Tutorial: Anatomy of a flexdashboard
DataCamp
R Tutorial: Layout basics
DataCamp
R Tutorial: Advanced layouts
DataCamp
Python Tutorial: Time Series Analysis in Python
DataCamp
Python Tutorial: Correlation of Two Time Series
DataCamp
Python Tutorial: Simple Linear Regressions
DataCamp
Python Tutorial: Autocorrelation
DataCamp
R Tutorial: The gapminder dataset
DataCamp
R Tutorial: The filter verb
DataCamp
R Tutorial: The arrange verb
DataCamp
R Tutorial: The mutate verb
DataCamp
R Tutorial: What is cluster analysis?
DataCamp
R Tutorial: Distance between two observations
DataCamp
R Tutorial: The importance of scale
DataCamp
R Tutorial: Measuring distance for categorical data
DataCamp
Python Tutorial: Plotting multiple graphs
DataCamp
Python Tutorial: Customizing axes
DataCamp
Python Tutorial: Legends, annotations, & styles
DataCamp
Python Tutorial: Introduction to iterators
DataCamp
Python Tutorial: Playing with iterators
DataCamp
Python Tutorial: Using iterators to load large files into memory
DataCamp
SQL Tutorial: Introduction to Relational Databases in SQL
DataCamp
SQL Tutorial: Tables: At the core of every database
DataCamp
SQL Tutorial: Update your database as the structure changes
DataCamp
Python Tutorial: Classification-Tree Learning
DataCamp
Python Tutorial: Decision-Tree for Classification
DataCamp
Python Tutorial: Decision-Tree for Regression
DataCamp
Python Tutorial: Census Subject Tables
DataCamp
Python Tutorial: Census Geography
DataCamp
Python Tutorial: Using the Census API
DataCamp
R Tutorial: A/B Testing in R
DataCamp
R Tutorial: Baseline Conversion Rates
DataCamp
R Tutorial: Designing an Experiment - Power Analysis
DataCamp
R Tutorial: Introduction to qualitative data
DataCamp
R Tutorial: Understanding your qualitative variables
DataCamp
R Tutorial: Making Better Plots
DataCamp
SQL Tutorial: OLTP and OLAP
DataCamp
SQL Tutorial: Storing data
DataCamp
SQL Tutorial: Database design
DataCamp
Python Tutorial: Introduction to spaCy
DataCamp
Python Tutorial: Statistical Models
DataCamp
Python Tutorial: Rule-based Matching
DataCamp
More on: Data Literacy
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
7 Best AI Tools for Research, Coding, and Development in 2026
Medium · Data Science
7 Best AI Tools for Research, Coding, and Development in 2026
Medium · Programming
How to Write a Project Status Report With AI in 15 Minutes
Medium · AI
7 AI Tools That Can Save You Hours Every Week
Medium · AI
🎓
Tutor Explanation
DeepCamp AI