Description Usage Arguments Details Value Note Author(s) Examples
View source: R/JapanPrefCartogram.R
Draw a circle cartogram of Japan in the prefecture level
1 2 |
col |
A character vector. RGB or named colors in order of JISCODE to fill a polygon of 47 prefectures. |
axes |
logical. If TRUE, axes are drawn. The default value is FALSE. |
xlab |
A title for the x axis. The default value is NULL. |
ylab |
A title for the y axis. The default value is NULL. |
xlim |
The x-range to be displayed. The default value is NULL. |
ylim |
The y-range to be displayed. The default value is NULL. |
main |
An overall title for the plot |
... |
any other options passed to control circles. |
The function JapanPrefCartogram
draws a simple circle
cartogram of Japan in prefecture level. The size of circles represents
population in 2015 in each prefecture. Currently, the size is
fixed. Users can control only colors and some other graphic
parameters. The order of colors must match to the JIS-code order of
prefectures in Japan.
Population set was obtained from 2015 Population Census of Japan.
A data.frame. The coordinates of a label point in each prefecture.
The author would like to express the deepest appreciation to Prof. Luc Anselin, the developer of GeoDa, the output of which was used for calculation of the coordinates of this cartogram.
Susumu Tanimura aruminat@gmail.com
1 2 3 4 5 6 7 8 | JapanPrefCartogram()
op <- palette(rainbow(47, end = 0.9))
xy <- JapanPrefCartogram(col = 1:47, fg = gray(.8))
lb <- character(47)
lb[13] <- "Tokyo"
text(xy, lb)
palette(op)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.