bayesimpact / bridge-uof Goto Github PK
View Code? Open in Web Editor NEWPolice use of force reporting app, developed in collaboration with California DoJ.
Home Page: https://www.bayesimpact.org
License: Other
Police use of force reporting app, developed in collaboration with California DoJ.
Home Page: https://www.bayesimpact.org
License: Other
Ideally we would perform automated backups every day just in case.
At the very least, we should backup the DB before running any migrations on prod, because migrations are a relatively untested feature and could potentially mess things up.
When incidents are bulk uploaded, the sub-models (screener, general_info, involved_civilian, involved_officer) do not have a field linking back to the incident (incident_ids
) that should be there (and is there in manually created incidents). It seems that mostly this doesn't matter, but in one case it does. Since general_info's "incident_id" is delegated to its linked incident, on the review page, incident id does not show up for these incidents. To reproduce:
The grey text is pretty light and hard to read, especially on a bright monitor. I'd suggest making it darker black
Right now we're giving 1 read capacity unit and 1 write capacity unit to each table. This is not enough for most tables!
Use db_capacity_spec
as a guideline for how much capacity is needed for each table.
I tried to upload an old test.json file by accident, which still had the sworn_type
field for officers. The app correctly threw an error to that effect and did not create the incidents. However, under the hood, it DID create dangling screener, general_info, and involved_civilian objects.
If the incident has the "occured on a K-12 campus" box checked, then for every CIVILIAN, ask a mandatory multiple choice question:
"Since this incident happened on a K-12 campus, was this civilian:
( ) A student
( ) A school employee
( ) Neither"
Tried creating an instance, but I forgot to do steps 3 and 4 of installation:
3.
cp data/ori.csv.example data/ori.csv
4.
docker-compose build data
docker-compose run data
When I built the instance and ran it, the app splash page (for example) loaded fine. When I went to the dashboard, I got an "Ooops" page. The app's logs showed:
NameError (uninitialized constant Constants::CONTRACTING_ORIS):
app/models/user.rb:77:in `contracting_oris'
app/models/user.rb:81:in `allowed_oris'
app/queries/get_all_incidents_query.rb:10:in `perform_query'
app/queries/query.rb:6:in `run'
app/queries/dashboard_incidents_query.rb:8:in `perform_query'
app/queries/query.rb:6:in `run'
app/controllers/incidents_controller.rb:155:in `set_incidents'
It took me some head scratching to figure this out. Instead, there should be an initializer function that throws a fit when the app boots, with an informative message, and the app should never start.
When "submit to state" is clicked, pop up a modal (or direct to another page) with several optional questions:
For example, a user can state in the screener that an officer was hurt, but then say they weren't hurt in subsequent pages.
Exactly how comprehensive this validation is and how it is to be implemented is open-ended.
It has been determined that either thru direct entry or thru the bulk upload process it is possible to end up with duplicate records in file.
There needs to be a way to not allow this to happen.
Probably something simple with url changes, but the little icons don't load. Console shows:
Failed to load resource: the server responded with a status of 404 (Not Found) https://demo-ursus.bayesimpact.org/assets/fbi-bw-large.png
We should try to only push changes to prod (especially ones requiring a DB migrations) during some kind of maintenance window, to prevent state from getting messed up in any way.
How this maintenance mode is implemented is pretty open-ended. There could be an environment variable for it, or a flag inside the DB itself, or a pre-configured schedule.
"You (or another administrator) have reviewed and approved these incidents. It will be included in your annual state submission. You may still edit and make changes if necessary."
should read "They will be included"
Now that we have a way to backup dynamodb (#47), we should have regular (daily?) backups of our production DB.
In the long run, it would also be good to port the backup/restore code from the iPython notebook into rake tasks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.