You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using 'siri_ride_journey_ref' as a unique identifier of a "trip" in the df of all locations in one day (2022-03-06) that I created... however, I found that many siri records (75,852 of 4,718,821 ) have 'siri_ride_journey_ref' == " 2022-03-06-0" - so not unique
to collect all locations for one day, I loop through all route_id s and make the following request :
(the below is for route_id = '1877' because it is one of the route_IDs that have 'siri_ride_journey_ref' == " 2022-03-06-0" in the response)
I tried using 'siri_ride_journey_ref' as a unique identifier of a "trip" in the df of all locations in one day (2022-03-06) that I created... however, I found that many siri records (75,852 of 4,718,821 ) have 'siri_ride_journey_ref' == " 2022-03-06-0" - so not unique
to collect all locations for one day, I loop through all route_id s and make the following request :
(the below is for route_id = '1877' because it is one of the route_IDs that have 'siri_ride_journey_ref' == " 2022-03-06-0" in the response)
route_id = '1877'
rt_date = '20220306'
date_yyyy = int(rt_date[0:4])
date_mm = int(rt_date[4:6])
date_dd = int(rt_date[6:])
siri_vehicle_locations_df = pd.DataFrame(stride.iterate('/siri_vehicle_locations/list', {
'siri_routes__line_ref': route_id,
'siri_rides__schedualed_start_time_from': datetime.datetime(date_yyyy, date_mm, date_dd, tzinfo=tz.gettz('Israel')),
'siri_rides__schedualed_start_time_to': datetime.datetime(date_yyyy, date_mm, date_dd, tzinfo=tz.gettz('Israel'))+datetime.timedelta(days=1),
'order_by': 'recorded_at_time desc',
'limit': -1
}, limit=50000))
print(siri_vehicle_locations_df )
The text was updated successfully, but these errors were encountered: