Skip to content

Instantly share code, notes, and snippets.

View ymattu's full-sized avatar

Yuya MATSUMURA ymattu

View GitHub Profile
@uribo
uribo / jp_chome_boundary.R
Created July 14, 2017 00:08
国勢調査 小地域 Shapefileのダウンロード
library(RSelenium)
library(sf)
library(leaflet)
select_pref <- function(target) {
jpndistrict::jpnprefs %>%
dplyr::select(code = jis_code, pref = prefecture) %>%
dplyr::filter(code == target | pref == target)
}
select_city <- function(ch_elm = childElems3, target = NULL) {
@kos59125
kos59125 / kansuuji.R
Last active January 15, 2020 20:44
漢数字を数値に変換する
kansuuji <- function(x) {
# 漢字から数値へのマッピング
# 万未満の位
map_low <- c(
= 0, 一 = 1, 二 = 2, 三 = 3, 四 = 4,
= 5, 六 = 6, 七 = 7, 八 = 8, 九 = 9,
= 10, 百 = 100, 千 = 1000
)
# 万以上の位
map_up <- c(