Description Usage Arguments Value Examples
This function requires the pika package https://github.com/mrc-ide/pika/ NOTE this function computes the rolling correlation for a range of lag days, but does not currently use this information The lag data is returned. If R(t) is out of sync with mobility, better correlations can be found by shifting the dates of the R(t) data
1 | googmobility_skygrowth(mobdf, sg0, region = "", regionshort = "")
|
mobdf |
A data frame with google mobility data for the selected region |
sg0 |
Skygrowth output from function sarscov2::skygrowth0 |
region |
A title for the plots describing the region of analysis |
regionshort |
A short title that will go in file names |
A list with the tabulated time series and outputs of pika::rolling_corr
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# load the mobility data:
mobdf0 = read.csv( system.file( 'extdata/googmob-1may2020.csv', package = 'sarscov2' ) , stringsAs=FALSE)
# extract new york:
mobdf <- mobdf0[ mobdf0$sub_region_1=='New York' & mobdf0$sub_region_2=='New York County', ]
# make a nice header for the plot
region = 'New York City, USA'
# run it:
o = googmobility( mobdf, sg0, region = 'New York City, USA', regionshort='newyork' )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.