How to Make a Pie Chart with ggplot2 in R - Demonstration
Channel: Monika Wahi
Date: 2022-04-21

*Note: I may be compensated, but you will not be charged, if you click on the links below.

In this video, Monika Wahi demonstrates how to use ggplot2 to make a time series plot in R.
Files on Github: https://buff.ly/3jPUNu5
Blog post about the topic: https://buff.ly/3L63v3h 
Video of ggplot2 code being run: https://youtu.be/vsTDkz2nESQ 

💡 If you are a public health practitioner looking for a targeted program for enhancing your data science skills, please sign up to participate in my 30-minute market research interview so I can get your feedback: https://buff.ly/3UnLqmq    

WANT TO SUPPORT MONIKA ON SOCIAL MEDIA?
❤️Subscribe to Monika's YouTube channel: https://buff.ly/2W6ijuc   
🧡Follow/connect with Monika on LinkedIn: https://www.linkedin.com/in/dethwench/ 
💛Follow Monika on Twitter: https://twitter.com/PHExaminer 
💚Try Monika’s courses on LinkedIn Learning: https://linkedin-learning.pxf.io/NKN0JO 
💙Try Monika's boutique research methods and data science courses here: https://buff.ly/3zM243P

Timestamps and links as the come up are below:
00:19 Explanation of what the video is about
01:10 Reading in example dataframe and examining the columns
02:26 Reading in the color vector
03:01 Explanation of what’s weird about the ggplot code for pie charts
03:14 Explanation of top three lines of ggplot code
04:09 Running the first two lines of code to demonstrate what happens when we do not include coord_polar(“y”)
04:22 Rerunning code including coord_polar(“y”)
04:53 Reviewing the rest of the ggplot code: 
* Paste() command for data labels for % with position_stack and vjust for label positioning
* labs command for suppressing unwanted labels
* guides command for formatting the legend, and 
* application of themes to suppress elements and add color to title.
06:16 Running entire plot code

How to Make a Pie Chart with ggplot2 in R - Demonstration