Thanks for helping me out I’m willing to agree that basic understanding is better before getting into deep or to large datasets. I have google and found differnet tutorials but none really helped. So if yoy find anything strange and have the time for teaching me what I’m missing I will be glad. And I really like stremalined soulutions and my trys doesn’t seem to be anywhere close to that becaus the cpu fan is about to reach the moon.
To me it looks like the .txt file is valid .csv data(I don’t know if file suffix is crucial) my public transportation opendata feed is in GTFS format and filenames is .txt in the download process, but for todays_traffic I filter a period of traffic down to a specific date 2023-01-04 in my test envirionment. I would need to find all rows in stop_times.txt that contains trip_id key values from todays_trips.csv and choose wich data I will have on one row in one file per trip_trip id in todays_trips.csv Just to make sure that that jpourney is valid for that specific date. Later on I’m going to add on realtime updates for changes or cancellations. That process will be quite equal to this if I save data to a file or if I could find a method for working wit that data on the fly.
example data in todays_trips.csv
trip_id,operating_day_date,dated_vehicle_journey_gid,journey_number
55700000068603293,20230104,9015005000200001,1
55700000068603314,20230104,9015005000200003,3
55700000068603349,20230104,9015005000200011,11
55700000068603668,20230104,9015005000200013,13
55700000068603703,20230104,9015005000200015,15
55700000068603738,20230104,9015005000200017,17
55700000068603773,20230104,9015005000200019,19
55700000068603808,20230104,9015005000200021,21
55700000068603843,20230104,9015005000200023,23
55700000068605173,20230104,9015005000200025,25
55700000068605208,20230104,9015005000200027,27
55700000068605243,20230104,9015005000200029,29
55700000068605278,20230104,9015005000200031,31
55700000068605313,20230104,9015005000200033,33
55700000068605348,20230104,9015005000200035,35
55700000068605383,20230104,9015005000200037,37
55700000068605418,20230104,9015005000200039,39
55700000068605453,20230104,9015005000200041,41
55700000068605488,20230104,9015005000200043,43
55700000068605523,20230104,9015005000200045,45
55700000068605558,20230104,9015005000200047,47
55700000068605593,20230104,9015005000200115,115
55700000068605628,20230104,9015005000200117,117
55700000068605663,20230104,9015005000200119,119
example data in stop_time.txt
trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_type,shape_dist_traveled,timepoint
55700000068603293,04:43:00,04:43:00,9022005081011017,1,Kvarnberget,3,1,0,1
55700000068603293,04:45:00,04:45:00,9022005000003016,2,Kvarnberget,3,3,494.27,1
55700000068603293,04:46:18,04:46:18,9022005001012016,3,Kvarnberget,3,3,931.86,0
55700000068603293,04:47:07,04:47:07,9022005001014016,4,Kvarnberget,3,3,1202.64,0
55700000068603293,04:48:55,04:48:55,9022005001129016,5,Kvarnberget,3,3,1807.93,0
55700000068603293,04:49:42,04:49:42,9022005001130016,6,Kvarnberget,3,3,2067.69,0
55700000068603293,04:50:53,04:50:53,9022005001095016,7,Kvarnberget,3,3,2465.14,0
55700000068603293,04:52:05,04:52:05,9022005000021016,8,Kvarnberget,3,3,2866.46,0
55700000068603293,04:53:28,04:53:28,9022005001096016,9,Kvarnberget,3,3,3331.45,0
55700000068603293,04:54:58,04:54:58,9022005001098016,10,Kvarnberget,3,3,3834.38,0
55700000068603293,04:55:54,04:55:54,9022005001099016,11,Kvarnberget,3,3,4145.4,0
55700000068603293,04:57:46,04:57:46,9022005000022016,12,Kvarnberget,3,3,4770.88,0
55700000068603293,05:01:00,05:01:00,9022005000023018,13,Kvarnberget,1,3,5320.68,1
55700000068603314,04:58:00,04:58:00,9022005081011017,1,Kvarnberget,3,1,0,1
55700000068603314,05:00:00,05:00:00,9022005000003016,2,Kvarnberget,3,3,494.27,1
55700000068603314,05:01:18,05:01:18,9022005001012016,3,Kvarnberget,3,3,931.86,0
55700000068603314,05:02:07,05:02:07,9022005001014016,4,Kvarnberget,3,3,1202.64,0
55700000068603314,05:03:55,05:03:55,9022005001129016,5,Kvarnberget,3,3,1807.93,0
55700000068603314,05:04:42,05:04:42,9022005001130016,6,Kvarnberget,3,3,2067.69,0
55700000068603314,05:05:53,05:05:53,9022005001095016,7,Kvarnberget,3,3,2465.14,0
55700000068603314,05:07:05,05:07:05,9022005000021016,8,Kvarnberget,3,3,2866.46,0
55700000068603314,05:08:28,05:08:28,9022005001096016,9,Kvarnberget,3,3,3331.45,0
55700000068603314,05:09:58,05:09:58,9022005001098016,10,Kvarnberget,3,3,3834.38,0
55700000068603314,05:10:54,05:10:54,9022005001099016,11,Kvarnberget,3,3,4145.4,0
55700000068603314,05:12:46,05:12:46,9022005000022016,12,Kvarnberget,3,3,4770.88,0