map_epiflows {epiflows} | R Documentation |
Map flows of people between locations
Description
The function map_epiflows
uses leaflet
to generate an interactive map
displaying flows of people travelling between locations stored in a
epiflows
object. Note that the object needs to possess geographic
coordinates.
Usage
map_epiflows(
x,
title = "",
center = NULL,
sort = TRUE,
pal = "YlOrBr",
adjust_width = TRUE,
...
)
Arguments
x |
An |
title |
Plot title. |
center |
An optional set of coordinates or character string specifying ID to use as the center of the map |
sort |
a logical. When |
pal |
a color palette to pass on to |
adjust_width |
a logical specifying if the width of the flows should
be adjusted to reflect the number of flows between locations. Defaults to
|
... |
Additional parameters (not used). |
Value
A leaflet
object
Author(s)
Paula Moraga, Pawel Piatkowski, Salla Toikkanen, Zhian Kamvar
Examples
data("Brazil_epiflows")
data("YF_coordinates")
ef <- add_coordinates(Brazil_epiflows, YF_coordinates[-1])
plot(ef)
map_epiflows(ef, center = "Espirito Santo", title = "Flows to and from Brazil")