Hello dq,
I’m working through a guided project and have a basic question on plots. What I’m creating is an overlapping bar chart with three categories, ‘total’, ‘registered’ and ‘casual’, where ‘total’ is equal to ‘registered’ plus ‘casual’. When I create the overlapping bar chart I am confused with what is displayed. When you eyeball the chart it doesn’t make logical sense because it appears that ‘registered’ plus ‘casual’ is greater than the ‘total’ count when the x-axis is some function of time, ‘mnth’ or ‘weekday’. Here’s a screenshot example.
I’d expect the visible blue portion to be equal in size to the green bars since they should be the remainder of ‘total’ - ‘registered’, but they’re not. I did some validation of the ‘cnt’ or ‘total’ column by manually adding ‘registered’ and ‘casual’ and checking if it’s equal to the existing ‘cnt’ value, and it is. Can anyone help me understand what is going on?
Attaching the work in progress notebook, the charts start at ln12.
Thanks!
Predicting Bike Rentals.ipynb (749.5 KB)
Click here to view the jupyter notebook file in a new tab