plot.epiflows: Various plots for epiflows objects

View source: R/plot.epiflows.R

plot.epiflowsR Documentation

Various plots for epiflows objects

Description

The plot method for epiflows objects offers types of graphics (argument type):

Usage

## S3 method for class 'epiflows'
plot(x, type = c("map", "network", "grid"), ...)

Arguments

x

an epiflows object.

type

The type of plot to produce (defaults to map).

...

arguments passed on to a given type

Details

  • map: flows are displayed on an interactive map; see map_epiflows for more details

  • network: flows are displayed as a network using the htmlwidget visNetwork and the plotting method for epicontacts objects; see vis_epiflows for more details

  • grid: flows are displayed as a grid between origins and destinations; see grid_epiflows for more details

Author(s)

Salla Toikkanen, Thibaut Jombart, Zhian Kamvar

Examples

data("Brazil_epiflows")

# no coordinates, defaults to network
plot(Brazil_epiflows) 

# grid bubbleplot
plot(Brazil_epiflows, "grid")

# adding coordinates defaults to map
data("YF_coordinates")
ef <- add_coordinates(Brazil_epiflows, YF_coordinates[-1])
plot(ef)

reconhub/epiflows documentation built on Sept. 21, 2023, 1:17 p.m.