## Inspiration

Imagine a world where the number of mass shootings in the U.S. per year don't align with the number of days. With the recent Thousand Oaks shooting, we wanted to make something that would accurately predict the probability that a place has a mass shooting given a zipcode and future date.

## What it does

When you type in a zipcode, the corresponding city is queried in the prediction results of our neural network in order to get a probability. This probability is scaled accordingly and represented as a red circle of varying size on our U.S. map. We also made a donation link that takes in credit card information and processes it.

## How we built it

We trained our neural network with datasets on gun violence in various cities. We did a ton of dataset cleaning in order to find just what we needed, and trained our network using scikit-learn. We also used the stdlib api in order to pass data around so that the input zipcode could be sent to the right place, and we also used the Stripe api to handle credit card donation transactions. We used d3.js and other external topological javascript libraries in order to create a map of the U.S. that could be decorated. We then put it all together with some javascript, HTML and CSS.

## Challenges we ran into

We had lots of challenges with this project. d3.js was hard to jump right into, as it is such a huge library that correlates data with visualization. Cleaning the data was challenging as well, because people tend not to think twice before throwing data into a big csv. Sending data around files without the usage of a server was challenging, and we managed to bypass that with the stdlib api.

## Accomplishments that we're proud of

A trained neural network that predicts the probability of a mass shooting given a zipcode. A beautiful topological map of the United States in d3. Integration of microservices through APIs we had never used before.

## What we learned

Doing new things is hard, but ultimately worthwhile!

## What's next for Ceasefire

We will be working on a better, real-time mapping of mass shootings data. We will also need to improve our neural network by tidying up our data more.
## Inspiration

We hear stories about crimes happening around us everyday. It's especially terrifying since we're students and we just want to enjoy our college experience. While discussing ideas to hack, we realized this problem **resonated with all of us**. We immediately realized that we need to work on this.

## What it does

It gives you and your loved ones a chance to take your safety into your own hands. By using our application, you are taking control of the most important thing you have, your life. It generates the safest and shortest path from Location A to Location B.

## How we built it

We analyzed large data sets of crime over the past 10 years, picked up representative points after weighing them based on relevance and severity of crime. We then created a data anaytics flow (that can be easily repeated with new data) to glean more useful insights from the raw data. To help analyze the data further we plotted the data on Virtual Reality to look at data spreads and densities. This processed data was than pushed into our MongoDB database hosted on MLab. We then used these generalized clusters to see which areas we should avoid while routing using the Wrld and OSRM API's. From here our app generates a single route off of all the information based on what our algorithm devises to be the "safest route" for the user. This route is then plotted and displayed for the users convenience.

## Challenges we ran into

We started out with millions of cells of data, which made it really hard to work with. We had to filter out the most relevant data first and convert the data into a completely new format to optimize it for our path finding algorithm. In addition, we had to optimize our MongoDB to work well with our data as we made frequent queries to a database with originally over a million elements. In, addition, we constantly had issues mixing up latitude and longitude values as well as making HTTP requests for many APIs.

## Accomplishments that we're proud of

We are happy that we were able to create a minimum viable product in this short duration. We're especially glad it's not just a "weekend-only" idea and it is something we can continue to make better. This idea is something we hope in the future can be something that truly has a social impact and can actually make the world a safer place.

## What we learned

* Wrld/OSRM API
* Node/Express/MongoDB
-HTTP Requests/Callback functions
-Unity VR sdk
-Pandas/Numpy
* Coordinating team efforts in different parts of the Application

## What's next for SafeWorld

Using real time data to better predictions for real life incidents (protests). In addition, having more global data sets would be a optimal next step to get it working in more cities. This would be expedited by our adaptable framework for data generation and pathing.
## Inspiration

