Translate

Friday, April 5, 2019

WSP Collision Data for WM County 01/01/2017 - 04/01/2019


These are stats from the WSP Collision Analysis Tool. The query interface at https://fortress.wa.gov/wsp/collisionanalysistool generates an amazing amount of information on collisions in the state of WA. Some of the address and locations needs some consolidation for cross table output. This data is for WM County from 01/01/2017 - 04/01/2019. I leave the rdata.table commands in place for some of these queries. The WSP Collision Analysis Tool generates a ton of good data. Some in simple and also a more advanced option. It's not perfect and requites some munging. It's just better data than any other motor vehicle trauma and collision interface I have seen. I like this data because I get the real feel when working with it of an officer filling out data on site. I think for this reason, the advanced data interface could be curated and aggregated for productive machine learning routines. This is under construction as of 4/5/2019 and I will be particularly working on this post.  These tables are best not viewed on a cell phone.


CrashSummary1[,.N,.(InjurySeverity)][order(-N)]
             InjurySeverity    N
1:      No Injury Collision 4964
2:   Minor Injury Collision 1681
3: Unknown Injury Collision  385
4: Serious Injury Collision  103
5:          Fatal Collision   41



By Agency

                  Agency NA FALSE TRUE
1:          State Patrol  1  1929  165
2: Other Law Enforcement  0    49    7
3: Municipal/City Police  0  3119  476
4:        County Sheriff  0  1244  171
5:                        0    12    1

             InjurySeverity NoLocation Bellingham Blaine Everson Ferndale Lynden Nooksack Sumas
1:      No Injury Collision         24       3362    271     166      639    371       56    75
2:   Minor Injury Collision          9       1152    101      61      191    123       13    31
3: Unknown Injury Collision          1        229     26      19       65     29        4    12
4: Serious Injury Collision          2         71      6       0       14      4        1     5
5:          Fatal Collision          1         23      6       0        5      2        3     1

For the 'involved'  transport fields, note that all types can be involved with each other. So ,for example, a convoluted three way cross factor table could be formatted as below  to show all transport type relationships if necessary:

CrashSummary1[,.N,.(MotorVehiclesInvolved,PedalcyclistsInvolved,PedestriansInvolved)][,dcast(.SD,MotorVehiclesInvolved+PedalcyclistsInvolved ~ PedestriansInvolved,value.var="N",fun.aggregate=sum)]

    MotorVehiclesInvolved PedalcyclistsInvolved    0   1 2 3 N
 1:                     1                     0 1966 133 4 1 0
 2:                     1                     1  101   0 0 0 0
 3:                     1                     2    1   0 0 0 0
 4:                     2                     0 4431   4 1 2 0
 5:                     2                     1    1   0 0 0 0
 6:                     3                     0  455   1 1 0 0
 7:                     4                     0   46   0 0 0 0
 8:                     5                     0   14   0 0 0 0
 9:                     6                     0    3   1 0 0 0
10:                     7                     0    2   1 0 0 0
11:                     8                     0    1   0 0 0 0
12:                     N                     0    0   0 0 0 2
13:                     N                     N    0   0 0 0 1
14:                     Y                     0    0   0 0 0 1


More simply, below are the individual categories ("Motor","Pedalcyclist","Pedestrian") by respective number of  those transport types involved. The response of "N" I will leave undefined. I take it to possibly mean "none".

CrashSummary1[,.N,.(MotorVehiclesInvolved)][order(-N)]
    MotorVehiclesInvolved    N
 1:                     2 4439
 2:                     1 2206
 3:                     3  457
 4:                     4   46
 5:                     5   14
 6:                     6    4
 7:                     N    3
 8:                     7    3
 9:                     8    1
10:                     Y    1

CrashSummary1[,.N,.(PedalcyclistsInvolved)][order(-N)]
   PedalcyclistsInvolved    N
1:                     0 7070
2:                     1  102
3:                     N    1
4:                     2    1

