
As the COV19 pandemic has reached heightened proportions, with most of the nation being in tier 3 or tier 4, I thought it would be a good idea perform a comparative analysis of five countries that have played a significant role in the unfoldment of this health crisis.
The initial strain of COV19 is said to have come from Wuhan, China. There is much controversy about where this virus was actually released to the public because it is said to have come from a bat that resides deep in caves that are not native to Wuhan. Some say the virus was transmitted by a market in Wuhan, but a very short distance away is a biolab: what a coincidence.
The US is a superpower, so whatever it does will be noticed by other world leaders. The US blames China for the rapid spread of the virus because the country allowed international travel, so the virus had spread all over the globe. The last I heard was that the US is pulling out of the World Health Organisation, or WHO, because it believes the organisation is in China’s back pocket. The US had up until this point been a major financial backer of the WHO, so I don’t know how this is going to affect the future of the organisation.
The COV19 virus has mutated into a much more contagious strain in the UK, and as a result international travel into and out of the UK has been banned.
Another very highly infectious strain of COV19 has mutated out of South Africa as well, which means the country is a very significant player with regard to the escalation of the pandemic.
Sweden did not institute a lockdown and the King of Sweden has recently said that it was a bad decision not to lock the country down, as other countries have done. It is important, therefore to look at this country and see what effect not initiating a lockdown and allowing the virus to naturally progress has had on the country.
I have obtained the data for this analysis from the Our World in Data website, which is updated daily and must be reloaded into the system every day it is used. The link for the csv file can be found here:- Coronavirus Source Data — Our World in Data
On the day of this writing, Bulgaria had updated the website erroneously before the data had been obtained, so I had to revise the program to take account of this mistake. The fact that a date was entered when the data had not yet been collected indicates the need to continuously review the code and ensure it is suitable for the data that is being used
I have written the program in Python using Google Colab because it is a free online Jupyter Notebook that can be accessed from any computer that has internet and Google access.
Because many libraries are already installed on Google Colab, I only had to import the libraries that I would need to write the program, namely pandas and numpy.
I also read the csv file into the program. It is important that the most current version of the file is loaded and read so the most up to date predictions can be made in this regard:-
I then converted the date that the data was collected to a number because the model will not accept a datetime object when training, fitting and predicting:-
I created a list that contains all of the countries that are represented in the dataset. Using a for loop, only country names that were not in the list were appended to the list. The dataset has 192 names, but during the analysys, one of the names was dropped:-
I ten had to obtain the latest date for prediction purposes. I had to revise the original program in this instance because Bulgaria had entered a date, 31 December 2020, that had not yet transpired.
I obtained the current day and printed it.
I obtained the day before the current day, yesterday, by subtracting one day from it.
I timestamped the variable yesterday:-
I defined the variable, next_day, which is yesterday plus 1 day.
I created a dataset called last_date, which is the values of all of the countries on the value of yesterday:-
I then used a filter to select the UK during the testing period:-
I used a filter to select the data pertaining to the US during the test period:-
I used filters to select the data for China during the data collection period:-
I used a filter to select the data from South Africa during the collection period:-
I used a filter to select Sweden’s data that had been collected during the period:-
I then needed to set the datasets up so they would be compatible with each other.
I deleted the first 7 rows from UK’s dataset to make it compatible:-
I deleted the first 16 rows from the UK’d dataset to make it compatible:-
I deleted the first 16 rows from China’s dataset to make it compatible:-
I deleted the first 6 rows from Sweden’s dataset to make it compatible:-
I then assigned variables to represent the date, new cases per million of each country analysed, and new deaths per million of each country analysed:-
I then had to create a dataset for each country with the date, new cases per million, and new deaths per million.
I created a comparator dataset for the UK:-
I created a comparator dataset for the US:-
I created a comparator dataset for China:-
I created a comparator dataset for South Africa:-
I created a comparator dataset for Sweden:-
I merged all five datasets into one dataset, which would be used to perform the analysis:-
I tested for any null values and found they were present in numewric columns.
Because all of the null values were in numeric columns, I only had to replace all null values in the dataset with 0:-
I put the new cases per million on a graph and found that China recorded the lowest incidence of new cases and Sweden recorded the highest. The data for the US, UK and South Africa were slotted in between these two countries:-
I put the new deaths per million on a graph and found that China recorded the lowest incidence of new deaths and Sweden recorded the highest. The data for the US, UK and South Africa were slotted in between these two countries. Interestingly, in China any underlying illness is put on the death certificate as the cause of death. For example, if a person had a heart condition and had COV19 when he died, the cause of death would be recorded as the underlying heart condition, which is the reason for the very low recordings of death by COV19 in China:-
The code for this post can be found in its entirety in my personal GitHub account, the link being found here:- COV19/COV19_Compare_US_,_UK,_China,_SA,_Sweden.ipynb at main · TracyRenee61/COV19 (github.com)