ggplot average weekday within a year

Good evening everyone.
Guys, could you please tell me how to get an avg ride length like in the screenshot below?
image

This is my code. When I run it I get this

ggplot(viz_3,aes(x=day_of_week, y = ride_length, fill=member_casual, color=member_casual))+geom_jitter(stat = 'identity',
                    position = 'dodge')+ facet_wrap(~month)+theme(
                      axis.text.x = element_text(angle = 45))

these are codes i ran previously to order days

bike_rides$date <- as.Date(bike_rides$started_at)
bike_rides$month <- format(as.Date(bike_rides$date), "%B")
bike_rides$day <- format(as.Date(bike_rides$date), "%d")
bike_rides$year <- format(as.Date(bike_rides$date), "%Y")
bike_rides$day_of_week <- weekdays(bike_rides$date)
bike_rides$day_of_week <- ordered(bike_rides$day_of_week, levels = c("Sunday", "Monday",
                                                                     
                  "Tuesday", "Wednesday","Thursday", "Friday", "Saturday"))

bike_rides$month <- ordered(bike_rides$month, levels=c("January","February","March",
                                                       
                  "April","May","June","July","August","September","October","November","December"))

It would really help to have some sample data.

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.