CrashSummary1[,.N,.(PedestriansInvolved)][order(-N)]
   PedestriansInvolved    N
1:                   0 7021
2:                   1  140
3:                   2    6
4:                   N    4
5:                   3    3

The records here for the top 50 "PrimaryTrafficway" fields are not unique  (e.g. "SR 539", "SR-539") so primary collision locations duplicate in this type of list. I found 26 different referents to I5 in a sample so I did my best to rename the field  "I5" (Interstate 5). See Appendix 1 for more information.

       PrimaryTrafficway    N
  1:                  I5 1114
  2:         MERIDIAN ST  316
  3:              SR 542  209
  4:              SR 539  166
  5:          LAKEWAY DR  146
  6:      W BAKERVIEW RD  142
  7:         HANNEGAN RD  136
  8:             MAIN ST  131
  9:         E SUNSET DR  118
 10:            JAMES ST  105
 11: BIRCH BAY LYNDEN RD  105
 12:                SR 9   83
 13:          N STATE ST   73
 14:           WOBURN ST   67
 15:             IOWA ST   58
 16:          E SMITH RD   57
 17:           SLATER RD   55
 18:      E BAKERVIEW RD   51
 19:              SR 544   51
 20:          PORTAL WAY   50
 21:          ALABAMA ST   49
 22:   EVERSON GOSHEN RD   49
 23:              SR 548   45
 24:          SAMISH WAY   44
 25:          LINCOLN ST   43
 26:       E CHESTNUT ST   43
 27:       NORTHWEST AVE   39
 28:        NORTHWEST AV   39
 29:        BARKLEY BLVD   38
 30:        CORDATA PKWY   37
 31:          W HOLLY ST   34
 32:          E HOLLY ST   34
 33:          ORLEANS ST   34
 34:  BILL MCDONALD PKWY   33
 35:            ELLIS ST   33
 36:        TELEGRAPH RD   30
 37:        MT BAKER HWY   30
 38:   GUIDE MERIDIAN RD   30
 39:   LAKE WHATCOM BLVD   29
 40:              SR 546   29
 41:        CORNWALL AVE   28
 42:              SR 547   28
 43:             OHIO ST   27
 44:         N FOREST ST   26
 45:              BAY RD   26
 46:        NORTHWEST DR   26
 47:         MAIN STREET   26
 48:            VISTA DR   25
 49:       SOUTH PASS RD   24
 50:         N GARDEN ST   22

By Address Block

                   BLK    N
 1:                 I5 1104
 2:             SR 542  194
 3:             SR 539  146
 4:               SR 9   72
 5:   3900 MERIDIAN ST   51
 6:   3800 MERIDIAN ST   46
 7:             SR 548   43
 8:             SR 544   41
 9:       1700 MAIN ST   33
10:   4100 MERIDIAN ST   28
11:             SR 546   27
12:   4000 MERIDIAN ST   26
13:   4200 MERIDIAN ST   25
14:             SR 547   24
15:   4400 MERIDIAN ST   21
16:       2000 MAIN ST   21
17: 100 W BAKERVIEW RD   19
18:     800 LAKEWAY DR   18
19:   1200 E SUNSET DR   17
20:   1000 E SUNSET DR   17

These are "I5" (Interstate 5) secondaries (e.g "cross streets" of accident):

    Primary Secondary       City  N
 1:      I5    IOWA S Bellingham 91
 2:      I5    SUNSET Bellingham 80
 3:      I5    SR 542 Bellingham 78
 4:      I5    LAKEWA Bellingham 64
 5:      I5    SR 539 Bellingham 58
 6:      I5    SAMISH Bellingham 51
 7:      I5    BAKERV Bellingham 48
 8:      I5    MAIN S   Ferndale 44
 9:      I5    PORTAL   Ferndale 38
