correlateregions | R Documentation |
A utility function that creates a list containing a location dataframe and
a movement matrix. The regionlist
and movementdata
should be
from the same source, i.e. the IDs in the movementdata
correspond to
the IDs in the regionlist. The data location
is likely to be an
external datasource, and the locations may not precisely match those in the
regionlist
. This function removes items from location
which
don't exist in regionlist
and vice-versa. It then converts
movementdata
to a movement matrix with named rows and columns (based
on regionlist
).
correlateregions(location, regionlist, movementdata)
location |
A |
regionlist |
A |
movementdata |
A |
A list
containing a locations
data.frame
with
"name", "lat", "lon" and "pop" fields, and a observed
matrix
containing a movement matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.