<jupyter_start><jupyter_text>Data Sources- JHU    - repo: https://github.com/CSSEGISandData/COVID-19    - directories: https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data- SFC    - map: https://projects.sfchronicle.com/2020/coronavirus-map/    - data: https://sfc-project-files.s3.amazonaws.com/project-feeds/covid19_us_cases_ca_by_county_.json- NYT    - raw data: https://raw.githubusercontent.com/nytimes/covid-19-data/master/us-counties.csv    - repo: https://github.com/nytimes/covid-19-data  Sample Loading- choose a function corresponding to the data source    - note: SFC data was no longer supported at some point, and the structure changed frequently- JHU data has had occasional errors in reporting- for the sample we will use the NYT data Advanced Note on the Code- these data loading processes (e.g. COVID_19_NYT) are declared with a parent class of Process- the Process class was my initial attempt at a uniform way to automate data loading and pushing to a database- the python script was setup in a way to be used in automated tasks- if you wish to use the database pushing functionality please look at the code and fill in the necessary database information    - the processes assume there is a sql query to handle the creation of the table being pushed to, if it does not exist<jupyter_code>df_nyt = COVID_19_NYT(use_backend = False).process()
df_nyt.head()
df_nyt.tail()<jupyter_output><empty_output><jupyter_text>Exploring the Data<jupyter_code>state = 'California'
df_state = df_nyt.loc[df_nyt['state'] == state]
df_state = df_state.dropna()

fig, ax = plt.subplots(1, 2, figsize = (16, 6))

cases_plot = ax[0].plot(df_state['date'].values, df_state['cases'].values)
deaths_plot = ax[1].plot(df_state['date'].values, df_state['deaths'].values)

fig_title = 'Running Total of Cases and Deaths in {}'.format(state)
fig.suptitle(fig_title, fontsize = 14)

ax[0].set_title('Cases in {}'.format(state))
ax[1].set_title('Deaths in {}'.format(state))
plt.show()
state = 'California'
county = 'Fresno'
condition = (df_nyt['state'] == state) & (df_nyt['county'] == county)
df_county = df_nyt.loc[condition]
df_county = df_county.dropna()

fig, ax = plt.subplots(1, 2, figsize = (16, 6))

cases_plot = ax[0].plot(df_county['date'].values, df_county['cases'].values)
deaths_plot = ax[1].plot(df_county['date'].values, df_county['deaths'].values)

fig_title = 'Running Total of Cases and Deaths in {} County, {}'.format(county, state)
fig.suptitle(fig_title, fontsize = 14)

ax[0].set_title('Cases in {} County'.format(county))
ax[1].set_title('Deaths in {} County'.format(county))
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1297134238310709, 'fraction_numerical': 0.016214177978883863, 'mean_word_length': 5.227699530516432, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '157723', 'license': 'MIT', 'n_tokens_mistral': 936, 'n_tokens_neox': 897, 'n_words': 248, 'path': 'covid_19/covid_19_sample_load.ipynb', 'repo_name': 'acsweet/fds_presentations', 'size': '2652'}