10:      I5    MERIDI Bellingham 37
11:      I5     SR 11 Bellingham 35
12:      I5    NORTHW Bellingham 33
13:      I5    GRANDV   Ferndale 30
14:      I5    NULLE  Bellingham 30
15:      I5    SLATER Bellingham 26
16:      I5    OHIO S Bellingham 24
17:      I5    N LAKE Bellingham 22
18:      I5    SLATER   Ferndale 20
19:      I5    PEACE      Blaine 17
20:      I5    BIRCH      Blaine 17


By Object Struck

CrashSummary1[,.N,.(ObjectStruck)][order(-N)][1:20]
                     ObjectStruck    N
 1:                               5105
 2:                     Guardrail  187
 3:                  Utility Pole  164
 4:                 Roadway Ditch  161
 5:           Earth Bank or Ledge  144
 6:                 Tree or Stump  130
 7:                         Fence   99
 8:       Concrete/Jersey Barrier   64
 9:               Metal Sign Post   57
10:                          DEER   46
11:                      Building   46
12: Misc Object or Debris on Road   45
13:                          None   41
14:                       Mailbox   37
15:                Wood Sign Post   34
16:                 CABLE BARRIER   33
17:                         Ditch   32
18:                          Deer   29
19:                          NONE   29
20:                          none   27


These are primary streets vs cross streets or secondary intersection:

Meridian as Primary:

     Secondary MERIDIAN
 1: TELEGRAPH        52
 2: E BELLIS F       20
 3: E BAKERVIE       17
 4: KELLOGG RD       17
 5:  STUART RD       17
 6:                  16
 7: BAKERVIEW        13
 8: E STUART R       13
 9:  MCLEOD RD       13
10: WESTERLY R       12
11: BELLIS FAI       11
12: W BAKERVIE       11
13:          5       10
14:  HORTON RD       10
15: BIRCH BAY         9
16:   FRONT ST        9
17: BIRCHWOOD         8
18:        I-5        7
19: FRONT STRE        6
20: W STUART R        6

Bakerview as Primary:

     Secondary BAKERVIEW
 1: NORTHWEST         38
 2: MERIDIAN S        35
 3: W MAPLEWOO        16
 4: CORDATA PK        15
 5:  ELIZA AVE        11
 6:   JAMES ST        11
 7: HANNEGAN R        10
 8:                    8
 9:   ELIZA AV         8
10: ARCTIC WAY         7
11:  DEEMER RD         7
12:  ARCTIC AV         6
13: BENNETT DR         6
14: ARCTIC AVE         4
15:  ARCTIC WY         4
16:        I-5         4
17: PALISADE W         4
18:  ARTIC AVE         3
19:        I 5         3
20:         I5         3


Lakeway as Primary:

Secondary        LAKEWAY
 1: LINCOLN ST      32
 2:    KING ST      16
 3:   BIRCH ST       8
 4: CLEARBROOK       8
 5: HUMBOLDT S       7
 6: KENOYER DR       6
 7: ELECTRIC A       5
 8:   JAMES ST       5
 9: ORLEANS ST       5
10:   PUGET ST       5
11:     YEW ST       5
12:                  4
13:  TOLEDO ST       4
14:  WOBURN ST       4
15: LOWELL AVE       3
16:  NEVADA ST       3
17: ORIENTAL A       3
18: PARKING LO       3
19:  RACINE ST       3
20:    LISA LN       2


Injury Severity

CrashSummary1[,.N,.(InjurySeverity)][order(-N)]

             InjurySeverity    0  1 2 3 N
1:          Fatal Collision   32  9 0 0 0
2:   Minor Injury Collision 1575 97 6 1 2
3:      No Injury Collision 4952 10 0 0 2
4: Serious Injury Collision   77 24 0 2 0
5: Unknown Injury Collision  385  0 0 0 0


             InjurySeverity OneMotor TwoMotor ThreeMotor FourMotor FiveMotor SixMotor SevenMotor EightMotor