Toronto being one of the busiest cities in the world, is faced with tremendous amounts of traffic, whether it is pedestrians, commuters, bikers or drivers. With this comes an increased risk of crashes, and accidents, making methods of safe travel an ever-pressing issue, not only for those in Toronto, but for all people living in Metropolitan areas. This led us to explore possible solutions to such a problem, as we believe that all accidents should be tackled proactively, emphasizing on prevention rather than attempting to better deal with the after effects. Hence, we devised an innovative solution for this problem, which at its core is utilizing machine learning to predict routes/streets that are likely to be dangerous, and advises you on which route to take wherever you want to go.

## What it does

Leveraging AI technology, RouteSafer provides safer alternatives to Google Map routes and aims to reduce automotive collisions in cities. Using machine learning algorithms such as k-nearest neighbours, RouteSafer analyzes over 20 years of collision data and uses over 11 parameters to make an intelligent estimate about the safety of a route, and ensure the user arrives safe.

## How I built it

The path to implement RouteSafer starts with developing rough architecture that shows different modules of the project being independently built and at the same time being able to interact with each other in an efficient way. We divided the project into 3 different segments of UI, Backend and AI handled by Sherley, Shane & Hanz and Tanvir respectively.

The product leverages extensive API usage for different and diverse purposes including Google map API, AWS API and Kaggle API. Technologies involve React.js for front end, Flask for web services and Python for Machine Learning along with AWS to deploy it on the cloud.

The dataset ‘KSI’ was downloaded from Kaggle and has records from 2014 to 2018 on major accidents that took place in the city of Toronto. The dataset required a good amount of preprocessing because of its inconsistency, the techniques involving OneHotEncoder, Dimensionality reduction, Filling null or None values and also data featuring. This made sure that the data is consistent for all future challenges.

The Machine Learning usage gives the project a smart way to solve our problem, the use of K-Means clustering gave our dataset the feature to extract the risk level while driving on a particular street. The Google API feature retrieves different routes and the model helps to give it a risk feature hence making your travel route even safer.

## Challenges I ran into

One of the first challenges that we ran into as a team was learning how to properly integrate the Google Maps API polyline, and accurately converting the compressed string into numerical values expressing longitudes and latitudes. We finally solved this first challenge through lots of research, and even more stackoverflow searches :)

Furthermore, another challenge we ran into was the implementation/construction of our machine learning based REST API, as there were many different parts/models that we had to "glue" together, whether it was through http POST and GET requests, or some other form of communication protocol.

We faced many challenges throughout these two days, but we were able to push through thanks to the help of the mentors and lots of caffeine!

## Accomplishments that I'm proud of

The thing that we were most proud of was the fact that we reached all of our initial expectations, and beyond with regards to the product build. At the end of the two days we were left with a deployable product, that had gone through end to end testing and was ready for production. Given the limited time for development, we were very pleased with our performance and the resulting project we built. We were especially proud when we tested the service, and found that the results matched our intuition.

## What I learned

Working on RouteSafer has helped each one of us gain soft skills and technical skills. Some of us had no prior experience with technologies on our stack and working together helped to share the knowledge like the use of React.js and Machine Learning. The guidance provided through HackThe6ix gave us all insights to the big and great world of cloud computing with two of the world's largest cloud computing service onsite at the hackathon. Apart from technical skills, leveraging the skill of team work and communication was something we all benefitted from, and something we will definitely need in the future.

## What's next for RouteSafer

Moving forward we see RouteSafer expanding to other large cities like New York, Boston, and Vancouver. Car accidents are a pressing issue in all metropolitan areas, and we want RouteSafer there to prevent them. If one day RouteSafer could be fully integrated into Google Maps, and could be provided on any global route, our goal would be achieved.

In addition, we aim to expand our coverage by using Google Places data alongside collision data collected by various police forces. Google Places data will further enhance our model and allow us to better serve our customers.

Finally, we see RouteSafer partnering with a number of large insurance companies that would like to use the service to better protect their customers, provide lower premiums, and cut costs on claims. Partnering with a large insurance company would also give RouteSafer the ability to train and vastly improve its model.

To summarize, we want RouteSafer to grow and keep drivers safe across the Globe!