library(readr)
d = WHO_COVID_19_global_data_1_ <- read_csv("WHO-COVID-19-global-data (1).csv",
col_types = cols(Date_reported = col_date(format = "%Y-%m-%d")))
d_lastmonth = d %>% filter(Date_reported > "2020-08-31") %>% as.data.frame()
d_lastmonth_nl = d_lastmonth %>% filter(Country == "Netherlands") %>% as.data.frame()
Number of cumulative cases across the Netherlands in September.
p <- plot_ly(data = d_lastmonth_nl, x = ~Date_reported, y = ~Cumulative_cases, type = 'scatter', mode = 'lines')
p
number_cases_sept = 91841 - 70596
number_cases_sept
## [1] 21245
Number of cumulative deaths across the Netherlands in September.
pd <- plot_ly(data = d_lastmonth_nl, x = ~Date_reported, y = ~Cumulative_deaths, type = 'scatter', mode = 'lines')
pd
number_deaths_sept = 6266 - 6215
number_deaths_sept
## [1] 51
d_nl = d %>% filter(Country == "Netherlands") %>% as.data.frame()
Number of cumulative cases across the Netherlands from 29 February 2020 - 20 September 2020.
pa <- plot_ly(data = d_nl, x = ~Date_reported, y = ~Cumulative_cases, type = 'scatter', mode = 'lines')
pa
Number of cumulative deaths across the Netherlands from 29 February 2020 - 20 September 2020.
pad <- plot_ly(data = d_nl, x = ~Date_reported, y = ~Cumulative_deaths, type = 'scatter', mode = 'lines')
pad
Number of new cases and deaths across the Netherlands 1 - 20 September 2020.
ay <- list(
tickfont = list(color = "red"),
overlaying = "y",
side = "right",
title = "New cases"
)
fig <- plot_ly(data = d_lastmonth_nl)
fig <- fig %>% add_bars(x = ~Date_reported, y = ~New_cases, name = "New Cases")
fig <- fig %>% add_bars(x = ~Date_reported, y = ~New_deaths, name = "New Deaths", yaxis = "y2")
fig <- fig %>% layout(
title = "", yaxis2 = ay,
xaxis = list(title="September 2020")
)
fig