## 4 Data Exploration  
Due to a significant size of data, the purpose of primary analysis was to determine whether there is some scope for the prediction model to be useful. This means whether there are certain differences at all in the achieved speed in each segment, if so, how large are such differences and whether they vary during the course of the day or night. Figure 7 illustrates the morning rush hour on roads in the Czech Republic. The deviation between the average speed and the _FreeFlowSpeed_ (the speed without any restrictions) for each segment is displayed in the highlight scale from green to red. The deeper the red, the greater the difference in the speed in the given segment and the given hour. Many segments in red therefore mean that the speed of passing the segment relied on other factors (e.g., weather, holiday). So, it should be possible to improve the prediction model. For illustrative purposes, differences for the whole day are displayed in Appendix A as an online animation on the map of the Czech Republic. Still, the deeper the red, the bigger changes occurred in the average speed. Such segments were the most interesting for the analysis. Another question was the number of measurements available. Daily aggregations were used for this analysis. Figure 8 shows number of measurements for each individual day in the period from January to June 2020. A lower number of measurements was evident on weekends. At the same time, it was evident that, as of 24 January, a systematic change was made in the means of data collection by the provider as the number of measurements available decreased significantly. The change mainly affected motorways and major road networks (light blue lines at the bottom depicting the individual types of road segments). Next, we looked more closely at difference between the _FreeFlowSpeed_ (as explained in Section 3.1) and average achieved speed. Thus, we obtained the so-called speed difference. The speed difference value of zero means that, on average, on a given day, all vehicles travelled at full speed without any restrictions coming from traffic density or weather. On the other hand, the speed difference value of 10 km/h means that, on average, all vehicles were 10 km/h slower than the theoretically possible speed, i.e., the _FreeFlowSpeed_ for the corresponding road  
Figure 6: Example of detection of invalid values. In this case, data for the entire period from 7 March to 29 June were not used for model learning. segment. Occasionally, it is possible that the speed difference is below the zero. In some cases, drivers were driving faster than the legal speed limit and thus faster than the _FreeFlowSpeed_. This occurred especially during night hours on some road segments. Figure 8: Number of measurement sessions starting from Monday, 6 January to 29 June 2020. Figure 7: Example of 1 h (between 6.00 a.m. to 7.00 a.m.) from the period of rush hour on the roads in the Czech Republic. Figure 9 illustrates the daily aggregate deviation from _FreeFlowSpeed_ in absolute values. The average aggregate deviation from _FreeFlowSpeed_ is marked dark blue. Thin light blue lines illustrate the average daily deviation for the individual types of road segments. The highest differences from the _FreeFlowSpeed_ were visible on motorways, reaching 20 km/h or higher. Other road segments speed differences from the _FreeFlowSpeed_ only reached up to 12 km/h. At the same time, we can see a slightly different behavior from the beginning of the year until approximately 13 February 2020. Figure 10 illustrates the hourly deviation from the _FreeFlowSpeed_. Minor differences were evident on weekdays and the traffic flow was more fluent on weekends (thus, achieved speeds were near the _FreeFlowSpeed_). It is also interesting that generally lower speeds were found on motorways at night, which were likely not caused by traffic density but by more careful driving. Figure 11 illustrates the average hourly deviation expressed relatively to _FreeFlowSpeed_.