Imagine this: You have a meeting with a client in the city center, and since it's a cold and rainy Monday morning, you decide to go by car.
After twenty minutes of slowly and carefully driving through the streets of Leuven in search of a place to park near your destination, you finally find the perfect parking spot.
You have a feeling this is going to be a long meeting, so you have no choice but to pay a whopping eight euros for the maximum of four hours of parking.
Sound familiar?
Good. Because this scene describes some of the issues we've tried to tackle during the Raccoons Hackathon.
For our first issue, we contacted Stad Leuven to see whether they had any open parking data available. We knew they have parking data because of the signs all around the Ring, but couldn't find any of this data on the website.
Their response to our request was the following:
Unfortunately, we have a confidentiality clause with the parking operators stating that the city is not allowed to share the data from the parking guidance system with third parties. We looked at whether it would be possible to only share the data from our own car parks with you, but the system is not currently equipped to share information about separate car parks, which means that we cannot get it right in time.
Alas, no luck there, so for the purpose of this hackathon, we went and used Stad Gent's open parking availability data instead.
We set up an App Engine deployment that polled this endpoint with real-time JSON data every minute for about a month, and stored it in a MongoDB Atlas database (the cool folks at MongoDB provide a free tier of their DBaaS product).
By the time the hackathon started, we had gathered over 32.000 data points which we used to create a predictive model of how many available parking spaces each parking would have at a certain point in time in the future.
Now that we'd gathered the data, we were ready to start building our prediction model using state-of-the-art AI algorithms... Except for the small fact that we didn't have anyone on our team who knew how to do so.
And that's where Google's AutoML service came in!
You might recognise the name from the famous victory Google Deepmind achieved against Lee Sedol in the ancient Chinese game of Go with their AlphaGo algorithm.
Well, with their recently released AutoML Tables service, they've made it possible to load a tabular dataset, tweak a few parameters, and BAM: you've got yourself a powerful, production-ready AI model! Or in our case: an AI model ready for a coffee-and-sleep-deprivation-fueled demo at the end of a 24h coding spree.
The loaded data looked like this in the AutoML interface:
The cool thing with AutoML is that you can deploy your newly trained model immediately and just use the API to predict new values. So we were able to directly integrate with our AI model during the hackathon without having to worry about its deployment. Neato!
What did we do with it, I hear you ask? We built a chatbot to interact with the model, because we believed that just being able to ask your digital assistant whether there would be a parking space available at some point in the future would be a killer feature. That interaction might look a little like this:
Cool, right?
And that's how you do AI without knowing how to do AI!
In the app we built during the hackathon, we displayed our resulting real-time data in a list of parkings sorted by distance, we color-coded parkings by availablity, and we sprinkled in a little Waze integration for good measure.
A simple app or webpage like this could potentially save many thousands of people thousands of hours of driving around in the city in search of a parking space, consequently improving air quality in and around the city and preventing dozens of accidents with cyclists from happening each year.
For our second issue, we decided to try and find out exactly how difficult it would be to print our own pay-and-display parking tickets. (Spoiler: It's really easy.)
For the tickets themselves, we walked through the city and pressed the green button on just about every parking meter we encountered to get those sweet free fifteen-minute parking tickets. This quickly got us a big enough stack of parking tickets to extract just the ticket's background, as well as every number, a colon, a slash, a comma, a euro sign and the letters "P" and "A": enough to hack together our own tickets.
As stated in the "Data" section above, we already had most of the information we needed to display on our tickets:
So we wrote a script that took a maximum number of hours (two or four) and a parking meter ID and generated a ticket that, when printed, looked nearly indistinguishable from a real ticket:
To print our homemade tickets, we bought a smartphone printer with thermal paper of about the same size as a parking ticket.
We tweaked the resolution a little, and PRESTO! We had printed our own seemingly genuine pay-and-display parking tickets!
We merged all of this into another page of our app, which allowed us to print a ticket on the go, based on a user's current location.
With the printer having cost us € 129 and the special thermal paper for each ticket approximately 50 cents, if every parking ticket could potentially save you € 7,50 (by paying 50 cents instead of € 8), you'd have reached your break-even point after a mere 18 fake tickets!
Additionally, if every person in Leuven (with a population of a little over one hundred thousand inhabitants) were to print and use only a single fake parking ticket, this would cost the city a whopping € 7.500.000 (and make for an amazing clickbait title)!
Luckily we have ethics, but how could the city stop bad people from doing the same?
One solution would be to force people to buy mobile parking tickets. They would be forced to enter their license plate, which could serve as a unique ID for their parking ticket.
Except for one small thing: not everybody has a (smart)phone. The city therefore cannot force people to pay for parking through SMS services such as 4411, as this would be discrimination against people who may not be able to afford or operate mobile devices.
A much more sensible solution would be to keep the current physical parking meters in addition to mobile parking tickets, but making people enter their license plate number. This approach is already used in other cities (such as Mechelen).
Here's a quick video of what printing a fake ticket might hypothetically look like:
Hypothetically printing a fake pay-and-display parking ticket.
Written by
Hannah Patronoudis
Want to know more?