Inspiration
Bike theft is a common issue at UCSD, with many students getting their bikes stolen, disrupting lives and costing people hundreds of dollars each. In fact one of our own group members had their bike stolen, which is part of what inspired this project.
What it does
Our project takes data from UCPD police logs and maps areas on campus with high amounts of bike theft. We label the map with location markers, based on number of incidents, type of vehicle stolen, and date/time occurred.
How we built it
We built this project in several stages.
In the first stage we downloaded 60 days worth of UCPD crime logs which were all in the form of PDFs. We designed a program that parsed these PDFs into txt files, which we then used to convert to a CSV database containing all crimes. Then we filtered specifically for vehicle theft, looking for keywords such as "bike" or "scooter", and labeled the theft based on vehicle stolen, as well as collecting location and time information that was contained within the UCPD crime logs. We stored this data in a CSV file which is hosted on Google Sheets.
In the next stage, we implemented a front-end using Next.js and React that mapped the data we had onto an image of the UCSD campus, which allowed us to map data visually and correspond each data to a physical location on campus on our image.
Challenges we ran into
We ran into several challenges. Firstly, when parsing PDFs, we found that the PDFs had inconsistencies and lack of labels which made it hard to parse. To address this, we used innovative solutions, such as a counter to keep track of lines that repeat that have no label, and string splitting to ensure that we only received data and not the labels alongside it.
What we learned
We learned about the very complex world of parsing PDFs, and ways to address pdf parsing using Python's Pandas library, as well as ways to parse files using counters and keyword searching.
We also learned that we could use Google Sheets to host a database that could be used to update a webpage.
Accomplishments
- Parsed through 60 Days of UCPD logs to find instances of bike/scooter theft on UCSD campus and affiliate areas, and stored in a Google Sheets database.
- Built a frontend with a UCSD Map Image that shows locations where vehicles are stolen, types of vehicles, and date/time that theft occurred.
What's next for Pedal Pirates
We want to crowdsource information from more people who've had their bikes stolen to add to our database and maps to have more up-to-date and real-time information about the areas with the highest concentrations of bicycle and other vehicle theft, by sharing on social media platforms and around the UCSD student body.
Log in or sign up for Devpost to join the conversation.