Required packages

The packages required to reproduce the report.

# This is the R chunk for the required packages
library(readr)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(tidyr)
library(data.table)
## 
## Attaching package: 'data.table'
## The following objects are masked from 'package:dplyr':
## 
##     between, first, last
library(MVN)
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
## sROC 0.1-2 loaded
library(forecast)
## Registered S3 method overwritten by 'quantmod':
##   method            from
##   as.zoo.data.frame zoo

Executive Summary

In this assignment, I have used data wrangling methods to clean and process three data sets, and merged them. These data sets are RBI_statewise_population_income.csv, Covid_cases_state_wise.csv and hospital_bed_list_state_wise.csv . I have first read all these data sets in R and saved them.There were many extra variables in the data sets so I have selected only the variables which are relevant to this assignment.The data set hospital_bed_list_state_wise.csv was not tidy, hence used gather() method to tidy it, and then merged the data sets. After merging the data set there were many inconsistencies due to the differences in naming conventions of different data sets. I scanned and removed all these inconsistencies in the data set and made it clean. After cleaning, I summarized the data set and checked all the variable definitions. I changed few variables from character to factor and also labeled them accordingly. Also there were many extra variables after merging the data set so I have selected only the variables which are relevant to this assignment.

I created two new variables from the existing variables, ‘percent of covid cases’ and ‘Beds for covid patients’. I scanned all the numeric variables for outliers, using suitable outlier detection methods. These outliers showed that there is a huge difference in the data for different states and union territories, which suggests the great diversity in India.Also the variables showed covid cases, and the outliers just showed states which were massively affected than the rest.I have transformed the variable whose distribution is right skewed to make it normally distributed using one of the mathematical transformation method.As all the three data set had a huge difference in scale, I have used z-score transformation on the variables.

Data

In this assignment I will be working with three data sets, which gives state-wise data of India.These data sets have been downloaded from open sources, and then imported. Following are the details of the data sets.

The first data set is RBI_statewise_population_income.csv, https://www.kaggle.com/gokulrajkmv/indian-statewise-data-from-rbi.In India, censex is carried out after every 10 years, this data set gives information of two years(2001,2011), as the latest censex will be carried out in year 2021, it is safe to assume year 2011 observations are the latest. But in this assignment I would be concentrating only on few of the variables. I would be selecting only 2011 readings from the data set as it is the latest data, and applicable to my assignment.With the help of select() function I would be dropping the columns with 2001 readings from the data set. This data set consists of the following variables :-

# This is the R chunk for the Data Section
RBI_statewise_population_income <- read_csv("RBI DATA states_wise_population_Income.csv") %>% select(c(1,3,5,7,9,11,13))
## 
## ── Column specification ────────────────────────────────────────────────────────
## cols(
##   `States_Union Territories` = col_character(),
##   `2000-01-INC` = col_double(),
##   `2011-12-INC` = col_double(),
##   `2001 - LIT` = col_double(),
##   `2011- LIT` = col_double(),
##   `2001 - POP` = col_double(),
##   `2011- POP` = col_double(),
##   `2001 -SEX_Ratio` = col_double(),
##   `2011 -SEX_Ratio` = col_double(),
##   `2001 -UNEMP` = col_double(),
##   `2011 -UNEMP` = col_double(),
##   `2001 -Poverty` = col_double(),
##   `2011 -Poverty` = col_double()
## )
write_csv(RBI_statewise_population_income,"~/Desktop/DW_Assignment2/RBI_statewise_population_income.csv")
print.data.frame(head(RBI_statewise_population_income))
##      States_Union Territories 2011-12-INC 2011- LIT 2011- POP 2011 -SEX_Ratio
## 1 Andaman and Nicobar Islands       89642     86.63       381             876
## 2              Andhra Pradesh       64773     67.02     84581             993
## 3           Arunachal Pradesh       71366     65.39      1384             938
## 4                       Assam       36320     72.19     31206             958
## 5                       Bihar       22582     61.80    104099             918
## 6                  Chandigarh      136883     86.05      1055             818
##   2011 -UNEMP 2011 -Poverty
## 1          54          1.00
## 2          12          9.20
## 3          17         34.67
## 4          45         31.98
## 5          32         33.74
## 6          24         21.81

The second data set is the state wise covid-19 cases in India. This is a data set with data recorded till 3rd May 2020, when the cases were on an upward trend. https://www.kaggle.com/parulpandey/coronavirus-cases-in-india. It consists of the following variables :-

