-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain_process.py
More file actions
32 lines (26 loc) · 1.74 KB
/
main_process.py
File metadata and controls
32 lines (26 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""
Author: Anastassios Dardas, PhD - Higher Education Specialist, Education & Research Group at Esri Canada
About: The main GTFS-RT process to interpolate and aggregate on-time performance.
Date: Re-modified Q2-2022
"""
from gtfs_process import CheckGTFS, NeedProcess, ExecuteProcess
if __name__ == "__main__":
################################################################################################
################## 2nd Pipeline: Check for any updates with GTFS static files. #################
################## Note: Assumes you are collecting the most recent GTFS-RT Data ###############
################################################################################################
CheckGTFS(main_link="https://transitfeeds.com",
pattern_txt= r".*/p/calgary-transit/238/.*download.*",
hyperlink="https://transitfeeds.com/p/calgary-transit/238",
start_method="spawn",
wkid=4326)
################################################################################################
################## 3rd Pipeline: Identifies which GTFS-RT files need to be processed. ##########
################## Uses the GTFS static files to facilitate interpolation process ##########
################## of the GTFS-RT csv file(s). ##########
################################################################################################
# Check which raw GTFS-RT csv files need processing
csv_inf = NeedProcess(main_folder="../data/0_external/GTFS").csv_inf
testing = ExecuteProcess(csv_inf=csv_inf,
start_method="spawn",
wkid=4326)