pybikes
pybikes copied to clipboard
id, extra.uuid
Currently id outputs an... md5 of the pair lat / lng. That's not an id, that's a hash (could be useful to identify uniqueness or to run a search, as this hash would be related to an id). Now, ids should not be inferable, given a set of data (let's say, lat and lng), a hash should.
Extra.uuid currently gives (when available) the "official" system id of an station. That's also not an uuid, but more of an internal_id, official_id, shitty_id, or even, just number.
So, work to do: generate uuids for the id, move the current id to a hash field, and rename extra.uuid to extra.number.
Example station extract from velib:
{
"empty_slots": 0,
"extra": {
"address": "RUE DES CHAMPEAUX (PRES DE LA GARE ROUTIERE) - 93170 BAGNOLET",
"banking": true,
"bonus": true,
"last_update": 1402065351000,
"slots": 50,
"status": "CLOSED",
"uid": 31705
},
"free_bikes": 0,
"id": "c58b7351e4f8546e91f548487789d215",
"latitude": 48.8645278209514,
"longitude": 2.416170724425901,
"name": "31705 - CHAMPEAUX (BAGNOLET)",
"timestamp": "2014-06-06T14:37:42.766Z"
}