Merge branch '13-indexer-with-eps-and-employees-graphs' into 'master'

Resolve "Indexer with EPS and Employees graphs"

Closes #13

See merge request usi-si-teaching/msde/2022-2023/visual-analytics-atelier/group-projects/group-1!12
This commit is contained in:
RMPietro18 2023-05-24 08:03:16 +00:00
commit d129ac5678
2 changed files with 635 additions and 0 deletions

20
indexer/EPS.py Normal file
View file

@ -0,0 +1,20 @@
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
def compare_tickers(tickers: list):
combined_df = pd.DataFrame()
for ticker in tickers:
filepath = f'Companies_Data/{ticker}_Data/{ticker}earnings.csv'
eps_quarterly = pd.read_csv(filepath)
ticker_df = eps_quarterly.loc[eps_quarterly['symbol'] == ticker]
ticker_df['ticker'] = ticker
combined_df = combined_df._append(ticker_df)
sns.catplot(data=combined_df, x='quarter', y='epsActual', hue='ticker', kind='bar', aspect=2)
plt.xticks(rotation=30)
plt.title('Earnings per Share (EPS)')
plt.show()
tickers_list = ['INTC', 'AAPL', 'GOOGL']
compare_tickers(tickers_list)

615
indexer/Employees.ipynb Normal file

File diff suppressed because one or more lines are too long