Inspiration
Analisa's mom and godmother were the inspiration behind this project. News articles were sent daily to her phone to watch out for reckless drivers, shootings, and other crime worthy reports. Image if everyone had these updates - specifically tailored to your location (as Analisa's family did for her).
Diem and Analisa thought about making safety accessible to everyone by utilizing open data to promote safety by warning locals about crime in the area. Imagine an application that would make open crime data useful by tailoring it to the user.
What it does
We use local news reports on crime to narrow down latitude and longitude values to determine a five mile "danger zone". If a user of the application enters the five mile radius (danger zone) - a message will be sent to their phone notifying them details about the crime (specifically shootings) and the any information on the suspect.
How we built it
We used python, chatgpt's API, json files, twilio's API, google map's API, javascript, html, and flask to bring safetysafeme to life!
We used pre-scraped text files and fed that into a function that utilized chatgpt to pull out relevant pieces of the article (headline, date, time, longitude, latitude, summary, and url) and pass that to a json function (ideally to be uploaded into a database). That data would then be compared with a user's geolocation - if a user entered a 5 mile radius of the crime, twilio would then send a text to the user about the headline, date/time, short summary, and link to url about the crime that occured in the nearby area.
Challenges we ran into
MongoDB hated us. There were so many great tutorials online, but getting atlas up and running was a time pit... We spent wayyy too much time (6 hours) trying to upload a single json file into our cloud.
Getting the geolocation in html, and then trying to translate that to python is awful.
Accomplishments that we're proud of
We learned how to implemented APIs into our program! Both Diem and Analisa had NEVER used APIs, so it was a bit of a learning curve, but it was definitely worth the outcome.
What we learned
Hackathon Lessons Learned: *Go in with a general plan *Be open to step outside your comfort zone and try something new *Working in small pieces and putting the final project together is 100% the way to do it (don't spend more than 2 hours stuck on something - switch to another piece if possible)
What's next for Safetysafeme
Ideally, we would like to build a bot to monitor the crime section of local news to pull the data - rather than scraping it ourselves.
Right now we focused on shootings specifically since they would be the most relevant to our "Danger zone", but we would like to expand our notification and pulled data to other types of crime (robberies, assaults, etc.).
We also built this in mind as being a mobile application, but due to limited time, hands, and experience - we felt getting the other pieces running (and talking to each other) was crucial to our working prototype - rather than the mobile front end. We could still send messages, just not have a pretty front side.
Built With
- chatgpt's-api
- flask
- google-map's-api
- html
- javascript
- json-files
- python
- twilio's-api
Log in or sign up for Devpost to join the conversation.