What happens when you mix machine learning, big data and new app-based mobility services?
In the summer of 2019, e-scooter companies started rolling out their device fleet, scattering vehicles all over the city. With a business model not just relying on paying customers, but also on a legion of cheap “Juicers”, people who collect e-scooters to recharge and redistribute them back where they are needed.
Since e-scooters tend to migrate from central locations like train stations or bustling street corners towards less-travelled destinations, vehicle fleets tend to un-balance themselves, requiring frequent manual repositioning of e-scooters towards popular locations.
So, an idea for a demo system was born: What if we dynamically adjust prices to entice customers to move the vehicles towards popular spots, and to discourage unpopular low-revenue locations.
Over the autumn of 2019, I started collecting real-time movement data from the e-scooter companies. The raw data then sent to a Kafka cluster, where a set of Apache Spark instances would churn through the data, extracting movement data. In a second step, a simple machine learning model (using PySpark ML) was trained to predict future rides, and suggest appropriate prices.
Implementing this plan proved to be significantly challenging - it was my first project with Spark, and the movement data was noisy and often affected by GPS glitches, requiring heuristic movement calculations. Nevertheless, I succeeded in building a functional demo.
While the project was a success, it is unlikely to be used in production. Other demand-based pricing models (like Uber’s surge pricing) attract significant criticism, and it remained unclear whether the demand could be steered enough to affect fleet revenue potentials.