<jupyter_start><jupyter_text>South Africa Covid-19 Data Visualization in Python   author info<jupyter_code>print('The author, <NAME>, is a sophomore student at James Madison University studying Intelligence Analysis. This project is for the 2021 spring semester course: IA241.')<jupyter_output>The author, <NAME>, is a sophomore student at James Madison University studying Intelligence Analysis. This project is for the 2021 spring semester course: IA241.<jupyter_text>background of covid-19 in South Africa<jupyter_code>print('South Africa currently has the most covid-19 cases of any country in Africa and as of February 2021, has surpassed 1.5M cases. A more contagious variant of the covid-19 strain, known as 501Y.V2, also originated in the country. The main vaccines the country is administering are the Johnson & Johnson vaccine and the COVAX vaccine. ')<jupyter_output>South Africa currently has the most covid-19 cases of any country in Africa and as of February 2021, has surpassed 1.5M cases. A more contagious variant of the covid-19 strain, known as 501Y.V2, also originated in the country. The main vaccines the country is administering are the Johnson & Johnson vaccine and the COVAX vaccine.<jupyter_text>data source  The data is from [European Centre for Disease Prevention and Control](https://www.ecdc.europa.eu/en/publications-data/download-todays-data-geographic-distribution-covid-19-cases-worldwide) and contains data from March 2020 to December 2020. ![south africa flag](https://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Flag_of_South_Africa.svg/1200px-Flag_of_South_Africa.svg.png)<jupyter_code>%matplotlib inline
import pandas 
df = pandas.read_excel('s3://hauge-ia241-2021spring/COVID-19-geographic-disbtribution-worldwide-2020-12-14.xls')<jupyter_output><empty_output><jupyter_text>A quick view of South Africa covid-19 data:<jupyter_code>sa_data = df.loc[ df['countriesAndTerritories']=='South_Africa' ]
sa_data[:10]<jupyter_output><empty_output><jupyter_text>Question 1: How many covid-19 cases have been confirmed in South Africa as of December 2020?<jupyter_code>sa_data.sum()['cases']
print('The number of confirmed covid-19 cases in South Africa as of December 2020 is 860,964.')<jupyter_output>The number of confirmed covid-19 cases in South Africa as of December 2020 is 860,964.<jupyter_text>Number of confirmed cases per month in 2020:<jupyter_code>sum_cases_per_month = sa_data.groupby('month').sum()['cases']
sum_cases_per_month.plot.bar()
print(sum_cases_per_month)
print('In 2020, South Africa had the largest number of confirmed cases in July: 337,905.')<jupyter_output>In 2020, South Africa had the largest number of confirmed cases in July: 337,905.<jupyter_text>Question 2: How many covid-19 deaths have been confirmed in South Africa as of December 2020?<jupyter_code>sa_data.sum()['deaths']
print('The number of confirmed covid-19 deaths in South Africa as of December 2020 is 23,726.')<jupyter_output>The number of confirmed covid-19 deaths in South Africa as of December 2020 is 23,726.<jupyter_text>Question 3: Which month had the highest number of covid-19 deaths in South Africa in 2020?   Number of confirmed death per month in 2020:<jupyter_code>sum_deaths_per_month = sa_data.groupby('month').sum()['deaths']
sum_deaths_per_month.plot.bar()
print(sum_deaths_per_month)
print('In 2020, South Africa had the largest number of confirmed deaths in August: 6,216.')<jupyter_output>In 2020, South Africa had the largest number of confirmed deaths in August: 6,216.<jupyter_text>Number of deaths in relation to number of cases in 2020:<jupyter_code>sa_data.plot.scatter(x='cases',y='deaths',c='month')<jupyter_output><empty_output><jupyter_text>Conclusions and Limitations<jupyter_code>print('Although the largest number of covid-19 cases in South Africa in 2020 occured in July, the largest number of deaths occured in August. This is likely due to an increase in cases putting a strain on hospital capacity and healthcare workers. One limitation of the dataset is that it only has information up until December of 2020 and is not up to date with 2021 covid-19 data for South Africa.')<jupyter_output>Although the largest number of covid-19 cases in South Africa in 2020 occured in July, the largest number of deaths occured in August. This is likely due to an increase in cases putting a strain on hospital capacity and healthcare workers. One limitation of the dataset is that it only has information up until December of 2020 and is not up to date with 2021 covid-19 data for South Africa.
{'fraction_non_alphanumeric': 0.07359402460456942, 'fraction_numerical': 0.05030755711775044, 'mean_word_length': 5.972434915773354, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 36, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '485049', 'license': 'MIT', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1291, 'n_words': 534, 'path': 'final_project.ipynb', 'repo_name': 'variah-hauge/IA241', 'size': '4564'}