Title: | Create Tile-Grid Geographical Maps |
Version: | 0.1.0 |
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. |
License: | CC BY-SA 4.0 |
URL: | https://github.com/uribo/tabularmaps |
BugReports: | https://github.com/uribo/tabularmaps/issues |
Depends: | R (≥ 3.3.0) |
Imports: | ggforce (≥ 0.3.2), ggplot2 (≥ 3.3.0), purrr (≥ 0.3.4), rlang (≥ 0.4.7) |
Suggests: | countrycode, zipangu, knitr, rmarkdown, testthat (≥ 2.1.0) |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.1 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2020-07-29 22:10:27 UTC; uri |
Author: | Shinya Uryu |
Maintainer: | Shinya Uryu <suika1127@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2020-08-04 09:00:02 UTC |
Country list
Description
A data frame include ISO-3166 codes.
Usage
iso3166
Format
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
Japan 7x7 grid dataset
Description
Prefectures dataset.
Usage
jpn77
Format
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
Coloring the tabularmaps by region in Japan
Description
Custom ggplot2 scale for tabulamap.
Usage
scale_fill_jpregion(lang, ...)
Arguments
lang |
Select whether the region variable is Japanese ( |
... |
all other arguments passed on to |
Create Tile-Grid
Description
A ggplot2-based tabularmap that places a coordinated dataset in a rectangle.
Usage
tabularmap(
data,
x,
y,
group,
fill = NULL,
label = NULL,
...,
.expand_size = 10,
.radius_size = 2
)
Arguments
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 |
Examples
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)
Tabularmap theme
Description
Custom ggplot2 theme for tabulamap.
Usage
theme_tabularmap(...)
Arguments
... |
all other arguments passed on to |
Special wards of Tokyo
Description
Tokyo 23 wards dataset.
Usage
tky23
Format
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