Open elma13 opened 1 year ago
samanapir::GetSamenMetenAPIinfoMuni("599")
INFO [2022-10-07 14:51:15] GetSamenMetenAPIinfo: Get data from url: https://api-samenmeten.rivm.nl/v1.0/Things?$filter=(properties/codegemeente%20eq'599')&$expand=Locations,D
atastreams
TRACE [2022-10-07 14:51:15] GetAPIDataframe: Getting url https://api-samenmeten.rivm.nl/v1.0/Things?$filter=(properties/codegemeente%20eq'599')&$expand=Locations,Datastreams
TRACE [2022-10-07 14:51:16] GetAPIDataframe: Getting url, got result 200
DEBUG [2022-10-07 14:51:16] GetSamenMetenAPIinfo: Data received from https://api-samenmeten.rivm.nl/v1.0/Things?$filter=(properties/codegemeente%20eq'599')&$expand=Locations,
Datastreams
TRACE [2022-10-07 14:51:18] GetSamenMetenAPIinfo: getting next page ...
INFO [2022-10-07 14:51:18] GetSamenMetenAPIinfo: Get data from url: https://api-samenmeten.rivm.nl/v1.0/Things?$filter=%28properties%2Fcodegemeente+eq%27599%27%29&$expand=Loc
ations%2CDatastreams&$top=200&$skip=200
TRACE [2022-10-07 14:51:18] GetAPIDataframe: Getting url https://api-samenmeten.rivm.nl/v1.0/Things?$filter=%28properties%2Fcodegemeente+eq%27599%27%29&$expand=Locations%2CDa
tastreams&$top=200&$skip=200
TRACE [2022-10-07 14:51:18] GetAPIDataframe: Getting url, got result 200
DEBUG [2022-10-07 14:51:18] GetSamenMetenAPIinfo: Data received from https://api-samenmeten.rivm.nl/v1.0/Things?$filter=%28properties%2Fcodegemeente+eq%27599%27%29&$expand=Lo
cations%2CDatastreams&$top=200&$skip=200
Error in names(datastream_list) <- kit_id_overview :
'names' attribute [400] must be the same length as the vector [200]
This happens when a project or municipality has many sensors. For small municipalities there is no problem.
project <- "Hollandse Luchten" info_hl <- samanapir::GetSamenMetenAPIinfoProject(project)INFO [2023-03-14 15:19:04] Get data from url: https://api-samenmeten.rivm.nl/v1.0/Things?$filter=(properties/project%20eq'Hollandse%20Luchten')&$expand=Locations,Datastreams INFO [2023-03-14 15:19:05] Data received from: https://api-samenmeten.rivm.nl/v1.0/Things?$filter=(properties/project%20eq'Hollandse%20Luchten')&$expand=Locations,Datastreams INFO [2023-03-14 15:19:09] Get data from url: https://api-samenmeten.rivm.nl/v1.0/Things?$filter=%28properties%2Fproject+eq%27Hollandse+Luchten%27%29&$expand=Locations%2CDatastreams&$top=200&$skip=200 INFO [2023-03-14 15:19:09] Data received from: https://api-samenmeten.rivm.nl/v1.0/Things?$filter=%28properties%2Fproject+eq%27Hollandse+Luchten%27%29&$expand=Locations%2CDatastreams&$top=200&$skip=200 Error in names(datastream_list) <- kit_id_overview : 'names' attribute [400] must be the same length as the vector [200]