ds5010 / vaccines-3

Collaborative project to investigate vaccine effectiveness
https://ds5010.github.io/vaccines-3/
MIT License
0 stars 0 forks source link

Fix comparisons.py #14

Closed joschw01 closed 1 year ago

joschw01 commented 1 year ago

Requires removing the hardcoded dates, utilize seaborn to simplify the graphing functions, updating/improving the labels on the graph for both the axis and legend, and make sure all labels are suitable for the expanded data

tom2470 commented 1 year ago

df['date2']=df['date'].apply(lambda x: datetime.datetime.strptime(x, "%m-%d-%Y")) df = df.iloc[1:] df["month"]=df["date2"].apply(lambda x: x.strftime('%B')) df.set_index('date') df.drop(columns=['date2'])

tom2470 commented 1 year ago

that should work to fix the date hard code

tom2470 commented 1 year ago

for month, csv_date in months.items(): df = pd.read_csv('data/Merge/vaccinations-and-deaths-' + csv_date +'.csv', converters={'FIPS' : str}) df['Deaths_Per_1e5'] = df['Deaths'] / df['Census2019_18PlusPop'] * 1e5 df['Month'] = month file_list.append(df)

mhorns commented 1 year ago

initial pull request made. need to still clean a bit and add more comments and doc strings

joschw01 commented 1 year ago

This looks to have been fixed. Thanks!