forked from iSchool-597PR/2021Fall_finals
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfinal_project_cython_main.py
37 lines (29 loc) · 1.24 KB
/
final_project_cython_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
"""
IS597 Spring 2021 Final Project
Group members: Kangyang Wang, Wendy Zhu, and Kay Avila
Reads in event data about pandemics and wars, as well as data from the United States Consumer Price Index (CPI),
Gross Domestic Product (GPD), and stock market S&P500 and Dow Jones. Then creates a series of plots combining
these data sets.
This version uses compiled cython functions when "from final_project_cython import *" is enabled. Travis CI
does not like this, so a pure python version is saved in Git.
"""
# Enable this to use cython:
#from final_project_cython.final_project_cython import *
# Disable this to use cython:
from final_project import *
def main():
"""
Main function for starting all data processing and plotting
:return: None
"""
us_cpi_data = 'data/bls_us_cpi.csv'
events_data = 'data/event_facts.csv'
sp500_data = 'data/sp500_monthly.csv'
dowjones_data = 'data/dow_jone_monthly.csv'
us_gdp_data = 'data/gdp_usafacts.csv'
analyze_index(sp500_data, dowjones_data, events_data)
analyze_gdp(us_gdp_data, events_data)
pandemics_cpi_df, wars_cpi_df = analyze_cpi(us_cpi_data, events_data, 10, 'end_year')
plot_all_cpi_graphs(pandemics_cpi_df, wars_cpi_df)
if __name__ == '__main__':
main()