DataTables supports filtering dates and numbers via the top filter, provided columns data types are correctly specified. Columns are formatted via the format* functions. Not all formats are supported across all browsers; it's recommended you refer to the
- [Instructor] Often, you need to format data…within tables, to a specific format.…For instance, you want dates to appear…in a certain way,…or you have currency or percentage columns.…Let's look at how we can format columns…using the DT Library.…Let's Open up our File, formatting-columns.R.…I going to minimize my environment,…because I don't need to see it,…and let's load the libraries I need for this example.…I'll first Load the "tidyverse" Library,…I'll Load the "DT" Library.…Then the "lubridate" Library,…so I can manipulate dates easily.…
And then finally, the "stringr" Library,…so I can manipulate strings.…Lines six through nine, I used the ymd function…to generate any vector of dates,…and then lines 11 through 15,…I Specify my Data Table using the Table function.…Then lines 17 through 18,…I used the verb Mutate to add…a new column called Conversion,…which calculates the conversion between…the amount in dollars, and amount in pounds.…I then use on line 20 and 21,…a relatively nice little pattern…to format my column names as pretty_headers,…
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?
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.