bar(byHr{:,{'mean_Westbound','mean_Eastbound'}})
legend('Westbound','Eastbound','Location','eastoutside')
xlabel('Hour of Day')
ylabel('Bicycle Count')
title('Mean Bicycle Count by Hour of Day')
There are traffic spikes at the typical commute hours, around 9:00 a.m. and 5:00 p.m. Also, the trends
between the Eastbound and Westbound directions are different. In general, the Westbound direction
is toward residential areas surrounding the Cambridge area and toward the Universities. The
Eastbound direction is toward Boston.
The traffic is heavier later in the day in the Westbound direction compared to the Eastbound
direction. This might indicate university schedules and traffic due to restaurants in the area. Examine
the trend by day of week as well as hour of day.
byHrDay = varfun(@sum,bikeData,'GroupingVariables',{'HrOfDay','Day'},...
'OutputFormat','table');
head(byHrDay)
ans=8×6 table
HrOfDay
Day
GroupCount
sum_Total
sum_Westbound
sum_Eastbound
_______
_________
__________
_________
_____________
_____________
0
Sunday
56
473
345
128
0
Monday
55
202
145
57
0
Tuesday
55
297
213
84
0
Wednesday
56
374
286
88
10 Timetables
10-68
legend('Westbound','Eastbound','Location','eastoutside')
xlabel('Hour of Day')
ylabel('Bicycle Count')
title('Mean Bicycle Count by Hour of Day')
There are traffic spikes at the typical commute hours, around 9:00 a.m. and 5:00 p.m. Also, the trends
between the Eastbound and Westbound directions are different. In general, the Westbound direction
is toward residential areas surrounding the Cambridge area and toward the Universities. The
Eastbound direction is toward Boston.
The traffic is heavier later in the day in the Westbound direction compared to the Eastbound
direction. This might indicate university schedules and traffic due to restaurants in the area. Examine
the trend by day of week as well as hour of day.
byHrDay = varfun(@sum,bikeData,'GroupingVariables',{'HrOfDay','Day'},...
'OutputFormat','table');
head(byHrDay)
ans=8×6 table
HrOfDay
Day
GroupCount
sum_Total
sum_Westbound
sum_Eastbound
_______
_________
__________
_________
_____________
_____________
0
Sunday
56
473
345
128
0
Monday
55
202
145
57
0
Tuesday
55
297
213
84
0
Wednesday
56
374
286
88
10 Timetables
10-68
