総務省統計局が発表している「都道府県・市区町村のすがた(社会・人口統計体系)」から、都道府県別の劇場・音楽堂等数を表示します。2015年のデータです。
| 都道府県 |
劇場_音楽堂等数 |
| 北海道 |
73 |
| 青森 |
21 |
| 岩手 |
27 |
| 宮城 |
40 |
| 秋田 |
23 |
| 山形 |
19 |
| 福島 |
36 |
| 茨城 |
37 |
| 栃木 |
31 |
| 群馬 |
40 |
| 埼玉 |
75 |
| 千葉 |
55 |
| 東京 |
125 |
| 神奈川 |
71 |
| 新潟 |
50 |
| 富山 |
31 |
| 石川 |
31 |
| 福井 |
22 |
| 山梨 |
22 |
| 長野 |
46 |
| 岐阜 |
48 |
| 静岡 |
57 |
| 愛知 |
77 |
| 三重 |
34 |
|
| 都道府県 |
劇場_音楽堂等数 |
| 滋賀 |
36 |
| 京都 |
33 |
| 大阪 |
69 |
| 兵庫 |
68 |
| 奈良 |
32 |
| 和歌山 |
19 |
| 鳥取 |
15 |
| 島根 |
20 |
| 岡山 |
38 |
| 広島 |
46 |
| 山口 |
35 |
| 徳島 |
14 |
| 香川 |
15 |
| 愛媛 |
26 |
| 高知 |
14 |
| 福岡 |
81 |
| 佐賀 |
18 |
| 長崎 |
37 |
| 熊本 |
30 |
| 大分 |
22 |
| 宮崎 |
25 |
| 鹿児島 |
47 |
| 沖縄 |
20 |
|
|
library(leaflet)
library(knitr)
library(kableExtra)
library(dplyr)
library(tidyr)
library(stringr)
dat <- read.csv("http://www.dinov.tokyo/Data/JP_Pref/Pref_data.csv", header = TRUE, fileEncoding="UTF-8")
col_start <- 0.2
col_end <- 0.0
table_df<-data.frame(都道府県=dat$都道府県, 劇場_音楽堂等数=dat$劇場_音楽堂等数)
datc_k <- cut(dat$劇場_音楽堂等数, hist(dat$劇場_音楽堂等数, plot=FALSE)$breaks, right=FALSE)
datc_kcol <- rainbow(length(levels(datc_k)), start = col_start, end=col_end)[as.integer(datc_k)]
windowsFonts(JP4=windowsFont("Biz Gothic"))
windows(width=800, height=800)
par(family="JP4")
library(NipponMap)
windowsFonts(JP4=windowsFont("Biz Gothic"))
windows(width=800, height=800)
png("0plot1.png", width = 800, height = 800)
par(family="JP4")
JapanPrefMap(datc_kcol, main="劇場・音楽堂等数")
legend("bottomright", fill=rainbow(length(levels(datc_k)), start = col_start, end=col_end), legend=names(table(datc_k)))
dev.off()
library(clipr)
t1=kable(table_df[c(1:24),], align = "c", row.names=FALSE) %>%
kable_styling(full_width = F) %>%
column_spec(1, bold = T) %>%
collapse_rows(columns = 1, valign = "middle")
t2=kable(table_df[c(25:47),], align = "c", row.names=FALSE) %>%
kable_styling(full_width = F) %>%
column_spec(1, bold = T) %>%
collapse_rows(columns = 1, valign = "middle")
paste(c('<table><tr valign="top"><td>', t1, '</td><td>', t2, '</td><tr></table>'), sep = '') %>% write_clip