Covid_cases_state_wise <- read_csv("Covid cases in India.csv")
## 
## ── Column specification ────────────────────────────────────────────────────────
## cols(
##   `S. No.` = col_double(),
##   `Name of State / UT` = col_character(),
##   `Total Confirmed cases` = col_double(),
##   Active = col_double(),
##   `Cured/Discharged/Migrated` = col_double(),
##   Deaths = col_double()
## )
write_csv(Covid_cases_state_wise, "~/Desktop/DW_Assignment2/Covid_cases_state_wise.csv")
print.data.frame(head(Covid_cases_state_wise))
##   S. No.          Name of State / UT Total Confirmed cases Active
## 1      1              Andhra Pradesh                  1583   1062
## 2      2 Andaman and Nicobar Islands                    33      1
## 3      3           Arunachal Pradesh                     1      0
## 4      4                       Assam                    43      9
## 5      5                       Bihar                   517    396
## 6      6                  Chandigarh                    97     77
##   Cured/Discharged/Migrated Deaths
## 1                       488     33
## 2                        32      0
## 3                         1      0
## 4                        33      1
## 5                       117      4
## 6                        19      1

The third data set consists the total number of hospital beds in a state in India.(source - Source:National Health Profile 2019 /Directorate General of State Health Services.) It includes the information of government hospital beds in Urban and Rural areas of the given state. It consists of the following variables :-

hospital_bed_list_state_wise <- read_csv("State-wise hospitals list.csv")
## 
## ── Column specification ────────────────────────────────────────────────────────
## cols(
##   `States/UTs` = col_character(),
##   `Rural Hospital Beds` = col_double(),
##   `Urban Hospital Beds` = col_double()
## )
write_csv(hospital_bed_list_state_wise, "~/Desktop/DW_Assignment2/hospital_bed_list_state_wise.csv")
print.data.frame(head(hospital_bed_list_state_wise))
##          States/UTs Rural Hospital Beds Urban Hospital Beds
## 1    Andhra Pradesh                6480               16658
## 2 Arunachal Pradesh                2136                 268
## 3             Assam               10944                6198
## 4             Bihar                6083                5936
## 5      Chhattisgarh                5070                4342
## 6               Goa                1405                1608

Tidy & Manipulate Data I

The data sets need to be tidy before merging them together. hospital_list_state_wise data set is not tidy as the variable area(Rural , Urban) is given as a row and not as a column. To make it tidy we need to use gather() function of tidyr package. I will gather Rural Hospital Beds, Urban Hospital Beds variables and create a new variable ‘Beds’.

# This is the R chunk for the Tidy & Manipulate Data I 
rural_urban_hospital_bed_list <- hospital_bed_list_state_wise %>% gather(`Rural Hospital Beds`, `Urban Hospital Beds`, key = "Area", value = "Beds") 
print.data.frame(head(rural_urban_hospital_bed_list))
##          States/UTs                Area  Beds
## 1    Andhra Pradesh Rural Hospital Beds  6480
## 2 Arunachal Pradesh Rural Hospital Beds  2136
## 3             Assam Rural Hospital Beds 10944
## 4             Bihar Rural Hospital Beds  6083
## 5      Chhattisgarh Rural Hospital Beds  5070
## 6               Goa Rural Hospital Beds  1405
write_csv(rural_urban_hospital_bed_list, "~/Desktop/DW_Assignment2/hospital_bed_list_state_wise.csv")

Merge

I will merge the three data sets , with state and union territories. I want to keep all the data in RBI_statewise_population_income dataset as it contains all the states and union territories. That is why I will use left_join to merge the data sets with RBI_statewise_population_income. The states and union territories column names are different in all the three data sets, hence I will equate them with each other while merging the dataset.

