map_qdata(database, regions = ".", color = "gray50", border = "gray90", size = 4,  cartogram = FALSE, diffuse = 5, label = NULL, ...)mapmapTRUE, the shape of the cartogram will be determined by
the size parameter in the data (i.e. data$.size); see
cart_polygon for detailscart_polygon. Default to be 5.cart_polygondata (must be either a factor or a numeric variable), or
an R expression to calculate colors; color is used to fill the
interior of graphical elementsNA means to suppress the bordercolor, but
when using a variable to generate sizes, it must be a numeric variableMapData containing the coordinates of polygons.
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.
library(cranvas)
map_qdata("state")
map_qdata("county", "iowa")
Run the code above in your browser using DataLab