0
Thursday
56
436
324
112
0
Friday
55
442
348
94
0
Saturday
56
580
455
125
1
Sunday
56
333
259
74
To arrange the timetable so that the days of the week are the variables, use the unstack function.
hrAndDayWeek = unstack(byHrDay(:,{'HrOfDay','Day','sum_Total'}),'sum_Total','Day');
head(hrAndDayWeek)
ans=8×8 table
HrOfDay
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
_______
______
______
_______
_________
________
______
________
0
473
202
297
374
436
442
580
1
333
81
147
168
173
183
332
2
198
77
68
93
128
141
254
3
86
41
43
44
50
61
80
4
51
81
117
101
108
80
60
5
105
353
407
419
381
340
128
6
275
1750
1867
2066
1927
1625
351
7
553
5355
5515
5818
5731
4733
704
ribbon(hrAndDayWeek.HrOfDay,hrAndDayWeek{:,2:end})
ylim([0 24])
xlim([0 8])
xticks(1:7)
xticklabels({'Sun','Mon','Tue','Wed','Thu','Fri','Sat'})
ylabel('Hour')
title('Bicycle Count by Hour and Day of Week')
Preprocess and Explore Time-stamped Data Using timetable
10-69
Précédent

- 515/1450

Suivant