Creating a labeled scatter plot in R with ggplot2 (CC157)

preview_player
Показать описание
A labeled scatter plot is an effective approach when you want to highlight something about data that you are measuring with two continuous variables. In this episode of Code Club, Pat shows how he would convert a slope chart into a labelled scatter plot to display the change in people's intention to receive the COVID-19 vaccine with data from 2020. He uses geom_point from ggplot2 to create the scatter plot and then shows how to add labels using geom_label or geom_label_repel (from ggrepel). Finally, he also uses geom_abline, coord_fixed, and geom_text to create a legend. The data depict the percentage of people in 15 countries who would be willing to receive the COVID-19 vaccine as of August and October of 2020.

You can also find complete tutorials for learning R with the tidyverse using...

0:00 Creating a labeled scatter plot
2:31 Creating scatter plot
4:50 Giving context to the data with coord_fixed and abline
6:37 Cleaning up theme settings
7:51 Adding a diagonal line with a legend
11:22 Adding labels to the points
15:51 Critique of figure
Рекомендации по теме
Комментарии
Автор

Thank you for saving my term paper! Excellent and clear explanation!

shishanliu
Автор

This is really great! I like the way you teach. So professional!

waelbadawy
Автор

Brilliantly done! I'm a big fan of base R over Tidyverse in general, but seeing you work with ggplot has me reconsidering!

RUJedi
Автор

I was struggling to label the plot. Thank you.

brindangnanampownraj
Автор

I would love to learn about binscatter plot. If you please find time to teach us principle behind it and how it is different from scatter plot. Thanks

bhaskartigp
Автор

so nice, will highlighting specific countries will it be part 2 of the video? Thanks

KN-txsd
visit shbcf.ru