You can find the deployed project at Human Rights First Police Use-of-Force Dashboard.
The Human Rights First Organization is a US-based nonprofit, nonpartisan organization concerned with international human rights. At its forefront, American ideals, universal values. For nearly 40 years, HRF has Challenged the status quo highlighting the global struggle for human rights and stepping in to demand reform accountability and justice. Given four weeks, create a full functioning Stack web application capable of visually demonstrating valid, current, and the uniquely reported incidence of police use of force within the United States. The information will help users, such as journalists and passersby, formulate their perspectives on current matters. The exemplary user interface immediately captures attention with the clusters of incidence shown by Geotagging. Investigate A creative methodology to eliminate excessive duplicates of data that maintains optimal storage capacity.
Jason Long | Dondré Jordan | Santiago Berniz | Mariapaula Trujillo |
---|---|---|---|
TPL | Data Scientist | Data Scientist | Web Developer |
|
|
|
|
Nic Lehman | Khwanchai-Phaipha | Idong Essien |
---|---|---|
Web Developer/Back End | Web Developer | Web Developer |
|
|
|
Front End Dashboard | Data Science API | Back End API |
Human Rights First Back End | Human Rights First Data Science | Human Rights First Front end | Gitflow
Our team is developing an interactive map that identifies potential instances of police use of force across the United States of America for Human Rights First, an independent advocacy and action organization.
We're pulling data from similiar APIs(All locations V2 - https://raw.githubusercontent.com/2020PB/police-brutality/data_build/all-locations-v2.json, 846- https://api.846policebrutality.com/api/incidents) and from Twitter and Reddit. We want to identify aggregate these instances.
- User can browse incident map
- User can view specific instances with original source links
- User can view map with various filters
In order for the app to function correctly, the user must set up their own environment variables. There should be a .env file containing the following:
* DBURLS - Postgres database credentials
* APIURL - APIURL is responsible for updating the database
Image Filename | Source / Creator | License |
---|---|---|
Nopic.yet | INSERT NAME | [MIT](input githandle here) |
We used Docker for ease of use when dealing with environmental dependancies
Get AWS credentials
Get your AWS access keys
Install AWS Command Line Interface
* aws configure -> configures AWS CLI
* pip install pipx -> installs pipx
* pipx install awsebcli -> installs AWS Elastic BeanStalk CLI
Follow AWS EB docs: Use Docker to build the image locally, test it locally, then push it to Docker Hub
* docker build -f project/Dockerfile -t YOUR-DOCKER-HUB-ID/YOUR-IMAGE-NAME ./project
* docker login
* docker push YOUR-DOCKER-HUB-ID/YOUR-IMAGE-NAME
Edit the image name in Dockerrun.aws.json then replace YOUR-DOCKER-HUB-ID/YOUR-IMAGE-NAME with your values
Then use the EB CLI:
* git add --all
* git commit -m "Your commit message"
* eb init -p docker YOUR-APP-NAME --region us-east-1
* eb create YOUR-APP-NAME
* eb open
Then use AWS Route 53 to set up a domain name with HTTPS for your DS API
Redeploy:
* git commit ...
* docker build ...
* docker push ...
* eb deploy
* eb open
- Python
- Docker
- FastAPI
- AWS Elastic Beanstalk
- PostgreSQL
- Wanted to gain insight to AWS
- Docker makes environments easier
- FastAPI has been gaining traction over Flask
- SQL queries are better structured
- Pandas
- Seaborn
- spacy
- nltk
- PRAW
- Plotly
- spacy
- newspaper3k
- psycopg2
We are sending json objects to the backend with information about instances of police use of force. This information includes location data (city, state, and latitude and longitude) and relevant details about the incident, like the type of force that was used.
Get and clean data from source(s). Insert processed data into the database. Data Science API recieve GET request from back end API. Send the data to the back end API for new information to be added to web database. The front end requests data from the back end and that data is serve to the map component and the dashboard. If use requests to sign-up/login, user is sent to the OKTA Identity Provider for authentification.
/getdata: Shows all the data in the database.
/getdata?date_added=yyyy-mm-dd: Optional parameter, to filter data from the given date(yyyy-mm-dd) and onward. For example, /getdata?date_added=2020-11-19.
- A system neeeds to be implemented for input validations and testing.
- The automatic 24-hour update needs to be activated and tested for new data.
If you are having an issue with the existing project code, please submit a bug report under the following guidelines:
- Check first to see if your issue has already been reported.
- Check to see if the issue has recently been fixed by attempting to reproduce the issue using the latest master branch in the repository.
- Create a live example of the problem.
- Submit a detailed bug report including your environment & browser, steps to reproduce the issue, actual and expected outcomes, where you believe the issue is originating from, and any potential solutions you have considered.
- A filter on the dashboard to distinguish public approval of police use of force using NLP to create a sentiment analysis.
- Add a predict route to receive input data from a user to classify a type of use of force, as defined by the National Institute of Justice: Police Use-of-Force Continuum.
Santiago and Dondre' on slack.
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct. Please follow it in all your interactions with the project.
Describe what you have changed in this repo as a team Provide examples and descriptions of components, how props are handled, where to find these changes, database tables, models, etc.
We would love to hear from you about new features which would improve this app and further the aims of our project. Please provide as much detail and information as possible to show us why you think your new feature should be implemented.
If you have developed a patch, bug fix, or new feature that would improve this app, please submit a pull request. It is best to communicate your ideas with the developers first before investing a great deal of time into a pull request to ensure that it will mesh smoothly with the project.
Remember that this project is licensed under the MIT license, and by submitting a pull request, you agree that your work will be, too.
- Ensure any install or build dependencies are removed before the end of the layer when doing a build.
- Update the README.md with details of changes to the interface, including new plist variables, exposed ports, useful file locations and container parameters.
- Ensure that your code conforms to our existing code conventions and test coverage.
- Include the relevant issue number, if applicable.
- You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
These contribution guidelines have been adapted from this good-Contributing.md-template.
See Backend Documentation for details on the backend of our project.