From the course: R: Interactive Visualizations with htmlwidgets

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Prepare data to be tidy

Prepare data to be tidy - R Tutorial

From the course: R: Interactive Visualizations with htmlwidgets

Start my 1-month free trial

Prepare data to be tidy

- [Instructor] Most htmlwidget libraries, certainly all the ones for IU's expect data to be long-formatted. Long-formatted data is also known as tidy data. This name, tidy data, comes from the tidyverse ecosystem of packages. So how do htmlwidgets and the tidyverse fit together? Well, the tidyverse ecosystem of packages provides all the tools necessary to import, wrangle, and prepare data for visualization. They're an excellent collection or ecosystem of powerful tools designed to work seamlessly together. Some htmlwidget libraries even rely on the ability of the tidyverse to create structured or grouped data frames for building charts, i.e. for grouping together observations into different series or colors. So how do we differentiate between tidy and non-tidy data? Let's look inside of our exercise files. So inside of my project I have a folder called data dash raw and I have two different Excel files, one called wide format and one called long format. Let's have a look at wide…

Contents