1.Brief introduction of country belgium

Belgium, officially the Kingdom of Belgium, is acountry in Western Europe. It is a country bordered to the Netherlands to the north, Germany to the east, Luxembourg to the southeast, France to the southwest, & the North Sea to the northwest. It covers an area of 30,689 \(km^2\) & has a population of more than 11.5 million,making it the 22 nd most densely populated country in the world & the 6 th most densely populated country in Europe, with the density of 376 per square kilometre \((970/sq mi)\). The capital & the largest city is Brussels;other major cities are Antwerp, Ghent, Charleroi &Lie`ge

1.Visualization of location

library(ggplot2)
library(maptools)
library(tibble)
library(tidyverse)
library(ggrepel)
library(png)
library(grid)
library(sp)
library(coronavirus)
library(magrittr)
belgium_corona<-coronavirus%>%filter(country=="Belgium")

data("wrld_simpl")
p <-ggplot()+
  geom_polygon(
    data = wrld_simpl,
    aes(x=long ,y=lat ,group=group) ,fill="gray",color="white"
    )+
  coord_cartesian(xlim = c(-180,180),ylim = c(-90,90))+
  scale_x_continuous(breaks = seq(-180,180,120))+ 
  scale_y_continuous(breaks = seq(-90,90,100))
 p+
   geom_point(
   data = belgium_corona, aes(x=long, y=lat), color="red", size
   =1
   )
Location of Belgium

Location of Belgium

2.Exploratory Data Analysis

1.visualization of confirmed cases, recovered cases & deaths

library(ggplot2)
library(coronavirus)
library(magrittr)
library(tidyverse)
library(dplyr)
library(tidyr)
library(tibble)
library(knitr)
 belgium_corona<-coronavirus%>%filter(country=="Belgium")

imputing the negative vales

 #imputing the negative values
 belgium_corona_new<-belgium_corona%>%mutate(cases=replace(cases,which(cases<0),NA))
 summary(belgium_corona_new)
      date              province           country               lat       
 Min.   :2020-01-22   Length:336         Length:336         Min.   :50.83  
 1st Qu.:2020-02-18   Class :character   Class :character   1st Qu.:50.83  
 Median :2020-03-17   Mode  :character   Mode  :character   Median :50.83  
 Mean   :2020-03-17                                         Mean   :50.83  
 3rd Qu.:2020-04-14                                         3rd Qu.:50.83  
 Max.   :2020-05-12                                         Max.   :50.83  
                                                                           
      long       type               cases       
 Min.   :4   Length:336         Min.   :   0.0  
 1st Qu.:4   Class :character   1st Qu.:   0.0  
 Median :4   Mode  :character   Median :  30.0  
 Mean   :4                      Mean   : 227.8  
 3rd Qu.:4                      3rd Qu.: 291.5  
 Max.   :4                      Max.   :2454.0  
                                NA's   :1       
 which(is.na(belgium_corona_new$cases))
[1] 283
 belgium_corona_new$cases[283]= mean(c(belgium_corona$cases[282],belgium_corona$cases[284]))
 length(belgium_corona_new$cases)
[1] 336
 belgium_corona_new$col <-as.factor(c(rep("black",281),rep("red",2),rep("black",336-283)))
 summary(belgium_corona_new)
      date              province           country               lat       
 Min.   :2020-01-22   Length:336         Length:336         Min.   :50.83  
 1st Qu.:2020-02-18   Class :character   Class :character   1st Qu.:50.83  
 Median :2020-03-17   Mode  :character   Mode  :character   Median :50.83  
 Mean   :2020-03-17                                         Mean   :50.83  
 3rd Qu.:2020-04-14                                         3rd Qu.:50.83  
 Max.   :2020-05-12                                         Max.   :50.83  
      long       type               cases           col     
 Min.   :4   Length:336         Min.   :   0.0   black:334  
 1st Qu.:4   Class :character   1st Qu.:   0.0   red  :  2  
 Median :4   Mode  :character   Median :  30.5              
 Mean   :4                      Mean   : 227.5              
 3rd Qu.:4                      3rd Qu.: 290.8              
 Max.   :4                      Max.   :2454.0              
ggplot(belgium_corona_new,
       aes(x=date,y=cases,fill=type,col=type))+
  geom_line()+geom_jitter(aes(col=type))+
  facet_wrap(~type,ncol = 3)+coord_flip()

#### summary of Belgium corona

library(knitr)
belgium_summary<-as.tibble(cbind(total_active,total_recovered,total_death))
kable(belgium_summary)
total_active total_recovered total_death
31286 13732 8761

calculating the precentages of Belgium

library(coronavirus)
library(magrittr)
library(tidyverse)
library(dplyr)
library(tidyr)
library(tibble)
#####calculating the %
belgium_corona<-coronavirus%>%filter(country=="Belgium")
belgium_corona

time_belgium<-belgium_corona %>% separate(date,into=c("year","month","day"),sep="-")
newtime_belgium<-time_belgium%>%
  mutate(month=if_else(month=="01","January",(
    if_else(month=="02","February",
            if_else(month=="03","March",
                if_else(month=="04","April","May"))
            ))))
library(knitr)
rate<-cbind(r1,r2,r3)
myrate<-as.data.frame(rate)
kable(myrate)
month confirmed confirmed_rate month recovered recovered_rate month death death_rate
January 0 0.0000000 January 0 0.0000000 January 0 0.000000
February 1 0.0018595 February 1 0.0018595 February 0 0.000000
March 12774 23.7527659 March 1695 3.1517879 March 705 1.310921
April 35744 66.4646051 April 9880 18.3714833 April 6889 12.809833
May 5260 9.7807694 May 2156 4.0089998 May 1167 2.169992
*cumilative sum of belgium confirmed cases visualization

2.comparison between the neighbouring countries

unique(coronavirus$country)
netherlands_corona<-coronavirus%>%filter(country=="Netherlands")

germany_corona<-coronavirus%>%filter(country=="Germany")

belgium_corona<-coronavirus%>%filter(country=="Belgium")

france_corona<-coronavirus%>%filter(country=="France")

Craeting a data frame of neightbouring countries & Belgium

countries_corona<-as.data.frame(rbind(netherlands_corona,germany_corona,belgium_corona,france_corona))

Comparison of covid-19 deaths between the neighbouring countries of Belgium

countries_death<-countries_corona%>%filter(type=="death")
ggplot(countries_death,
       aes(x=date,y=cases,fill=type,col=country))+
  geom_line()+geom_point()+ 
  facet_wrap(~country,ncol = 4)+coord_flip()+
  ggtitle("Comparison  of covid-19 deaths between the neighbooring countries")

#### Recovesed cases of neighbouring countries of Belgium

countries_recovered<-countries_corona%>%filter(type=="recovered")

Comparison between the recovered of covid-19 patients between the neighbooring countries of Belgium

ggplot(countries_recovered,
       aes(x=date,y=cases,fill=type,col=country))+
  geom_line()+geom_point()+ 
  facet_wrap(~country,ncol = 4)+coord_flip()+
  ggtitle("Comparison between the recovered of covid-19 patients 
          between the neighbooring countries")

countries_cases<-countries_corona%>%filter(type=="confirmed")

Comparison between the confirmed covid-19 patients between the neighbooring countries of Belgium

ggplot(countries_cases,
       aes(x=date,y=cases,fill=type,col=country))+
  geom_line()+geom_point()+ 
  facet_wrap(~country,ncol = 4)+coord_flip()+
  ggtitle("Comparison between the confirmed covid-19 
          patients between the neighbooring countries")

3.Conclusions and Discussion

In the belgium corona virus data set there was a negative value of confirmed cases,but it is not significant so i have do conduct a data preprocessing step. Here i have used imputing missing data & color it in a red color for the identification. For imputing missing value i have used mean imputation interpolation method.Because of data entering erroes or changing of the methodology may occured those negative values. And also the province was not available in the belgium coronavirus data set. thus we cannot conduct a provincewise analysis of the patients. When we are comapared to the other neightbouring countries belgium has low number of deaths compared to france & germany.The government and the National security council & the health sector has given the adequate rules to control the virus spread with in the country.

4.References

\(\underline\{This\ https://en.m.wikipedia.org/wiki/COVID-19_pandemic_in_Belgium\ is\ underlined}\) \(\underline\{This\ https://github.com/thiyangt/CoronaSriLanka/blob/master/coronaSLDashboard.Rmd\ is\ underline}\)

$