lucyparsons / OpenOversight

Police oversight and accountability through public data 👮
https://openoversight.com
GNU General Public License v3.0
240 stars 79 forks source link

Graph/network analysis of department #527

Open redshiftzero opened 6 years ago

redshiftzero commented 6 years ago

Suggested by @dismantl: a nice way to view command structure in a police department would be a visualization that displays a graph of all officers, where each node in a graph is an individual officer, and the edges represent a command relationship.

(this is a good issue for anyone interested in d3.js)

tomx4096 commented 6 years ago

@redshiftzero @dismantl i was working on this but was unsure about where the data would come from (i ended up with the above PR). namely, it could be hard for an outsider to observe and document "officer X reports to Y". can it be in FOIA reports? some departments have the higher ranks listed online (http://assets.lapdonline.org/assets/pdf/new_org_chart.pdf) but not the entire roster hierarchy.

dismantl commented 6 years ago

@tomx4096 yeah I actually got some of that data in a FOIA response for the Baltimore PD roster. Many, but not all, of the officer records list the ID of their supervisor, which could be used to build a partial hierarchy of the department (though unsure how disjointed it would be due to not all officers having this listed). But there currently isn't a data field in OO for a supervisor ID, so that would need to be added, probably to the assignments table I would think.

dismantl commented 6 years ago

@tomx4096 you can take a look at the roster I got for BPD. The column EMPLID shows city employee ID number, and then the Supv ID column indicates the employee ID number of their supervisor, if any. So a graph could potentially be built with that.

tomx4096 commented 6 years ago

@dismantl thanks for the info and roster. i started a 2nd PR (#541 ) for an actual graph visualization

ejfox commented 5 years ago

@tomx4096 @redshiftzero Your PR (https://github.com/lucyparsons/OpenOversight/pull/541) looks awesome to me. Is there any remaining work needed to bring it over? Would love to help bring this feature to the finish line if I can help in any way.

tomx4096 commented 5 years ago

@tomx4096 @redshiftzero Your PR (#541) looks awesome to me. Is there any remaining work needed to bring it over? Would love to help bring this feature to the finish line if I can help in any way.

@ejfox thanks :) it worked fine when I tested it on the Baltimore data, but that was quite some time ago. performance could be much better (it takes more than a few seconds to load the visualization) but I'm not sure how to improve it.

ghost commented 5 years ago

Hey @ejfox for right now, we mostly would like to add some indication to the user that the data is being loaded(some intermediary screen to let the user know that data is being loaded so they aren't kept wondering), and to fix the merge conflicts. If these could be resolved, I think we should approve the PR & worry about performance in another issue/PR