step1 <- RBI_statewise_population_income %>% left_join(Covid_cases_state_wise, c('States_Union Territories' = 'Name of State / UT'))
Population_Covidcases_Hospitalbeds <- step1 %>% left_join(rural_urban_hospital_bed_list, c('States_Union Territories' ='States/UTs'))
write_csv(Population_Covidcases_Hospitalbeds,"~/Desktop/DW_Assignment2/Population_Covidcases_Hospitalbeds.csv")
print.data.frame(head(Population_Covidcases_Hospitalbeds))
##      States_Union Territories 2011-12-INC 2011- LIT 2011- POP 2011 -SEX_Ratio
## 1 Andaman and Nicobar Islands       89642     86.63       381             876
## 2              Andhra Pradesh       64773     67.02     84581             993
## 3              Andhra Pradesh       64773     67.02     84581             993
## 4           Arunachal Pradesh       71366     65.39      1384             938
## 5           Arunachal Pradesh       71366     65.39      1384             938
## 6                       Assam       36320     72.19     31206             958
##   2011 -UNEMP 2011 -Poverty S. No. Total Confirmed cases Active
## 1          54          1.00      2                    33      1
## 2          12          9.20      1                  1583   1062
## 3          12          9.20      1                  1583   1062
## 4          17         34.67      3                     1      0
## 5          17         34.67      3                     1      0
## 6          45         31.98      4                    43      9
##   Cured/Discharged/Migrated Deaths                Area  Beds
## 1                        32      0                <NA>    NA
## 2                       488     33 Rural Hospital Beds  6480
## 3                       488     33 Urban Hospital Beds 16658
## 4                         1      0 Rural Hospital Beds  2136
## 5                         1      0 Urban Hospital Beds   268
## 6                        33      1 Rural Hospital Beds 10944

Scan I

Before understanding the data set and adding a new variable, I need to handle the inconsistencies of the data set which are caused due to merging. First I will find how many NAs are in the data set, by using is.na() function.

# This is the R chunk for the Scan I
sum(is.na(Population_Covidcases_Hospitalbeds))
## [1] 34

34 NAs have been detected in the merged data set, but there were zero NAs in the individual data sets. This leads me to believe that the NAs have been created while merging the three data sets.

After observing the Population_Covidcases_Hospitalbeds , I noticed two row values “Andaman and Nicobar Islands” in the merged data set and “Andaman & Nicobar Islands” in the rural_urban_hospital_bed_list data set. Technically these two values are same, the representation of the values is different,that is why after doing left join they have been skipped resulting in NAs. In order to fix this and remove the inconsistency, I will be replacing ‘&’ with ‘and’ in the rural_urban_hospital_bed_list and then merge the data sets again.I have used sub() function to replace all the values having ‘&’ with ‘and’.

rural_urban_hospital_bed_list$`States/UTs` <- sub("&","and",rural_urban_hospital_bed_list$`States/UTs`)
clean_Population_Covidcases_Hospitalbeds <- step1 %>% left_join(rural_urban_hospital_bed_list, c('States_Union Territories' ='States/UTs'))
write_csv(clean_Population_Covidcases_Hospitalbeds,"~/Desktop/DW_Assignment2/Clean_Population_Covidcases_Hospitalbeds.csv")
sum(is.na(clean_Population_Covidcases_Hospitalbeds))
## [1] 30

Still there are 30 NAs which needs to be removed/replaced. On further observation, I noticed there is a mismatch in spelling of “Puducherry” and “Pondicherry” in the data sets. Again these both row values are same and correct, as “Puducherry” is spelled as “Pondicherry” in some parts of Inda. We again need to change the spelling of “Pondicherry” to “Puducherry” in Covid_cases_state_wise data set and merge the data sets. I am using sub() function to replace “Pondicherry” to “Puducherry” in the column.

Covid_cases_state_wise$`Name of State / UT` <- sub("Pondicherry","Puducherry",Covid_cases_state_wise$`Name of State / UT`)
write_csv(Covid_cases_state_wise, "~/Desktop/DW_Assignment2/Clean_Covid_cases_state_wise.csv")
clean_step1 <- RBI_statewise_population_income %>% left_join(Covid_cases_state_wise, c('States_Union Territories' = 'Name of State / UT'))
clean_Population_Covidcases_Hospitalbeds <- clean_step1 %>% left_join(rural_urban_hospital_bed_list, c('States_Union Territories' ='States/UTs'))
sum(is.na(clean_Population_Covidcases_Hospitalbeds))
## [1] 20
which(is.na(clean_Population_Covidcases_Hospitalbeds))
##  [1] 491 492 501 502 555 556 565 566 619 620 629 630 683 684 693 694 747 748 757
## [20] 758

The NAs are formed because there are no entries for states ‘Nagaland’ and ‘Sikkim’ in the Covid_cases_state_wise. I can assume that there are no Covid-19 cases in these two states and that is why there are no entries in the dataset. So lets replace the NAs by zero. I have used is.na() function to replace the remaining NAs with zero.

