The hottest heatmaps with ggplot2 & pheatmap | Data Viz with Class!
Автор: Data Viz with Class
Загружено: 2025-09-08
Просмотров: 64
See below for the code I wrote in the video (with bonus content)!!!!!
I think heatmaps are the best way to squish 3D data into a 2D space -- for example, a PowerPoint presentation, document, data dashboard, or anything else that isn't VR goggles or one of those crime dramas where the data floats in front of the detective and they wave at it and solve the murder somehow (you know what I'm talking about right??)
In this tutorial, I'll show you how to apply your basic ggplot knowledge and make a heatmap. Or you can use tidyr and the pivot_wider function to reshape a "long" data frame into a "wide" data frame (or matrix), which then lets you use the pheatmap function for "Pretty Heatmaps".
You can download the data for this tutorial from Kaggle (via Ryan Burnsworth and the US Social Security Administration): https://www.kaggle.com/datasets/ryanb...
The code I wrote in the episode can be found here, with a few extra notes and bonus lines: https://github.com/calebclass/DataViz...
I hope you enjoy! I'd love to hear your questions & suggestions.
Chapters
00:00 Intro
01:30 The data
02:14 Simple line graph
03:20 Heatmaps!
03:51 Data prep (top 10 names)
07:54 Heatmap with ggplot2
11:09 Reshape data with tidyr
13:26 Heatmap with pheatmap
15:54 Annotate with a colorbar
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: