<jupyter_start><jupyter_text>Project 1- **Team Members**: <NAME>, <NAME>, <NAME>, <NAME>![](Images/florida_covid19_data.jpg) Data set used:: * https://open-fdoh.hub.arcgis.com/datasets/florida-covid19-case-line-data  Dependencies<jupyter_code>import step1_raw_data_collection as step1
import step2_data_processing_and_cleaning as step2

import pandas as pd<jupyter_output><empty_output><jupyter_text>Process of Data Analysis![](Images/data_process.png) Step 1: Raw Data Collection-----<jupyter_code>df = step1.get_data()
#help(step1.get_data)<jupyter_output><empty_output><jupyter_text>Step 2: Data Processing & Data Cleaning-----  Single group<jupyter_code>#df = step2.get_hospitalized_data()
#df = step2.get_df_with_datetime_and_formatted_column()
df = step2.get_hospitalizations_by_casedatetime(df)

#group_name = "Gender"
#group_name = "Age_group"
#group_name = "Travel_related"
#group_name = "Jurisdiction"
#group_name = "County"

#df = step2.get_group(group_name)

#df<jupyter_output><empty_output><jupyter_text>Two groups: before and after opening<jupyter_code>#df1, df2 = step2.get_groups_before_and_after_opening_date()
#df1, df2 = step2.get_groups_by_casedatetime()

group_name = "Gender"
#group_name = "Age_group"
#group_name = "Travel_related"
#group_name = "Jurisdiction"
#group_name = "County"

df1,df2 = step2.get_groups(group_name)

#df
#pd.concat([df1,df2],axis=1)
df = step2.get_df_with_datetime_and_formatted_column()
filt = df["Gender"]=="Male"
df = df[filt]
df = step2.get_hospitalizations_by_casedatetime(df)
male_by_week = df.groupby(pd.Grouper(freq='W',key='CaseDateTime')).sum()

df = step2.get_df_with_datetime_and_formatted_column()
filt = df["Gender"]=="Female"
df = df[filt]
df = step2.get_hospitalizations_by_casedatetime(df)
female_by_week = df.groupby(pd.Grouper(freq='W',key='CaseDateTime')).sum()

male_perc = male_by_week['Hospitalized']/(male_by_week['Hospitalized']+female_by_week['Hospitalized'])*100
female_perc = female_by_week['Hospitalized']/(male_by_week['Hospitalized']+female_by_week['Hospitalized'])*100

import matplotlib.pyplot as plt
plt.figure(figsize=(8,6))
p1 = plt.bar(male_perc.index,male_perc,width=5,label='male',alpha=0.5)
p2 = plt.bar(female_perc.index,female_perc,bottom=male_perc,width=5,label='female',alpha=0.5)
plt.hlines(y=50,xmin=male_perc.index[0],xmax=male_perc.index[-1],alpha=0.8)
plt.ylabel("Percent")
plt.xticks(male_perc.index,[date.strftime("%m/%d") for date in male_perc.index],rotation='vertical')
plt.title("Percent Male/Female for Hospitalizations by week")
plt.legend(handles=[p1,p2])
plt.show()
#clean csv

new_csv_data_df = df[['ObjectId', "County",'Age',"Age_group", "Gender", "Jurisdiction", "Travel_related", "Hospitalized","Case1"]]
new_csv_data_df.head()
#new_csv_data_df.to_csv(new_csv_data_df, 'new_cleaned_data.csv')

new_csv_data_df.to_csv ("new_covid_dataframe.csv") # index = False, header=True)<jupyter_output><empty_output><jupyter_text>There is no change in hospitalizations since reopening Research Question to Answer:* “There is no change in hospitalizations since reopening?”   Part 1: Six (6) Steps for Hypothesis Testing click to expand   1. Identify- **Populations** (divide Hospitalization data in two groups of data):    1. Prior to opening    2. After opening  * Decide on the **date**:    * May 4th - restaurants opening to 25% capacity    * June  (Miami opening beaches)- Distribution:    * Distribution 2. State the hypotheses- **H0**: There is no change in hospitalizations after Florida has reopened- **H1**: There is a change in hospitalizations after Florida has reopened 3. Characteristics of the comparison distribution- Population means, standard deviations 4. Critical values- p = 0.05- Our hypothesis is nondirectional so our hypothesis test is **two-tailed** 5. Calculate 6. Decide!      Part 2: Visualization* Trends Further Inquries* Increases in groups?* Age* Gender* Ethnicitiy Rough Breakdown of Tasks* Data Massaging<jupyter_code>#Calculate total number of cases 
Total_covid_cases = new_csv_data_df["ObjectId"].nunique()
Total_covid_cases = pd.DataFrame({"Total Number of Cases": [Total_covid_cases]})
Total_covid_cases
#Total number of cases by county (Kelsey) Include bar chart

#Total number of cases by gender (Kelsey) Include pie chart 
#Top 10 counties with the most cases (Libardo)

#Divide hospitalization data in two groups of data prior to reopening and create new dataframe (Kurt) consider total (Chika)
#Divide hospitalization data in two groups of data after reopening and create new dataframe (Kurt) condider total (Chika)
#Total number of hospitalization for all counties (Libardo)
#Total number of hospitalization for each county and put in DataFrame # Create a visualization (Kelsey)

#Percentage of hospitalization by gender # Create Visualization (Libardo)

#Percentage of hospitalization by age group (Chika) #Create visualization
#Percentage of hospitalization before shut down (Not done yet) (Rephrase) (Chika)
#Percentage of hospitalization during shut down (backburner)
#Percentage of hospitalization after reopening(Not done yet) (Rephrase) (Chika)
#Compare travel-related hospitalization to non-travelrelated cases (Not done yet) (Chika)
#Average number of hospitalization by county (Not done yet) (Kelsey) 
#Hospitalization by case date/month (needs more) (Libardo)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11599625818521983, 'fraction_numerical': 0.014780168381665107, 'mean_word_length': 7.199386503067485, 'pattern_counts': {'":': 1, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 1, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '31834', 'license': 'MIT', 'n_tokens_mistral': 1913, 'n_tokens_neox': 1772, 'n_words': 458, 'path': 'Sandbox/starter_notebook.ipynb', 'repo_name': 'klw11j/covid-19-project', 'size': '5374'}