knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The goal of covid19census
is to facilitate the exploration of possible relationship between demographic, heath related, environmental, economic metrics, health indexes and metrics of spreading/outcomes of COVID-19 epidemic in U.S and Italy.
The package provide functions to extract updated information of COVID-19 tests, confirmed cases, hospitalization and, aggregates those info with datasets obtained from other government and institutional sources. Moreover, detailed documentation regarding each variables and their sources is provided in the relative documentation.
At the moment, covid19census
extracts and contains data of U.S (county level) and Italy (region level).
A family of get
functions is used to extract dynamically daily data and return them in a dataframe
.
For U.S the prefix of the function is getus_
, followed by the specific metric of interest:
getus_covid
: extracts data of COVID-19 from the New York Time git repository or the Johns Hopkins University.getus_dex
: extracts data of DEX, an activity index.getus_tests
: extract info regarding number of tests performed and their results.library(covid19census) dat_us <- getus_all() dim(dat_us)
For *Italy" the prefix of the function is getit_
, followed by the specific metric of interest:
getit_covid
: extracts data of COVID-19 from the Protezione Civle.getit_all
: executes the above function and join the results with other datasets statically contained in the packagedat_it <- getit_all() dim(dat_it)
Static U.S and Italy datasets can be accessed directly.
data(us_dem)
The country is generally specified in the first 2 letters of the object name. For example us_dem
contains demographic info (sex age) of U.S counties, whereas it_dem
of Italy.
Note that it was not always possible to obtain the same datasets/information for U.S and Italy.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.