clean_Population_Covidcases_Hospitalbeds[is.na(clean_Population_Covidcases_Hospitalbeds)] <- 0
write_csv(clean_Population_Covidcases_Hospitalbeds,"~/Desktop/DW_Assignment2/Clean_Population_Covidcases_Hospitalbeds.csv")
sum(is.na(clean_Population_Covidcases_Hospitalbeds))
## [1] 0

I will scan the merged data set for any special values.

sum(sapply(clean_Population_Covidcases_Hospitalbeds,is.infinite))
## [1] 0
sum(sapply(clean_Population_Covidcases_Hospitalbeds,is.nan))
## [1] 0

Understand

Now the merged data set clean_Population_Covidcases_Hospitalbeds is complete, clean and consists of all the columns from all the three datasets. However I am interested in only few of the variables for this assignmnet, so I used select() function to keep only the variables related to this assignment.

clean_Population_Covidcases_Hospitalbeds <- clean_Population_Covidcases_Hospitalbeds %>% select(c(1:7,9,10,13,14))
colnames(clean_Population_Covidcases_Hospitalbeds)
##  [1] "States_Union Territories" "2011-12-INC"             
##  [3] "2011- LIT"                "2011- POP"               
##  [5] "2011 -SEX_Ratio"          "2011 -UNEMP"             
##  [7] "2011 -Poverty"            "Total Confirmed cases"   
##  [9] "Active"                   "Area"                    
## [11] "Beds"

Let’s summarise the data set, with the help of summary() function. This will give me how all the variables have been defined.

summary(clean_Population_Covidcases_Hospitalbeds)
##  States_Union Territories  2011-12-INC       2011- LIT       2011- POP     
##  Length:64                Min.   : 22582   Min.   :61.80   Min.   :   381  
##  Class :character         1st Qu.: 47958   1st Qu.:71.71   1st Qu.:  2637  
##  Mode  :character         Median : 66413   Median :77.47   Median : 25448  
##                           Mean   : 74792   Mean   :78.24   Mean   : 37819  
##                           3rd Qu.: 89198   3rd Qu.:86.09   3rd Qu.: 62958  
##                           Max.   :211570   Max.   :94.00   Max.   :199812  
##  2011 -SEX_Ratio   2011 -UNEMP     2011 -Poverty    Total Confirmed cases
##  Min.   : 818.0   Min.   :  3.00   Min.   : 1.000   Min.   :    0.0      
##  1st Qu.: 916.5   1st Qu.:  9.00   1st Qu.: 9.855   1st Qu.:   15.0      
##  Median : 949.0   Median : 20.50   Median :15.670   Median :  138.5      
##  Mean   : 945.5   Mean   : 29.47   Mean   :18.592   Mean   : 1294.4      
##  3rd Qu.: 976.8   3rd Qu.: 28.25   3rd Qu.:29.985   3rd Qu.: 1222.2      
##  Max.   :1084.0   Max.   :151.00   Max.   :39.930   Max.   :12974.0      
##      Active            Area                Beds      
##  Min.   :    0.0   Length:64          Min.   :    0  
##  1st Qu.:    1.0   Class :character   1st Qu.: 1402  
##  Median :   90.0   Mode  :character   Median : 5824  
##  Mean   :  901.3                      Mean   :10760  
##  3rd Qu.:  988.5                      3rd Qu.:13463  
##  Max.   :10311.0                      Max.   :58882

‘Area’ and ‘States_Union Territories’ are defined as a characters they should be defined as factors.I will be labeling the variable ‘Area’ with ‘Rural Beds’ and ‘Urban Beds’. I will use factor() function to convert the variables to factors and label them.

clean_Population_Covidcases_Hospitalbeds$Area <- factor(clean_Population_Covidcases_Hospitalbeds$Area, levels = c("Rural Hospital Beds","Urban Hospital Beds"), labels = c("Rural Beds","Urban Beds"))
levels(clean_Population_Covidcases_Hospitalbeds$Area)
## [1] "Rural Beds" "Urban Beds"
clean_Population_Covidcases_Hospitalbeds$'States_Union Territories' <- factor(clean_Population_Covidcases_Hospitalbeds$'States_Union Territories')
write_csv(clean_Population_Covidcases_Hospitalbeds,"~/Desktop/DW_Assignment2/Clean_Population_Covidcases_Hospitalbeds.csv")

