Recursive Autoregressive Time Series Modeling
An auto-regressive model uses $n$ past observations to model the current value of an observed variable
$$\begin{aligned}Y[t]=-\sum_{k=1}^{n}a_kY[t-k]\end{aligned}.$$
In this case, the observed variable, $Y[t]$, is the number of traffic incidents recorded by Austin-Travis County traffic reports and publicly available at the City of Austin open data portal.
A Python script implements a recursive least squares estimator to compute the weights, $a_k$, and then generates a prediction of the numer of incidents for the next day. Instead of re-calculating the weights using the whole dataset at the end of every day, the recursive estimator updates the weights recursively using a forgetting factor so that the weights most closely model the latest conditions and not the conditions from the distant past. This is especially useful when the environment of $Y[t]$ is changing, such as due to a sudden drop in traffic incidents due to COVID-19.