Rate of death per number of confirmed case. Note that this is heavily dependand on the number of tests being performed (data not available in this report)
death.vs.cases.plot(death.vs.cases, state.filter = countries, expand = FALSE)
Latest data from r source.by
suppressWarnings({ p <- ommit.start(after.100.dat$all, 'confirmed', params$confirmed.start, filter.states = countries, per.100k.flag = TRUE) %>% ggplotly() %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(round(cumul, digits = 2), big.mark = ',', trim = TRUE), absolute = format(cumul * population / 100000, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = days.after.100, 'Confirmed Cases' = cumul, text, absolute) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d.tmp <- d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Confirmed Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = ~absolute, hovertemplate = paste0('<b>%{text}</b> <i>(%{customdata})</i>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE) d.tmp
d.tmp %>% layout(yaxis = list(type = 'log'))
suppressWarnings({ p <- ommit.start(after.100.dat$all, 'confirmed', params$confirmed.start, filter.states = countries) %>% ggplotly() %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(cumul, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = days.after.100, 'Confirmed Cases' = cumul, text) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Confirmed Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = '', hovertemplate = paste0('<b>%{text}</b>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE)
suppressWarnings({ p <- ommit.start(after.100.dat$all, 'confirmed', params$confirmed.start, filter.states = countries, log2.flag = TRUE) %>% ggplotly() %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(cumul, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = days.after.100, 'Confirmed Cases' = cumul, text) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Confirmed Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = '', hovertemplate = paste0('<b>%{text}</b>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = gsub('log2', 'log10', p$x$layout$yaxis$title$text), type = 'log')) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE)
Latest data from r source.by
suppressWarnings({ p <- ommit.start(after.100.dat$all, 'death', params$death.start, filter.states = countries, per.100k.flag = TRUE) %>% ggplotly() %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(round(cumul, digits = 2), big.mark = ',', trim = TRUE), absolute = format(cumul * population / 100000, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = days.after.100, 'Confirmed Cases' = cumul, text, absolute) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d.tmp <- d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Confirmed Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = ~absolute, hovertemplate = paste0('<b>%{text}</b> <i>(%{customdata})</i>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE) d.tmp
d.tmp %>% layout(yaxis = list(type = 'log'))
suppressWarnings({ p <- ommit.start(after.100.dat$all, 'death', params$death.start, filter.states = countries) %>% ggplotly() %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(cumul, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = days.after.100, 'Confirmed Cases' = cumul, text) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Confirmed Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = '', hovertemplate = paste0('<b>%{text}</b>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE)
suppressWarnings({ p <- ommit.start(after.100.dat$all, 'death', params$death.start, filter.states = countries, log2.flag = TRUE) %>% ggplotly() %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(cumul, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = days.after.100, 'Confirmed Cases' = cumul, text) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Confirmed Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = '', hovertemplate = paste0('<b>%{text}</b>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = gsub('log2', 'log10', p$x$layout$yaxis$title$text), type = 'log')) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE)
Latest data from r source.by
New Confirmed Cases (per 100k population).
suppressWarnings({ p <- last.days(last.days.dat, 'confirmed', params$last.days, countries, log2.flag = FALSE, per.100k.flag = TRUE, new.flag = TRUE) %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(round(cumul, digits = 2), big.mark = ',', trim = TRUE), absolute = format(cumul * population / 100000, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = date, 'Confirmed Cases' = cumul, text, absolute) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Confirmed Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = ~absolute, hovertemplate = paste0('<b>%{text}</b> <i>(%{customdata})</i>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE)
suppressWarnings({ p <- last.days(last.days.dat, 'confirmed', params$last.days, countries, log2.flag = FALSE, per.100k.flag = FALSE, new.flag = TRUE) %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(cumul, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = date, 'Confirmed Cases' = cumul, text) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Confirmed Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = '', hovertemplate = paste0('<b>%{text}</b>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE)
Latest data from r source.by
New Deaths (per 100k population).
suppressWarnings({ p <- last.days(last.days.dat, 'death', params$last.days, countries, log2.flag = FALSE, per.100k.flag = TRUE, new.flag = TRUE) %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(round(cumul, digits = 2), big.mark = ',', trim = TRUE), absolute = format(cumul * population / 100000, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = date, 'Deaths' = cumul, text, absolute) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Deaths`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = ~absolute, hovertemplate = paste0('<b>%{text}</b> <i>(%{customdata})</i>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE)
suppressWarnings({ p <- last.days(last.days.dat, 'death', params$last.days, countries, log2.flag = FALSE, per.100k.flag = FALSE, new.flag = TRUE) %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(cumul, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = date, 'Deaths' = cumul, text) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Deaths`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = '', hovertemplate = paste0('<b>%{text}</b>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE)
Latest data from r source.by
Each data point is an average of new cases from the previous 7 days (per 100k population).
suppressWarnings({ p <- last.week.cumulative(last.week.dat, 'confirmed', 7, countries, log2.flag = FALSE, per.100k.flag = TRUE) %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(round(last.week.var, digits = 2), big.mark = ',', trim = TRUE), absolute = format(last.week.var * population / 100000, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = date, 'Average Cases' = last.week.var, text, absolute) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d.tmp <- d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Average Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = ~absolute, hovertemplate = paste0('<b>%{text}</b> <i>(%{customdata})</i>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE) d.tmp
Each data point is an average of new cases from the previous 7 days.
d.tmp %>% layout(yaxis = list(type = 'log'))
Each data point is an average of new cases from the previous 7 days.
suppressWarnings({ p <- last.week.cumulative(last.week.dat, 'confirmed', 7, countries, log2.flag = FALSE, per.100k.flag = FALSE) %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(last.week.var, digits = 2, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = date, 'Average Cases' = last.week.var, text) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d.tmp <- d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Average Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = '', hovertemplate = paste0('<b>%{text}</b>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE) d.tmp
Each data point is an average of new cases from the previous 7 days.
d.tmp %>% layout(yaxis = list(type = 'log'))
Latest data from r source.by
Each data point is an average of new cases from the previous 7 days (per 100k population).
suppressWarnings({ p <- last.week.cumulative(last.week.dat, 'death', 7, countries, log2.flag = FALSE, per.100k.flag = TRUE) %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(round(last.week.var, digits = 2), big.mark = ',', trim = TRUE), absolute = format(last.week.var * population / 100000, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = date, 'Average Deaths' = last.week.var, text, absolute) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d.tmp <- d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Average Deaths`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = ~absolute, hovertemplate = paste0('<b>%{text}</b> <i>(%{customdata})</i>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE) d.tmp
Each data point is an average of new cases from the previous 7 days.
d.tmp %>% layout(yaxis = list(type = 'log'))
Each data point is an average of new cases from the previous 7 days.
suppressWarnings({ p <- last.week.cumulative(last.week.dat, 'death', 7, countries, log2.flag = FALSE, per.100k.flag = FALSE) %>% ggplotly() }) d <- plotly_data(p) %>% mutate(text = format(last.week.var, big.mark = ',', trim = TRUE)) %>% select(Country = state, Date = date, 'Average Cases' = last.week.var, text) %>% arrange(Date) %>% highlight_key(~Country) pal <- viridis(plotly_data(p) %>% nrow, end = .8, option = 'A') d.tmp <- d %>% plot_ly() %>% add_trace(x = ~Date, y = ~`Average Cases`, color = ~Country, type = 'scatter', mode = 'lines+markers', colors = pal, name = ~Country, customdata = '', hovertemplate = paste0('<b>%{text}</b>', '<br><i>%{x}</i>'), text = ~text ) %>% layout(legend = list(x = 0.1, y = 1), dragmode = FALSE, title = p$x$layout$title$text, xaxis = list(title = p$x$layout$xaxis$title$text), yaxis = list(title = p$x$layout$yaxis$title$text)) %>% highlight(on = 'plotly_click', off = 'plotly_doubleclick', persistent = FALSE) d.tmp
Each data point is an average of new cases from the previous 7 days.
d.tmp %>% layout(yaxis = list(type = 'log'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.