Last active
September 10, 2018 12:45
-
-
Save ito4303/7d527ba01355f5e13523e916125d5005 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(sf) | |
library(jpndistrict) | |
library(stringr) | |
library(ggplot2) | |
# 札幌市 | |
sapporo <- jpn_cities(jis_code = sprintf("%05d", 1101:1110)) | |
ggplot(sapporo) + | |
geom_sf(aes(fill = city_code)) + | |
scale_fill_discrete(name = "区", | |
labels = str_remove(sapporo$city, "札幌市 ")) + | |
theme_bw(base_family = "IPAexGothic") | |
# 函館市 | |
hakodate <- jpn_cities(jis_code = "01202") | |
ggplot(hakodate) + | |
geom_sf(aes(fill = city)) + | |
theme_bw(base_family = "IPAexGothic") | |
# 大垣市 | |
oogaki <- jpn_cities(jis_code = "21202") | |
ggplot(oogaki) + | |
geom_sf(fill = "green") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment