simple R package to read data from publicly available covid data repositories
devtools::install_github("lmullany/rawcoviddata")
#load the package
library(rawcoviddata)
#pull the global csse data by country and date
global <- cssedataglobal() # pulls the csse data by country and date
#pull the usa csse data, setting `return_compact` to TRUE
usa_csse_data = cssedata(return_compact=T)
# This returns a three element list: case data, death data, and population data
# Use helper functions `get_us_from_cdp()`, get_all_states_from_cdp()` or `get_all_counties_from_cdp()`
# to get us, state, and county level information from the compact form of `cssedata()`
# us data
get_us_from_cdp(usa_csse_data,fix_cumul = T)
# state data
get_all_states_from_cdp(usa_csse_data,fix_cumul = T)
# county data
get_all_counties_from_cdp(usa_csse_data,fix_cumul = T)
library(rawcoviddata)
us <- cssedataglobal()[`Country/Region`=="US"]
plot_covid(us) +
ggplot2::ggtitle("US COVID-19 Cases") +
ggplot2::scale_y_continuous(labels=scales::comma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.