pietercolpaert / Blue-Bike-to-Linked-GBFS

MIT License
2 stars 3 forks source link

versioning of some Stations faulty #18

Open bblfish opened 2 years ago

bblfish commented 2 years ago

I noticed that there are a number of stations where the versioning is wrong, because the same URL will point to different versions of the same data

For example in 20220314T144749.ttl the station 180 data is:

<https://blue-bike.be/stations/180#> a <https://w3id.org/gbfs#Station>;
  <http://purl.org/dc/terms/isVersionOf> <https://blue-bike.be/stations/180>;
  <http://schema.org/name> "Halte Bourget - NAVO";
  <http://www.w3.org/2003/01/geo/wgs84_pos#latitude> "50.878262000000"^^<http://www.w3.org/2001/XMLSchema#float>;
  <http://www.w3.org/2003/01/geo/wgs84_pos#longitude> "4.432225000000"^^<http://www.w3.org/2001/XMLSchema#float>;
  <https://w3id.org/gbfs#bikes_available> 8;
  <https://w3id.org/gbfs#docks_in_use> 0 .

But in the 20220520T174250.ttl

<https://blue-bike.be/stations/180#> a <https://w3id.org/gbfs#Station>;
  <http://purl.org/dc/terms/isVersionOf> <https://blue-bike.be/stations/180>;
  <http://schema.org/name> "Halte Bourget - NAVO";
  <http://www.w3.org/2003/01/geo/wgs84_pos#latitude> "50.878262000000"^^<http://www.w3.org/2001/XMLSchema#float>;
  <http://www.w3.org/2003/01/geo/wgs84_pos#longitude> "4.432225000000"^^<http://www.w3.org/2001/XMLSchema#float>;
  <https://w3id.org/gbfs#bikes_available> 2;
  <https://w3id.org/gbfs#docks_in_use> 0 .

If those two graphs get merged then we'd end up with

<https://blue-bike.be/stations/180#> a gbfs:Station;
  gbfs:bikes_available 2;
  gbfs:bikes_available 8;
  gbfs:docks_in_use 0 .

This is because the original json data for 180 has a null last_seen value:

    {
        "id": 180,
        "type": 2,
        "name": "Halte Bourget - NAVO",
        "latitude": "50.878262000000",
        "longitude": "4.432225000000",
        "bikes_available": 8,
        "bikes_in_use": 0,
        "last_seen": null
    }

It may be that any type 2 station has this problem?