1:      No Injury Collision     1361     3289        270        30         8        1          3          0
2:   Minor Injury Collision      564      925        165        16         5        3          0          1
3: Unknown Injury Collision      190      178         16         0         1        0          0          0
4: Serious Injury Collision       61       38          4         0         0        0          0          0
5:          Fatal Collision       30        9          2         0         0        0          0          0


             InjurySeverity OnePed TwoPed ThreePed
1:   Minor Injury Collision     97      6        1
2: Serious Injury Collision     24      0        2
3:      No Injury Collision     10      0        0
4:          Fatal Collision      9      0        0
5: Unknown Injury Collision      0      0        0

             InjurySeverity OneBike TwoBike
1:   Minor Injury Collision      78       1
2:      No Injury Collision      13       0
3: Serious Injury Collision       9       0
4:          Fatal Collision       2       0
5: Unknown Injury Collision       0       0

             InjurySeverity V1 Bellingham Blaine Everson Ferndale Lynden Nooksack Sumas
1:      No Injury Collision 24       3362    271     166      639    371       56    75
2:   Minor Injury Collision  9       1152    101      61      191    123       13    31
3: Unknown Injury Collision  1        229     26      19       65     29        4    12
4: Serious Injury Collision  2         71      6       0       14      4        1     5
5:          Fatal Collision  1         23      6       0        5      2        3     1


Intersection Related

   IntersectionRelated OneMotor TwoMotor ThreeMotor FourMotor FiveMotor SixMotor SevenMotor EightMotor
1:                   N     1788     2736        353        42        13        3          2          1
2:                   Y      418     1703        104         4         1        1          1          0


   IntersectionRelated OnePed TwoPed ThreePed
1:                   N     73      1        2
2:                   Y     67      5        1


   IntersectionRelated OneBike TwoBike
1:                   Y      52       0
2:                   N      50       1

Appendix 1

Fields in default WSP Collision Data.
CollisionReportNumber     "2256049"               
CollisionDate             "1/23/2017 9:37"        
County                    "Whatcom"               
City                      "Ferndale"              
Jurisdiction              "County Road"           
Agency                    "Other Law Enforcement" 
PrimaryTrafficway         "LUMMI SHORE RD"        
SecondaryTrafficway       "SCOTT RD"              
BlockNumber               "3500"                  
MilePost                  NA                      
SchoolZone                "N"                     
IntersectionRelated       "N"                     
WeatherCondition          "Clear or Partly Cloudy"
LightingCondition         "Daylight"              
InjurySeverity            "Minor Injury Collision"
CollisionType             NA                      
ObjectStruck              ""                      
DamageThresholdMet        "Y"                     
HitandRun                 "N"                     
MotorVehiclesInvolved     "1"                     
PassengersInvolved        "N"                     
CommercialCarrierInvolved "N"                     
SchoolBusInvolved         "N"                     
PedestriansInvolved       "0"                     
PedalcyclistsInvolved     "0"       


Appendix 2

Interstate 5 referents in the WSP Collision data base. Code was written to aggregate of these aliases as many as possible to "I5"

"I-5",           
"I-5 NORTH",    
"I-5 NORTHBOUND", 
"I-5 SOUTH",     
" I  5",
"I  5",         
"I 5",
"I5I",          
"I 5 ON RAMP",
"I 5 ONRAMP",
"I5 ONRAMP", 
"I 5 RAMP",
"N5",
"N 5",      
"I5",           
"I5 OFF-RAMP",   
"I5 OFFRAMP",
" I5 OFFRAMP",    
"I5 ONRAMP",
"I 5 RAMP",
"INTERSTATE 5",     
"NB I-5",       
"NB I 5",        
"NB I5",         
"NORTHBOUND I 5",
"ONRAMP S5",
"S5",
"SB I 5",        
"SB I5",
"SB 5",        
"SB I5 ONRAMP",
"S/B INTERSTATE 5",  
"SOUTHBOUND I-5",
"SOUTHBOUND I5"

No comments: