insight-lane / crash-model

Build a crash prediction modeling application that leverages multiple data sources to generate a set of dynamic predictions we can use to identify potential trouble spots and direct timely safety interventions.
https://insightlane.org
MIT License
112 stars 40 forks source link

Cache snapped segment id for the points-based features #178

Closed j-t-t closed 5 years ago

j-t-t commented 5 years ago

Since the parking tickets dataset is pretty large, it takes several minutes to snap to segments. This change does the snapping and writes to file if the --forceupdate flag is passed, otherwise, it reads from the file.

I also updated standardize_point_data.py to skip points that don't have a latitude and longitude.

codecov[bot] commented 5 years ago

Codecov Report

Merging #178 into master will increase coverage by 1.9%. The diff coverage is 85.71%.

@@           Coverage Diff            @@
##           master    #178     +/-   ##
========================================
+ Coverage    40.6%   42.5%   +1.9%     
========================================
  Files          26      26             
  Lines        2724    2736     +12     
========================================
+ Hits         1106    1163     +57     
+ Misses       1618    1573     -45