Description Usage Arguments Details Value Author(s) Examples
This function converts maps data in the maps package to a suitable format for cranvas. Optionally it transforms the data to make cartograms.
1 2 |
database |
see |
regions |
see |
cartogram |
whether to transform the map data in order to create a
cartogram; if |
diffuse |
passed into |
... |
passed to |
color |
colors of graphical elements (default dark gray) corresponding
to rows of data; it can be a vector of valid R colors, or a name of
variable in |
border |
colors for the border of graphical elements (e.g. rectangles);
|
size |
sizes of rows; possible values are similar to |
The function map
is used to convert maps data to a list,
then the region names are stored in a mutaframe created by
qdata
; the polygon coordinates are stored in an attribute
MapData
. If multiple polygons belong to the same upper-level region,
the column labels
will store the upper-level region names.
A mutaframe of region names and labels, with an attribute
MapData
containing the coordinates of polygons.
Yihui Xie and Xiaoyue Cheng
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.