noi-techpark / bdp-commons

Open Data Hub time series data collectors (legacy)
GNU Affero General Public License v3.0
2 stars 12 forks source link

Car Pooling Data Collector #552

Closed noctho closed 2 years ago

rcavaliere commented 2 years ago

@dulvui can you please integrate this PR in our testing environment? It's a new Data Collector related to the new car pooling service implemented by ummadum. I have created a task for you: https://github.com/noi-techpark/bdp-commons/pull/552 Let me know if you have time this sprint, otherwise let's go the following one!

dulvui commented 2 years ago

@rcavaliere Yes I have time and will integrate it this afternoon. I'll let you know when its running on testing

dulvui commented 2 years ago

@rcavaliere @noctho This dc gets data from a csv file on a Google Drive. Does this csv file already exist? If it does I need access to the file and the google google-api-service-account.json file to be able to read the file with the dc.

noctho commented 2 years ago

I'll send you the file via mail. You need to create your own Google service account with Google Drive API enabled (if none exists for the project yet) and create the JSON file. The json to my service account is just a test account I created myself to develop the data collector. I am available for instructions if you need them. Unfortunately it was not possible to read the file without an service account, although it is actually publicly accessibile. There are various "hacks" how to read a file directly without the Google Drive API, but after a few request you get an error code that the file is not available.

dulvui commented 2 years ago

I was able to create a simple service account with no special permission and it works perfeclty. The dc is now running in testing and the data is already available here https://mobility.api.opendatahub.testingmachine.eu/v2/flat%2Cnode/CAR_POOLING_TRIP?limit=200&offset=0&shownull=false&distinct=true

rcavaliere commented 2 years ago

@noctho I have checked the DC, I have seen that you didn't put the expected value in the field "name" for the stations. Can you add this and make a new PR? For the rest, everything is OK (as usual). Thanks for your work!

noctho commented 2 years ago

@rcavaliere You are right, the field "name" was not set as specified. I have created PR #555 with the fix.

dulvui commented 2 years ago

@rcavaliere @noctho The fixed PR is now merged and live on testing.