<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 <a href="https
Step1:  Question 3
Display first 5 rows of the loaded data
Step2:  ...and do a short summary about the data;
The resultant table comes from the CSV served by the URI.
The data set consists of a list of geographical 
locations with GPS coordinates of each.
The data has a spread of 839 days starting 22nd Jan 2020 to 9th May 2022 - about a period of 2 years 4 months.
Question 4
Get daily cases worldwide ( hint
Step3:  Question 5
Get daily increasement of death cases via defining a function (hint
Step4:  Question 6
Visualize the data obtained in task 4 with library matplotlib
<ASSISTANT_TASK:>
Python Code:
import pandas as pd
deaths_df = pd.read_csv('https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv')
Explanation: <a href="https://colab.research.google.com/github/timomwa/50ForReel/blob/master/ITEC610_Python_Codes_And_Comments.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
Answers for;
UTEC610 Python Fundamentals for data science, Semester 1, 2022 Assignment number (2)
Assessment Artefact: Python Codes and Comments
Weighing [30%]
Question 2
Download csv data with pandas with below code
```
import pandas as pd
deaths_df = pd.read_csv('https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv')
```
End of explanation
# Question 3
#           Display first 5 rows
#           of the loaded data
deaths_df.head(5)
Explanation: Question 3
Display first 5 rows of the loaded data
End of explanation
# Yank out 3 unecessary columns
# i.e 'Lat','Long','Province/State'
# Leaving 'Country/Region' & deaths per day
# Columns
death_cases_worldwide = deaths_df.drop(['Lat','Long','Province/State'], axis=1);
death_cases_worldwide
Explanation: ...and do a short summary about the data;
The resultant table comes from the CSV served by the URI.
The data set consists of a list of geographical 
locations with GPS coordinates of each.
The data has a spread of 839 days starting 22nd Jan 2020 to 9th May 2022 - about a period of 2 years 4 months.
Question 4
Get daily cases worldwide ( hint: summarising daily death cases over all countries
End of explanation
death_cases_worldwide_ = death_cases_worldwide.head(5)
def calc_increment(x):
  current_col_idx = death_cases_worldwide_.columns.get_loc(x.name)
  if current_col_idx > 1:
    prev_column_idx = current_col_idx - 1;
    prev_column = death_cases_worldwide_.iloc[:, (current_col_idx-1):]
    death_cases_of_today = x.iloc[0]
    death_cases_of_yesterday = prev_column.iloc[0].iloc[0]
    increment = int(death_cases_of_today) - int(death_cases_of_yesterday)
    x.iloc[0] = increment
   
death_cases_worldwide_.apply( calc_increment, axis=0 )
# print(death_cases_worldwide_)
Explanation: Question 5
Get daily increasement of death cases via defining a function (hint: use the death cases of today minus the death cases of yesterday from the data obtained in task 4).
End of explanation
# Import library
import matplotlib.pyplot as plt
# Import numpy
import numpy as np
#Specify X axis to be that of Country/Region
death_cases_worldwide.plot(x='Country/Region')
#Finally Show the graph
plt.show()
Explanation: Question 6
Visualize the data obtained in task 4 with library matplotlib
End of explanation
<END_TASK>