【R】都道府県別 労働災害
2020年4月8日
総務省統計局が発表している「統計でみる都道府県のすがた2020」から、都道府県別の労働災害発生の頻度と労働者災害補償保険給付率(%、対適用労働者数)を表示します。2017年のデータです。
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$労働災害発生頻度, 労働者災害補償保険給付率=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)]
datc_m <- cut(dat$労働者災害補償保険給付率, hist(dat$労働者災害補償保険給付率, plot=FALSE)$breaks, right=FALSE)
datc_mcol <- rainbow(length(levels(datc_m)), start = col_start, end=col_end)[as.integer(datc_m)]
windowsFonts(JP4=windowsFont("Biz Gothic"))
windows(width=1600, height=800)
par(family="JP4")
layout(matrix(1:2, 1, 2))
library(NipponMap)
JapanPrefMap(datc_kcol, main="労働災害発生の頻度")
legend("bottomright", fill=rainbow(length(levels(datc_k)), start = col_start, end=col_end), legend=names(table(datc_k)))
JapanPrefMap(datc_mcol, main="労働者災害補償保険給付率 %(対適用労働者数)")
legend("bottomright", fill=rainbow(length(levels(datc_m)), start = col_start, end=col_end), legend=names(table(datc_m)))
library(clipr)
kable(table_df, align = "c") %>%
kable_styling(full_width = F) %>%
column_spec(1, bold = T) %>%
collapse_rows(columns = 1, valign = "middle") %>%
write_clip

| 都道府県 | 労働災害発生頻度 | 労働者災害補償保険給付率 |
|---|---|---|
| 北海道 | 2.80 | 11.9 |
| 青森 | 1.08 | 6.3 |
| 岩手 | 1.59 | 6.8 |
| 宮城 | 1.85 | 7.3 |
| 秋田 | 1.35 | 5.6 |
| 山形 | 1.25 | 7.6 |
| 福島 | 1.65 | 6.0 |
| 茨城 | 1.65 | 5.9 |
| 栃木 | 1.01 | 5.5 |
| 群馬 | 1.85 | 6.7 |
| 埼玉 | 2.27 | 7.7 |
| 千葉 | 2.07 | 7.8 |
| 東京 | 1.48 | 2.8 |
| 神奈川 | 1.78 | 6.6 |
| 新潟 | 1.77 | 7.0 |
| 富山 | 1.17 | 5.7 |
| 石川 | 1.31 | 5.4 |
| 福井 | 1.63 | 6.0 |
| 山梨 | 1.21 | 6.2 |
| 長野 | 1.78 | 6.1 |
| 岐阜 | 1.38 | 7.0 |
| 静岡 | 1.61 | 6.8 |
| 愛知 | 1.20 | 4.9 |
| 三重 | 1.27 | 7.7 |
| 滋賀 | 1.75 | 8.5 |
| 京都 | 2.25 | 6.9 |
| 大阪 | 1.60 | 5.6 |
| 兵庫 | 1.55 | 7.8 |
| 奈良 | 2.20 | 9.8 |
| 和歌山 | 2.78 | 9.2 |
| 鳥取 | 1.40 | 6.0 |
| 島根 | 2.79 | 6.8 |
| 岡山 | 1.49 | 7.2 |
| 広島 | 1.52 | 7.8 |
| 山口 | 1.10 | 6.7 |
| 徳島 | 1.58 | 8.9 |
| 香川 | 1.57 | 6.9 |
| 愛媛 | 1.31 | 10.5 |
| 高知 | 2.69 | 16.1 |
| 福岡 | 1.39 | 6.7 |
| 佐賀 | 2.35 | 8.8 |
| 長崎 | 1.60 | 9.9 |
| 熊本 | 2.46 | 7.5 |
| 大分 | 2.01 | 10.5 |
| 宮崎 | 1.64 | 12.7 |
| 鹿児島 | 2.12 | 9.3 |
| 沖縄 | 2.44 | 4.7 |