-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
56 lines (45 loc) · 1.62 KB
/
main.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import process_inputs.fips_counties as fc
import process_inputs.cbsa_fips_mapping as cbsa
import process_inputs.fips_place_cbsa as fpc
import process_inputs.airports as air
import process_inputs.build_nodes as bn
import process_inputs.jhu as jhu
import process_inputs.adjacency_edges as adje
import process_inputs.flight_edges as fled
import process_outputs.process_outputs as po
from classes.node import Node
from classes.fips import Fips
from classes.cbsa import Cbsa
from classes.airport import Airport
# 01 - fips_counties.py
# first: read in a complete list of all FIPS in the US - there are 3,235 in this file
fc.build_fips()
# 02 - cbsa_fips_mapping.py
# next map each fips to a CBSA, if it exists
cbsa.build_CBSA_maps()
# 3 - fips_place_cbsa
# used for associating an airport to a county
# returns a lookup for place_cbsa["place name"] -> [fips_code, cbsa_code]
place_cbsa = fpc.build_fips_maps()
# 4 - airports
# link airports to CBSAs and FIPS
airports = air.process_airports(place_cbsa)
del place_cbsa
# 5 - construct Nodes by CBSA for counties that have them, or by FIPS for those without
bn.process_fips_for_nodes()
# 6 - process JHU daily files into weekly reports
# may optionally pass in start and end dates with:
# create_weekly_counts(start_date_str='YYYY-MM-DD', end_date_str='YYYY-MM-DD')
jhu.create_weekly_counts()
# 7 - process county adjacencies
adje.build_edges()
#8 - build flight routes
fled.process_flight_edges()
#9 write out reports
po.generate_airport_report()
po.generate_airport_edge_report()
po.generate_fips_report()
po.generate_node_report()
po.generate_node_covid_report()
print("you are in main")
breakpoint()