Accounting for previous events to model and predict traffic accidents at the road segment level: a study in Valencia (Spain)