Hacker conference rC3: Optimizing bike sharing through data analysis


In Marburg, the bike-sharing provider Nextbike operates 37 fixed rental stations with around 230 bikes. That’s not very many for a city with around 76,000 inhabitants, around 25,000 of whom are students. As one of them, Martin Lellep was annoyed that he could not find a rentable means of transport when he urgently needed one to get to a bus, for example. So he built a program with a web scraper to collect, save and analyze data from Nextbike bikes.

The relevant programming interface (API) from Nextbike had already been recreated by the open data activist Constantin Müller, alias ubahnverleih, using reverse engineering and published for iOS on its Github page – together with many other data access points for sharing providers from all over the world. Lellep queried this every 30 seconds between March and December 2020 and June and December 2021, as he explained on Wednesday at the virtual hacker meeting rC3 (remote Chaos Communication Congress). To do this, he wrote a simple Extract-Transform-Load-Pipeline (ETL) and analysis code in Python in order to be able to process the total of over a million collected data points on his home server.

A lot of data is generated in bike sharing. Martin Lellep examined a provider in Marburg and, among other things, highlighted the advantages of cycling. There are many interactive graphs on his research on his blog.

(Photo: blog entry by Martin Lellep, there is additional material and interactive graphics)

All rental bikes in Marburg have a unique ID. Among other things, Lellep created an interactive map with the Nextbike stations and the average number of bikes parked there. It turned out that most of the rental locations were in the center. The largest offer was at the main station, while at the smaller Südbahnhof all bikes were often sold out.

The physicist, who is currently doing research in England for his doctoral thesis, also had a histogram generated for the usage time over the individual hours of the weekdays. The greatest demand was therefore on Monday lunchtime and afternoon. On other weekdays, too, it was prime time at noon and in the early evening around 6 p.m. On Saturdays, bikes were in great demand from 1 p.m. until evening. In the middle of the week the situation was relatively relaxed, and on Friday morning it was particularly easy to get a bike. At the main train station, the probability of finding a bike was generally high. At the university student council for economics, on the other hand, the racks were 70 percent empty throughout the day. In general, according to Lellep, it is advisable to avoid smaller stations as far as possible.

So that city planners for cycling can also draw conclusions from the data, the researcher built a matrix and network graphic with the transitions of the bikes from one station to the other with around 1400 entries and over 3000 potential connection options. This shows that a rented utensil is often returned to the same place. This mainly applies to stations in the outdoor area, which appear to be quite isolated. The most popular route, driven over 2000 times, led from the main train station to Ginseldorfer Weg in the north. According to Lellep, it is therefore a good idea to expand the cycling infrastructure there and on other heavily used routes.

The total distance covered with 207,000 trips in the 15 months examined was 322,658 kilometers, explained the data analyst. This route extends “several times around the world”. The users would have consumed 8.6 million calories, which corresponds to the content of thousands of Nutella glasses, and saved 40,332 kilograms of CO₂ and 25,813 liters of fuel worth almost 34,000 euros. The rate of use of the bikes is highest in summer. In the overlapping months of the two years included, the number of parked bikes this year has increased compared to 2020, which may be related to more home office in pandemic times.

With machine learning, quite precise predictions for available wheels at individual stations are now also possible, reported Lellep. He has set up a corresponding project here together with the AstA Marburg. In general, the analyzes showed that the quality of life of the residents and bike-sharing fans of the Hessian city could be improved “at moderate costs”.


(ps)

To home page



Source link -64