CODE AND DESCRIPTION
How do you make a population pyramid in ggplot2? These charts, which allow us to see the distribution of the population by gender and age, are common ways to examine demographics in a particular place. The ggplot code needed to make a population pyramid is quite straightforward, but, as you’ll see in this video, you can go way beyond straightforward to make a polished population pyramid. You can find all of the code in the corresponding blog post at: https://rfortherestofus.com/2024/07/population-pyramid-part-1
If you want to receive emails to help you on your R journey, sign up for the R for the Rest of Us newsletter: https://rfortherestofus.com/newsletter
Chapters
0:00 Intro
0:20 Population pyramid example
1:52 Make a basic population pyramid
6:47 Making a population pyramid using the patchwork package
9:10 Using the plot layout function to set plot widths
10:05 Adding sex labels
10:54 Adding axis text
12:21 Improve axis text formatting
15:18 Conclusion
15:51 Outro