subplots allow multiple charts to be combined with ease. Margins and offsets will need to be modified to ensure labels are displayed nicely. It is complicated, but possible to combine legends across charts—the group aesthetic is required to control this.
- [Instructor] Plotly provides fairly useful tools…for combining charts together to share the same axes.…Let's look at an example of how to do that…in our exercise files.…Let's open up subplots.r…and we're going to minimalize my environment…because I don't need to see it,…and at the top of the script file we load three libraries.…First, the tidyverse, which we evaluate with command enter.…Then, we load the gapminder library which provides us…with the gap minder dataset, then a plotly library,…which we use to create our interactive charts.…
Then, on line five through 12, we're creating ourselves…a new variable called gapminer_continents, and we can see…what we're doing with gapminder on like seven.…We pipe gapminder into mutate_if to convert…integer columns into double columns,…then we pipe into the verb group_by.…We group our data by continent and then by year.…Then, line eight through 10, we're using mutate…to add a couple of new columns.…First, we calculate the population of each continent…by summing the population of each country in that continent.…
AuthorMartin John Hadley
Start by learning to manage packages and structure data for visualizations with the tidyverse and the pipe operator. Then there is an important question: Which library should you choose? The course introduces five popular options: Leaflet, Plotly, Highcharter, visNetwork, and DataTables (DT). Instructor Martin Hadley shows how to use these libraries to create scattergeo, choropleth, and geolines maps; stacked bar charts, scatter charts, bubble charts, and heat maps; treemaps and time series charts; interactive networks and graphs; and responsive, interactive data tables. Plus, learn how to customize your visualizations with legends and tooltips, and extract click information for Shiny apps.
- Installing htmlwidgets
- Selecting the best htmlwidget
- Creating interactive maps with Leaflet
- Creating interactive charts with Plotly and Highcharter
- Creating interactive networks with visNetwork
- Creating interactive tables with DT
Skill Level Intermediate
Data Visualization Tips and Trickswith Matt Francis2h 14m Intermediate
DC.js for Data Science Essential Trainingwith Emma Saunders5h 3m Intermediate
1. Getting Started with htmlwidgets
2. Creating Interactive Maps with Leaflet
3. Creating Interactive Charts with Plotly
4. Creating Interactive Charts with Highcharter
5. Creating Interactive Networks with visNetwork
6. Creating Interactive Tables
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.