Hi, in this one, I will cover how to create a bar charts or histogram in GG plot.
Complete Machine Learning Course for FREE: https://rb.gy/posrbk
Checkout complete Data Scientist Learning Path here:
https://edu.machinelearningplus.com/s...
🔹 Plotting for Data Analysis - Histogram (2022)
First, I will show you the fundamental difference between a histogram and a bar chart. So both of them look the same, the data on which they are created is very different, we will first understand the difference and then look at three different ways of creating histogram followed by creating a bar chart using geo monusco bar.
So by the end of this video, you would have created plots that looked like this. Let's go to the our code. So the difference between a histogram and a bar chart is this. The differences a histogram is created on a continuous variable, whereas a bar chart is created on a categorical variable.
So what histogram does is given a continuous variable, it transforms that continuous variable into a categorical variable by creating bins out of it, it will count how many records are present in each of those bins and make a plot out of those counts.
So that's what histogram does. Whereas for a bar chart, the counts are typically given as an input. So first, we will see how to create a histogram based on using the geom bar function based on another categorical variable.
You could argue that it is still a bar chart only because we are not explicitly forming the bins from the continuous variable itself.
Let me know in the comments section if you have any questions!
🤝 Like, Share, Subscribe for more!
Follow us on our social media handles for all updates, events and live sessions-
✅ Instagram: / machinelearningplus
✅ LinkedIn: / machine-learning-plus
✅ YouTube: / numyard
✅ Twitter: / r_programming
✅ Website: https://www.machinelearningplus.com/
If you enjoyed this video, be sure to throw it a like and make sure to subscribe to not miss any future videos!
Thanks for watching!
#machinelearningplus #python #machinelearning #datascience