En cherchant à récupérer des données Vélib pour d'autres villes que Paris, je suis tombé sur ce site : bikes.oobrien qui recense toutes les stations de vélo de toutes les villes du monde.
J'ai fini par implémenté une classe au module pyensae qui récupère les données pour les villes équipées par la société JC Decaux. Peut-être ajouterais-je d'autres sociétés comme Keolis qui gère Rennes avec vélo STAR. Un exemple de code est disponible ici.
During summer, one pleasure is to go to work by bike. Simple option is to take a Velib but most of the time, the closest Velib station is empty. The same thing happens when you leave your work to go back home. No bike is available.
I thought maybe this could be used to draw a map of Paris showing areas where people work. I thought about looking at the distribution of the number of available bikes over a day. I already mentioned that the Velib data was available (see Les stations Vélib à Paris un jeudi soir). Next figure shows it for a couple of stations and one of them is clearly a working station: bikes arrive in the morning and disappear at the end of the working day (it was taken a couple of weeks ago during a week day).
The number of available bikes was measured every five minutes. Knowing that every station does not have the same number of spots, I normalized the previous curve by the sum. I then considered the sum between 10am and 4pm. So for each station, I built the following indicator:
I used the information to draw a map of Paris with the Velib stations. If I(s) > 0.25 , I used a red flag and a green otherwise.
Basically, companies offices are located in the center of Paris (districts with one digit) and around the Seine, people live around (districts with two digits). It also shows there are some business areas just outside Paris like Issy-Les-Moulineaux (where I work). You can play with the final result below. It uses OpenStreetMap and OpenLayers.
Les données Vélib sont ouvertes (depuis peu) et on peut disposer de l'état des stations (vélos et places disponibles) au moment où accède au service. J'ai collecté les données pendant plusieurs consécutives. Elles ressemblent à celles qui suivent.
address | available bike stands | available bikes | banking | bike stands | bonus | last update | lat | lng | name | number | status |
3 AVENUE BOSQUET - 75007 PARIS | 57 | 12 | 0 | 69 | 0 | 2013-05-09 22:58:47 | 48.8616404995762 | 2.30225034417595 | 07022 - PONT DE L'ALMA | 7022 | OPEN |
18 RUE MARIE ANDREE LAGROUA - 75013 PARIS | 52 | 7 | 0 | 61 | 0 | 2013-05-09 22:53:34 | 48.8285952838574 | 2.38022060626611 | 13055 - LAGROUA | 13055 | OPEN |
25 RUE LOUIS LE GRAND - 75002 PARIS | 12 | 19 | 0 | 31 | 0 | 2013-05-09 22:55:38 | 48.8705089372039 | 2.33405446193933 | 02015 - OPERA - CAPUCINES | 2015 | OPEN |
2 RUE DE LA REPUBLIQUE - 92170 VANVES | 0 | 25 | 0 | 25 | 0 | 2013-05-09 23:01:03 | 48.8217026998931 | 2.28539562482839 | 21704 - REPUBLIQUE (VANVES) | 21704 | OPEN |
96 RUE DE LAGNY - 93100 MONTREUIL | 20 | 4 | 0 | 27 | 0 | 2013-05-09 22:55:21 | 48.8492303008648 | 2.42142994000703 | 31001 - LAGNY (MONTREUIL) | 31001 | OPEN |
Je me suis aperçu que l'état des stations est mis à jour de façon désynchronisée. A priori à chaque fois qu'un vélo arrive ou part et régulièrement toutes les dix minutes. Projeté sur un graphe, cela donne l'image suivante et pour voir l'animation, il suffit de cliquer sur le lien.