Tidy & Manipulate Data II

I am going to create a new variable “Percent of covid cases” which will be (covid cases/population *100) which will give the percent of people affected due to covid. Population is in (000s) thousands scale, so I will first multiply ‘2011- POP’ with 1000 and then divide with ‘Total Confirmed cases’ and then multiply 100 to get the percent.

# This is the R chunk for the Tidy & Manipulate Data II 
clean_Population_Covidcases_Hospitalbeds <- mutate(clean_Population_Covidcases_Hospitalbeds, 'percent of covid cases' = 
                                                     clean_Population_Covidcases_Hospitalbeds$'Total Confirmed cases'/(clean_Population_Covidcases_Hospitalbeds$'2011- POP'*1000)*100)

colnames(clean_Population_Covidcases_Hospitalbeds)
##  [1] "States_Union Territories" "2011-12-INC"             
##  [3] "2011- LIT"                "2011- POP"               
##  [5] "2011 -SEX_Ratio"          "2011 -UNEMP"             
##  [7] "2011 -Poverty"            "Total Confirmed cases"   
##  [9] "Active"                   "Area"                    
## [11] "Beds"                     "percent of covid cases"

I am going to create another variable “Beds for covid patients”. During the starting phase of the pandemic, it was declared that 10% of hospital beds will be assigned exclusively for covid patients. So I will calculate the number of beds assigned for covid patients. For this I will first need to calculate total number of beds for each state (Rural Hospital Beds + Urban Hospital Beds). For that lets spread the data set to create two coloumns “Rural Beds” and “Urban Beds”.

clean_Population_Covidcases_Hospitalbeds <- clean_Population_Covidcases_Hospitalbeds %>% spread(key = 'Area' , value = 'Beds')
clean_Population_Covidcases_Hospitalbeds <- mutate(clean_Population_Covidcases_Hospitalbeds, 'Beds for covid patients' = 
                                                     (clean_Population_Covidcases_Hospitalbeds$`Rural Beds`+clean_Population_Covidcases_Hospitalbeds$`Urban Beds`)*10/100)

colnames(clean_Population_Covidcases_Hospitalbeds)
##  [1] "States_Union Territories" "2011-12-INC"             
##  [3] "2011- LIT"                "2011- POP"               
##  [5] "2011 -SEX_Ratio"          "2011 -UNEMP"             
##  [7] "2011 -Poverty"            "Total Confirmed cases"   
##  [9] "Active"                   "percent of covid cases"  
## [11] "Rural Beds"               "Urban Beds"              
## [13] "Beds for covid patients"

Scan II

For scanning the data set for outliers I need to first focus on the variables which are interlinked and use multivariate method of outlier detection. In our data set , the population variables such as 2011- LIT ,2011- POP, 2011- SEX_Ratio,2011 -UNEMP,2011 -Poverty need to be checked for outliers using MVN package.

# This is the R chunk for the Scan II
Population_Subset <- clean_Population_Covidcases_Hospitalbeds %>% select('2011- LIT','2011- POP', '2011 -SEX_Ratio','2011 -UNEMP','2011 -Poverty' )
results <- mvn(data = Population_Subset, multivariateOutlierMethod = "quan", showOutliers = TRUE)

This shows there are 5 outlier points, in our data. Lets find out their location in the data set.

results$multivariateOutliers

I cannot remove these outliers as these are observations for each states. The outliers shows that the data for some states are very different than the rest. This is because of the drastic differences in geographical area,social and political developments in different states and union territories.

In order to select, outlier detection method for the remaining variables,I need to check the distribution of these variables.

hist(clean_Population_Covidcases_Hospitalbeds$`2011-12-INC`,main = "Histogram of Total Income", xlab = 'Total Income', breaks = 10)

hist(clean_Population_Covidcases_Hospitalbeds$`Total Confirmed cases`,main = "Histogram of Total Confirmed Cases", xlab = 'Total confirmed cases', breaks = 10)

hist(clean_Population_Covidcases_Hospitalbeds$Active,main = "Histogram of Active cases", xlab = 'Active cases', breaks = 10)

hist(clean_Population_Covidcases_Hospitalbeds$`percent of covid cases`,main = "Histogram of percent of covid cases", xlab = 'percent of covid cases', breaks = 10)

