I have car accidents data and related weather information. To keep it simple data looks like that:

accident_datetime  |  accident_zip  |  weather_condition (sun|rain|fog|snow)

I want to visualize correlation between number of accidents and weather condition. I would go with average number, let's say when it snows there are twice more accidents then when it sunny, but in this case I will need weather condition data that is not linked to accident. Do I have any options?



1 Answer 1


It sounds to me as though this might be ripe for a Poisson Regression model where your dependent variable is number of accidents (you'd need to summarize your data by counting the number of accidents in each zip and for each weather condition -- I'm assuming the date/time is unimportant to you based on your post) and your independent variables are weather condition and zip (assuming you don't have too many zip codes or that you have enough data for the number of zip codes you want to model). This way, you can determine the effective increase in the average number of accidents for a given weather condition, averaged over all zip codes or for a given zip code. Assuming your data are uncorrelated you could use a regular Poisson regression model here, but depending on the circumstances of your study, independence might not be realistic, especially if you are talking about observations colliding with one another in a small area.

Of course, if you wanted to, you could always augment your existing data with weather data by merging based on zip code and date/time. This might allow you to model some additional weather phenomena at a more detailed level.

  • $\begingroup$ Thanks for your response! Novice is here, could you please elaborate a little bit or give some sample? I am still concerned regarding my data. E.g. yesterday were reported 100 incidents (let's not include zip codes into this equation): 99 - sunny and 1 - rainy. But I don't have data about weather itself, so it could be raining 10 minutes or 2 hours. Is it still possible to get some useful results? Thanks. $\endgroup$
    – Evgeny M
    Commented Jul 17, 2017 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.