Title: | Create Tile-Grid Geographical Maps |
---|---|
Description: | The 'tabularmap' is one of the visualization methods for efficiently displaying data consisting of multiple elements by tiling them. When dealing with geospatial, it corrects for differences in visibility between areas. |
Authors: | Shinya Uryu [aut, cre] |
Maintainer: | Shinya Uryu <[email protected]> |
License: | CC BY-SA 4.0 |
Version: | 0.1.0.9000 |
Built: | 2024-11-23 03:01:43 UTC |
Source: | https://github.com/uribo/tabularmaps |
A data frame include ISO-3166 codes.
iso3166
iso3166
A data frame with 250 rows 8 variables:
country_name:
continent:
region:
iso2c:
iso3c:
iso3n: 3 digits number (as character)
x: Coordinates for displaying as tabularmap
y: Coordinates for displaying as tabularmap
Prefectures dataset.
jpn77
jpn77
A data frame with 47 rows 8 variables:
jis_code: jis code
prefecture: prefecture names
region: region
major_island:
prefecture_kanji:
region_kanji:
x: Coordinates for displaying as tabularmap
y: Coordinates for displaying as tabularmap
Custom ggplot2 scale for tabulamap.
scale_fill_jpregion(lang, ...)
scale_fill_jpregion(lang, ...)
lang |
Select whether the region variable is Japanese ( |
... |
all other arguments passed on to |
A ggplot2-based tabularmap that places a coordinated dataset in a rectangle.
tabularmap( data, x, y, group, fill = NULL, label = NULL, ..., .expand_size = 10, .radius_size = 2 )
tabularmap( data, x, y, group, fill = NULL, label = NULL, ..., .expand_size = 10, .radius_size = 2 )
data |
data.frame. Contain x, y, group and label variables used as coordinates. |
x , y
|
A column containing the numbers to line up the items. |
group |
Group variable. |
fill |
Fill colour variable. |
label |
Label variable. |
... |
All other arguments passed on to |
.expand_size |
The value specified in the |
.radius_size |
The value specified in the |
library(ggplot2) tabularmap(jpn77, x, y, group = jis_code, label = prefecture, size = 3) tabularmap(jpn77, x, y, group = jis_code, fill = region, label = prefecture, size = 3) + theme_tabularmap() + scale_fill_jpregion(lang = "en") tabularmap(data.frame( id = letters[seq.int(9)], x = rep(c(1,2,3), each = 3), y = rep(c(1,2,3), times = 3), fill = seq.int(9), label = letters[seq.int(9)]), x, y, group = id, fill = fill, label = label, .expand_size = 20, .radius_size = 10) tabularmap(iso3166, x, y, group = iso2c, fill = continent, label = iso2c, .expand_size = 5) + theme_tabularmap() + guides(fill = FALSE)
library(ggplot2) tabularmap(jpn77, x, y, group = jis_code, label = prefecture, size = 3) tabularmap(jpn77, x, y, group = jis_code, fill = region, label = prefecture, size = 3) + theme_tabularmap() + scale_fill_jpregion(lang = "en") tabularmap(data.frame( id = letters[seq.int(9)], x = rep(c(1,2,3), each = 3), y = rep(c(1,2,3), times = 3), fill = seq.int(9), label = letters[seq.int(9)]), x, y, group = id, fill = fill, label = label, .expand_size = 20, .radius_size = 10) tabularmap(iso3166, x, y, group = iso2c, fill = continent, label = iso2c, .expand_size = 5) + theme_tabularmap() + guides(fill = FALSE)
Custom ggplot2 theme for tabulamap.
theme_tabularmap(...)
theme_tabularmap(...)
... |
all other arguments passed on to |
Tokyo 23 wards dataset.
tky23
tky23
A data frame with 23 rows 5 variables:
no: Identifical number
ward: Name
ward_kanji: Names in Kanji
x, y: Coordinates for displaying as tabularmap