
Predicting the number of cyclists and pedestrians
In some places in Tallinn, there are sensor that count the number of cyclists and pedestrians. One of such sensors is in Pirita. Using the data from the sensor I tried to predict the number of cyclists and pedestrians based on weather data.
The data from the sensors was kindly provided by Tallinn City Government upon my request. Of course, we cannot assume the data is 100% accurate because there are a number of external factors that can mess up the numbers. Nevertheless, it's still worth digging into it.
I used the data from a sensor in Pirita, combined it with the weather data and performed a regression analysis to see which weather metrics affect the number of cyclists and pedestrians the most.
It turned out that the factors affecting the number of cyclists the most are temperature, wind (m/s) and the hours of sunlight in a day (equation below). So for example, if the temperature increase by 1 degree or there was one extra hour of sunlight per day, that would mean an increase in the number of cyclists by 18.5 and 19.1 respectively. An extra m/s of wind would decrease the number of cyclists by 22.5. Precipitation (mm) and humidity (%) don't have that big effects.
So for example, on April 25, the average temperature was 3.5 degrees, wind speed 3.7 m/s, humidity 58%, precipitation 0mm and hours of sunlight 13.1 h. Based on these metrics we can expect that there were about 333 cyclists in Pirita that day.
For the pedestrians, the most influential factors are wind (m/s) and sunlight (h). Temperature and humidity have less effect. Precipitation didn't have a significant effect at all so it was excluded altogether.
Based on the parameters mentioned above, on April 25 there were about 267 pedestrians.