hist(clean_Population_Covidcases_Hospitalbeds$`Beds for covid patients`,main = "Histogram of beds for covid patients", xlab = 'beds for covid patients', breaks = 10)

As observed in the above histograms, distribution of all the variables is heavily skewed. That is why Tukey’s method of outlier detection will be the best option to scan the variables for outliers.

# This is the R chunk for the Scan II
clean_Population_Covidcases_Hospitalbeds$`2011-12-INC` %>%  boxplot(main="Boxplot of Total Incomes", ylab="Total Incomes", col = "grey")

clean_Population_Covidcases_Hospitalbeds$`Total Confirmed cases` %>%  boxplot(main="Boxplot of Total Confirmed Cases", ylab="Total cases", col = "grey")

clean_Population_Covidcases_Hospitalbeds$`Active` %>% boxplot(main="Boxplot of Active Cases", ylab="Active cases", col = "grey")

clean_Population_Covidcases_Hospitalbeds$`percent of covid cases` %>% boxplot(main="Boxplot of percent of covid cases", ylab="percent of covid cases", col = "grey")

clean_Population_Covidcases_Hospitalbeds$`Beds for covid patients` %>% boxplot(main="Boxplot of beds for covid patients", ylab="Beds for covid patients", col = "grey")

I would check the outliers for Urban and Rural beds with the help of bivariate method of detecting outliers using boxplot.

Hospitalbeds <- clean_Population_Covidcases_Hospitalbeds %>% gather(`Rural Beds`, `Urban Beds`, key = "Area", value = "Beds")
boxplot(Hospitalbeds$Beds ~ Hospitalbeds$Area, main="Beds by Area", ylab = "Beds", xlab = "Area")

There are few outiers for above variables. These outliers show that there is a huge difference in the incomes,covid cases and number of beds in different states. All these observations are state specific, and that can vary alot. India is a diverse country, and the states and unioin territories vary alot in geographical sizes as well as developed medical infrastructure, social class, employment ratio, and also the number of urban and rural areas. Its because of these factors I am observing outliers in the above variables. It also includes covid cases, some states might have been affected more than the others. This has led to creating outliers in the variable.

We cannot exclude, impute or cap these outliers as all of the following data points are valid and important to observe the overall pattern of covid cases, hospital infrastructure and other variables of the states.

Transform

As seen previously in the histogram of Income of states, its distribution was right skewed. I have performed log transformation in order to normalise the distribution.

# This is the R chunk for the Transform Section
log_income <- log10(clean_Population_Covidcases_Hospitalbeds$`2011-12-INC`)
hist(log_income)

I am going to perform transformation , as the population is (000s) in the power of 10^3, while the cases and beds is in the power 10^0. There is a huge difference in the scales, and hence I have performed z-score transformation to these columns to scale these variables. I have first multiplied the population variable with 1000 to represent it in the same power of cases and beds. I have used scale() function with the center=TRUE and scale =TRUE to perform z-score transformation.

# This is the R chunk for the Transform Section
Population_Covidcases_Beds <- clean_Population_Covidcases_Hospitalbeds %>% select('2011- POP', 'Total Confirmed cases', 'Beds for covid patients')
Population_Covidcases_Beds$`2011- POP` <- Population_Covidcases_Beds$`2011- POP`*1000
print.data.frame(head(Population_Covidcases_Beds))
##   2011- POP Total Confirmed cases Beds for covid patients
## 1    381000                    33                   107.5
## 2  84581000                  1583                  2313.8
## 3   1384000                     1                   240.4
## 4  31206000                    43                  1714.2
## 5 104099000                   517                  1201.9
## 6   1055000                    97                    77.8
z_Population_Covidcases_Beds <- scale(Population_Covidcases_Beds, center = TRUE, scale = TRUE)
summary(z_Population_Covidcases_Beds)
##    2011- POP       Total Confirmed cases Beds for covid patients
##  Min.   :-0.8285   Min.   :-0.50501      Min.   :-0.8587        
##  1st Qu.:-0.7785   1st Qu.:-0.49916      1st Qu.:-0.7489        
##  Median :-0.2738   Median :-0.45098      Median :-0.4010        
##  Mean   : 0.0000   Mean   : 0.00000      Mean   : 0.0000        
##  3rd Qu.: 0.5563   3rd Qu.:-0.02816      3rd Qu.: 0.3341        
##  Max.   : 3.5847   Max.   : 4.55669      Max.   : 2.3616

References