Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uribo/tabularmaps
Make 'tabular' Tile-Grid Geographical Maps
https://github.com/uribo/tabularmaps
Last synced: 3 months ago
JSON representation
Make 'tabular' Tile-Grid Geographical Maps
- Host: GitHub
- URL: https://github.com/uribo/tabularmaps
- Owner: uribo
- License: cc-by-4.0
- Created: 2020-03-29T23:11:21.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-06T21:41:52.000Z (over 4 years ago)
- Last Synced: 2024-11-13T21:11:30.711Z (3 months ago)
- Language: R
- Homepage:
- Size: 210 KB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# tabularmaps[](https://www.tidyverse.org/lifecycle/#experimental)
[](https://cran.r-project.org/package=tabularmaps)
[](https://github.com/uribo/tabularmaps/actions)tabularmapsは、CC0で公開されている[カラム地図プロジェクト](https://github.com/tabularmaps/hq)が進める行政区分等のグリッドレイアウトによる可視化をRパッケージとして提供するものです。
## インストール
インストールはGitHubを経由して行います。まずremotesパッケージをCRANからインストールした後、`remotes::install_github()`で行ってください。
``` r
install.packages("remotes")
remotes::install_github("uribo/tabularmaps")
```## 使い方
```{r example}
library(tabularmaps)
library(ggplot2)
```**日本国内**
47都道府県
```{r demo_jpn77, eval=FALSE, echo=TRUE}
tabularmap(jpn77,
x,
y,
group = prefecture,
fill = region_kanji,
label = prefecture_kanji,
size = 3,
family = "IPAexGothic") +
theme_tabularmap(base_family = "IPAexGothic") +
scale_fill_jpregion(lang = "jp",
name = "八地方区分")
```
東京23区```{r demo_tky23, eval=FALSE, echo=TRUE}
tabularmap(tky23,
x,
y,
group = ward,
fill = ward,
label = ward_kanji,
family = "IPAexGothic",
.expand_size = 12.5) +
theme_tabularmap(base_family = "IPAexGothic") +
guides(fill = FALSE)
```
**国際**
ISO-3166による国名
```{r demo_iso3166, eval=FALSE, echo=TRUE}
tabularmap(iso3166,
x,
y,
group = iso3c,
fill = continent,
label = iso3c,
size = 2,
.expand_size = 20,
.radius_size = 10) +
theme_tabularmap() +
guides(fill = guide_legend(title = "Continent")) +
theme(legend.title = element_text(size = 10),
legend.text = element_text(size = 8))
```
## Related works
- [geofacet](https://github.com/hafen/geofacet)
- [ggpol](https://github.com/erocoar/ggpol)
- [statebins](https://github.com/hrbrmstr/statebins)
- [waffle](https://github.com/hrbrmstr/waffle)