Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Tracking bike-share movement over New Year in Zurich (tibaldo.ch)
23 points by replyOnce on Jan 1, 2024 | hide | past | favorite | 5 comments
In Switzerland PubliBike is a popular bike-sharing company. Thanks to its openly accessible API one can extrapolate the movements of these bikes around the cities.

As a Christmas project I decided to collect this publicly available data and visualize the movement of bikes in the city of Zurich. Purple tracks are classic bikes, while blue tracks are electric bikes.

I am not well versed with front-end development so I hope you will excuse the mediocre interface. Happy to take any questions, comments, feedback and thoughts. A good new year to all of you!

GitHub repo: https://github.com/Yoekkul/publibiker



I love the beautiful motion!

> We now take this file and filter the data within such that we only keep entries which fit in the Zurcih area bounding box. After this is done we obtain the road network of the city from Open Street Map. Having this information we can now estimate a shortest path between two stations and take this as a guess for the taken path. As a final step we need to estimate a timestamp for each intersection in the path. This will help us in creating a smooth animation. This process is done by linearly interpolating the time from the start location to the end location, based on the distance.

This is super clever too.

Wonderful job.


Thank you, the smooth animation was only possible thanks to the DeckGL framework. In the past I tried using only MapBox, which resulted in laggy animations. I do enjoy seeing the city "pulsing" with the day/night cycle.


Ah, one of my abandoned projects was doing this sort of tracking for a car-sharing fleet (think car2go, where the car can be left in many parking spaces in the city when terminating the rental), although with cars the route taken is less certain, someone could rent it from a few blocks away from their home (at that point it would disappear from the list of available cars), go to IKEA, and it could end up near their place (reappear in the list) many hours later. Animating this "journey" would make it appear like there's a car going a short distance, very slowly..


I think a good solution for this problem would be to discard all routes where cars take more than twice the expected time. This would result in loosing some legitimate trips (could be stuck in traffic), but by adjusting the threshold this could be alleviated.


Beautiful data visualization!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: