"Every day, 100 Americans are killed with guns and hundreds more are shot and injured. The effects of gun violence extend far beyond these casualties—gun violence shapes the lives of millions of Americans who witness it, know someone who was shot, or live in fear of the next shooting." -EveryTown Research Group (

The Current Process of U.S. Firearm Checks

1) Firearm Buyer: Fills out an ATF Form 4473 with: name, age, address, place of birth, race, citizenship, Social Security (optional), as well as the following questions:

2) Firearm Buyer answers the following questions [five different parameters]: (1) Have you ever been convicted of a felony?, (2) Have you ever been convicted of a misdemeanor crime of domestic violence?, (3) Are you an unlawful user of, or addicted to, marijuana or any other depressant, stimulant, narcotic drug, or any other controlled substance?, (4) Are you a fugitive from justice?, and (5) Have you ever been committed to a mental institution?.

2) Firearm Vendor: Submits the information to law enforcement officials via a toll-free phone line or over the internet, and the agency checks the applicant's info against databases.

3) Law enforcement: Conducts background check with the submitted form (can take minutes). Law enforcement officials will approve or deny a candidates request to purchase a firearm. When is someone Denied the Right to Firearms?: if you are convicted of a crime punishable by imprisonment; if you are convicted of a violent misdemeanor; if you are an addict of any controlled substance; if you are committed to a mental institution; if you are an illegal immigrant; if you are harassing, stalking, or threatening an intimate partner; if you renounced your U.S. citizenship.

What it does

DeepCheck is a modern, accessible, and dynamic machine-learning powered web portal to help law enforcement officials flag candidates and perform more robust background checks.

In conjunction with the current five foundational parameters in background checks (listed in Inspiration section), DeepCheck introduces the concept of utilizing candidates' public social media activity to flag them for further law enforcement investigation. Public social media data should not be used as a determining factor in adjudicating eligibility for firearms possession. Rather, DeepCheck is a proof of concept of how vitriolic social media activity might be discovered using machine intelligence and later evaluated by law enforcement officials to complement or augment accepted background checks.

The current social media application we have decided to utilize is Twitter. DeepCheck gathers a candidates' recent (up to 500) status updates (or tweets), retweets, and favorites. Upon gathering the data, DeepCheck runs a natural language processing algorithm which implements sentiment analysis to spotlight offensive language, hate speech, and any encouragement of violent crime. The purpose of this in-depth analysis is to catch hidden sentiments or motives in individuals who do not have a past history with crime or law enforcement.

DeepCheck also includes an interactive portal for firearm vendors to keep a log of all previous customers which have applied with them, an online ATF application as (opposed to the traditional pen-to-paper), an alerts/help center, and a personalized profile account.

How we built it

We started with Twitter Developer API along with and implemented Python 3 to gather data from a Twitter user. We then used JSON Pretty Print to organize and filter through the gathered data. We utilized Microsoft Azure Machine Learning services in order to create and train our natural language processing model in Python 3. We then created the web application using HTML/CSS, JavaScript, and Bootstrap. Through Microsoft Azure web application services we created a resource group and deployed our application.

Sample of the Jupyter Notebook Here:

Challenges we ran into

While developing DeepCheck we experience three main challenges. The first challenge was at the initial kick-off of our project at the data gathering stage. The Twitter Developer API was difficult to divulge in as the API syntax was complex and it was difficult to decipher which specific parts applied to our project. We discovered which is an easier-to-use Python library for accessing the Twitter API. helped us in understanding the specific functions which would aid us in gathering the specific content from a specific user. We then had to understand JSON to organize the data and utilized JSON Pretty Print to better organize the information between tweets, retweets, and favorites. Our second struggle was working with text data to create accurate machine learning models which "accurately" classify the specific parameters we inputted (hate-speech, offensive language) and then predict a possible result. In order to solve this, we compared other machine learning models on GitHub to understand which factors made which specific impact on the prediction results. This helped us in understanding how to improve our own model from the training stage to the testing stage. Our third challenge and biggest setback was we created the back-end machine learning model using Python 3 and the front-end web application using HTML/CSS and JavaScript. It was difficult to find a host which could help us easily connect our backend and frontend. We eventually discovered how to create web apps using Microsoft Azure and powered our application through their App Services platform.

Accomplishments that we're proud of

Our model has 84% accuracy on the test data!! We are proud of channeling our frustration for lack of gun control into a productive technical project which has the potential to increase the effectiveness of background checks and help reduce the amount of gun violence that occurs from legally purchased firearms.

What we learned

We learned Natural Language Processing for the first-time and dived into the world of data gathering and organization. It was extremely interesting to see the impact of the data's quality on the prediction results the ML model was outputting.

What's next for DeepCheck

We hope that DeepCheck will spread awareness of a flagging system to improve upon the current background check with real-time indications of at-risk candidates. We are deeply saddened by the amount of gun violence that occurs on a daily rate in our country and the innocent civilians who are affected. DeepCheck has the potential to delve into further fields such as training the machine learning model to look for other sentiments such as mood disorders, depression, and suicide risk in order to decrease suicides by gun. Overall the purpose of DeepCheck is to help prevent gun violence in the United States.


Share this project: