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

Incorporate adjacency information into segment-level data #224

Open bpben opened 5 years ago

bpben commented 5 years ago

We should include information about adjoining segments in with segment-level information, likely at the creation of intersection and non-intersection jsons. This empowers use to use that adjacency information in other stages. We don't have anything built out at the moment that would consume this data, but it's likely this type of spatial information is really important.

@j-t-t , assigning this to you, but @terryf82 , not sure if this alters data standards significantly?

terryf82 commented 5 years ago

@bpben it will change it, whether that change is significant depends on what we want to add. Either way it sounds like a worthwhile extension so I have no problem changing the standard.

What does a given segment need to include about its adjoining segments to be useful?

j-t-t commented 5 years ago

It would be fairly straightforward to add a list of segment ids that are connected with each segment id. Is that helpful on its own, or would we need to start representing the set of segments as a graph in order to take advantage of this?

bpben commented 5 years ago

Seems like there's three options here:

1) Your idea, Jenny, just a list of segment_ids that are connected, which would just require some manipulation after to create an adjacency graph. 2) Including the original segment ID from the source map, which would basically be the same as 1, as I see it 3) Some kind of stored graph structure

I'd say 1 or 2 makes the most sense, though I guess it is dependent on what kind of spatial features we want to generate. For now, I was just thinking something simple like the number of connections, direction of connections, etc.