Перейти к содержимому

Converting a stacked bar plot to a dot plot in R with ggplot2 (CC382)

Riffomonas Project

0:00 / 0:00

Converting a stacked bar plot to a dot plot in R with ggplot2 (CC382)

673 просмотра · Трансляция закончилась 11 месяцев назад
Riffomonas Project
27,6 тыс. подписчиков
673 просмотра · Трансляция закончилась 11 месяцев назад
Pat converts a stacked bar plot into a dot plot and gives it an inforgraphic feel like we'd see on the Our World in Data website. Aside from the dot plot, he also shows how to annotate the figure with text and arrows, reorder factors by different variables, and embed colors in titles. He created the figure using R, ggplot2, showtext, ggtext, and other tools from the tidyverse. The functions he used from these packages included aes, annotate, arrow, as.numeric, coord_cartesian, download.file, element_blank, element_text, element_textbox_simple, factor, fct_reorder, filter, font_add_google, geom_curve, geom_point, ggplot, ggsave, library, margin, mutate, pivot_longer, position_dodge, read_csv, scale_color_manual, scale_x_continuous, scale_y_continuous, select, showtext_auto, showtext_opts, unit, and unzip. You can find the code he developed in this episode at https://www.riffomonas.org/code_club/.... The newsletter describing this visualization at a 30,000 ft view can be found at https://shop.riffomonas.org/posts/vis.... You can find the original article presenting the figure at https://ourworldindata.org/does-the-n.... Here's a video critiquing the original plot    • Why shouldn't you use a stacked bar plot? ...  . If you have a figure that you would like to see me discuss in a future newsletter and episode of Code Club, email me at pat@riffomonas.org! Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at https://shop.riffomonas.org/youtube to get practice problems, tips, and insights. If you're interested in purchasing a video workshop be sure to check out https://riffomonas.org/workshops/ Support Riffomonas by becoming a Patreon member!   / riffomonas   You can also find complete tutorials for learning R with the tidyverse using... Microbial ecology data: https://www.riffomonas.org/minimalR/ General data: https://www.riffomonas.org/generalR/ If you want to cite this video, please consider citing https://journals.asm.org/doi/10.1128/...