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(mobdf, J, X, region = "", regionshort = "", rt = NULL)
|
mobdf |
A data frame with google mobility data for the selected region |
J |
Combined trajectory file from PhyDyn analysis |
X |
Combined log file from PhyDyn analysis |
region |
A title for the plots describing the region of analysis |
regionshort |
A short title that will go in file names |
rt |
The output of a function to compute R(t), such as SEIJR_plot_Rt or gmrf_exogsir_plot_Rt |
A list with the tabulated time series and outputs of pika::rolling_corr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## 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'
# load the trajectory and log files:
J = readRDS('traj.rds' )
X = readRDS('logs.rds' )
# run it:
o = googmobility( mobdf, J, X, region = 'New York City, USA', regionshort='newyork' , rt = gmrf_exogsir_plot_Rt(J, X ) )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.