-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.py
More file actions
29 lines (25 loc) · 892 Bytes
/
Main.py
File metadata and controls
29 lines (25 loc) · 892 Bytes
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
import HeatMap
import Mattvis
import SingleDay
import Requests
def main():
# initialize user input
user_input = ""
# continuously get user input until quit chosen
while user_input.lower() != "q":
user_input = input("[g]ather API data | [h]eat map | [d]aily graph | [s]ingle day graph | [q]uit (g/h/d/s/o/q): ")
# call corresponding main function for given choice
if user_input.lower() == "g":
Requests.create_json_files()
elif user_input.lower() == "h":
HeatMap.run_heatmap()
elif user_input.lower() == "d":
Mattvis.run_mattvis()
elif user_input.lower() == "s":
SingleDay.run_aqi_visualization()
elif user_input.lower() == "o":
Mattvis.run_mattvis()
elif user_input != "q":
print("invalid input.")
if __name__ == "__main__":
main()