I have this table produced from a dataframe with 3 million observations.
df_mc_day <- df_clean_distances %>%
mutate(weekday = factor(weekdays(df_clean_distances$started_at),levels=c("Monday",
"Tuesday", "Wednesday","Thursday", "Friday", "Saturday", "Sunday")),
mc=c(member_casual)) %>% tabyl(weekday, member_casual)
df_mc_day %>% adorn_totals("row")
weekday casual member
Monday 147989 261391
Tuesday 142020 278049
Wednesday 154818 298865
Thursday 162762 294189
Friday 204401 299752
Saturday 329738 316257
Sunday 258167 259599
Total 1399895 2008102
I want to make it into a chart that looks like this

but I can only get ggplot to plot member or casual in two separate graphs. I know it has something to do with mutate but I don't understand what mutate is doing.
ggplot() + geom_col( data=df_mc_day, aes(x=weekday, y=member))
ggplot() + geom_col( data=df_mc_day, aes(x=weekday, y=casual))



ggplotyou need the data in long format i.e.df_mc_day %>% pivot_longer(cols = -weekday) %>% ggplot(aes(x = weekday, y = value, fill = name)) + geom_col(position = 'dodge')