4) Correlation between arrival and departure times
arrival_departure_correlation <-cor(as.numeric(df$Arrival_Time), as.numeric(df$Departure_Time))print(paste("Correlation between Arrival and Departure times:", round(arrival_departure_correlation, 2)))
[1] "Correlation between Arrival and Departure times: -0.21"
5) Plot the data with peak time and line of best fit
ggplot(df, aes(x = Arrival_Time, y = Duration_Minutes)) +geom_point(aes(color = Duration_Minutes, size = Duration_Minutes), alpha =0.7) +# Aesthetic: color and sizegeom_smooth(method ="lm", linetype ="dashed", color ="red", se =FALSE) +# Add a regression line (best fit)geom_vline(xintercept =as.POSIXct(peak_time), linetype ="dotted", color ="purple", size =1.2) +# Peak time linescale_color_gradient(low ="blue", high ="red") +# Color gradient for better visualslabs(title ="Excalibur Meeting Attendance Duration",subtitle =paste("Peak meeting time:", format(peak_time, "%I:%M %p"), "| Correlation:", round(arrival_departure_correlation, 2)),x ="Arrival Time",y ="Duration (Minutes)",color ="Duration (Minutes)") +theme_minimal() +theme(plot.title =element_text(hjust =0.5))
Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.
`geom_smooth()` using formula = 'y ~ x'
Data Summary
In this chart, I analyzed when people arrived at the meeting and how long they stayed. This chart is a sample of Oct. 4 attendees, showing a preview of what I will observe in the following meetings for planning purposes.
Key Observation A slight negative trend shows that people who arrived later tended to leave earlier. For example, those who came around 10:30 AM stayed longer, while those arriving closer to noon left sooner. The red dashed line shows this pattern, but it’s not very strong—just something to keep in mind.
Peak Meeting Time The purple dotted line marks 12:30 PM, which is when most people were present at the meeting.
Who stayed the longest? The bigger and redder the bubble, the longer someone stayed. People who arrived earlier (around 10:30 AM) tended to stay longer, while those arriving closer to noon stayed for much less time.
Why this matters
Understanding these patterns can help us plan our future meetings better. If we know that late arrivals leave earlier, we can make important announcements earlier in the meeting so more people are there to hear them.
Future Considerations
By tracking this data, we can see if people tend to arrive and leave at similar times or if their attendance patterns vary. This will help us understand who is more punctual and actively participating in the meetings, allowing us to plan meetings more effectively and ensure key discussions happen when the majority of engaged attendees are present.