Juneteenth 2021: Using ggplot2 and R to create a map showing the history of lynchings (CC117)
ฝัง
- เผยแพร่เมื่อ 23 ก.ค. 2024
- This episode generates a map with the R ggplot2 package showing the number lynchings in each county between 1877 and 1950 as a heatmap. Juneteenth is the anniversary of the 1865 emmancipation of slaves in Texas. To commemorate this important date, I'm presenting a series of episodes creating data visualizations using data from the CSDE Lynching Database.
I use RStudio and the #geom_polygon function from the #ggplot2 package as well as numerous dplyr functions including #anti_join and even #right_join. The accompanying blog post can be found at www.riffomonas.org/code_club/...
The CSDE Lynching database can be found at lynching.csde.washington.edu/#...
Do you have a figure that you would like to receive a critique or help improving? Let me know and I'd be happy to arrange a guest appearance!
If you're interested in taking an upcoming 3 day R workshop, email me at riffomonas@gmail.com!
R: r-project.org
RStudio: rstudio.com
Raw data: github.com/riffomonas/raw_dat...
Workshops: www.mothur.org/wiki/workshops
You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: www.riffomonas.org/minimalR/
General data: www.riffomonas.org/generalR/
0:00 Introduction
2:26 Counting number of lynchings by state and county
5:37 Fixing county level names with anti_join
11:40 Creating a county level map with number of lynchings
16:04 Improving appearance of map
24:41 Critique of map - วิทยาศาสตร์และเทคโนโลยี
I *think* this was the first time I have used right_join for a real problem. Let me know what you think of the final map as well as the figures from the previous episode. Please, be constructive!
Hey there, Could you tell how to label the state names on the map using geom_text? I tried labelling but labels arent working out for me. Its overlapping. could you share a video on that please.
Great video! Being able to see the whole process of troubleshooting the unknown/ misidentified counties was very educational. Thanks for posting.
Hi Rene! Thanks!
The troubleshooting and the mastery data wrangling process is phenomenal. Thank you.
My pleasure and thanks for your compliment! Glad you found the videos
Fascinating data manipulation skills. That's my best part of his videos. 😊
Thanks! I guess after enough mistakes you get pretty fluent with the tools 😂
Thanks for the videos! Also, it feels like Ryan Reynold is teaching :D
My pleasure!