【R】都道府県別 生茶出荷量
2020年1月26日
農林水産省が公表している 作物統計調査 から平成29年(2017年)都道府県別の生茶出荷量を地図に描画します。出荷量が不明の都道府県は0にしています。
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$都道府県, 出荷量t=dat$生茶)
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=800, height=800)
par(family="JP4")
library(NipponMap)
JapanPrefMap(datc_mcol, main="平成29年 都道府県別 生茶出荷量 t (農林水産省より) ")
legend("bottomright", fill=rainbow(length(levels(datc_m)), start = col_start, end=col_end), legend=names(table(datc_m)))
kable(table_df, align = "c") %>%
kable_styling(full_width = F) %>%
column_spec(1, bold = T) %>%
collapse_rows(columns = 1, valign = "middle")

| 都道府県 | 出荷量t |
|---|---|
| 北海道 | 0 |
| 青森 | 0 |
| 岩手 | 0 |
| 宮城 | 0 |
| 秋田 | 0 |
| 山形 | 0 |
| 福島 | 0 |
| 茨城 | 0 |
| 栃木 | 0 |
| 群馬 | 0 |
| 埼玉 | 3280 |
| 千葉 | 0 |
| 東京 | 0 |
| 神奈川 | 0 |
| 新潟 | 0 |
| 富山 | 0 |
| 石川 | 0 |
| 福井 | 0 |
| 山梨 | 0 |
| 長野 | 0 |
| 岐阜 | 0 |
| 静岡 | 140700 |
| 愛知 | 4250 |
| 三重 | 29000 |
| 滋賀 | 0 |
| 京都 | 14200 |
| 大阪 | 0 |
| 兵庫 | 0 |
| 奈良 | 7060 |
| 和歌山 | 0 |
| 鳥取 | 0 |
| 島根 | 0 |
| 岡山 | 0 |
| 広島 | 0 |
| 山口 | 0 |
| 徳島 | 0 |
| 香川 | 0 |
| 愛媛 | 0 |
| 高知 | 0 |
| 福岡 | 9730 |
| 佐賀 | 5210 |
| 長崎 | 3580 |
| 熊本 | 6270 |
| 大分 | 0 |
| 宮崎 | 18000 |
| 鹿児島 | 128500 |
| 沖縄 | 0 |
もう圧倒的に静岡です。意外と生産していない都道府県が多いです。
出典:農林水産省 2017年 作物統計調査 平成29年産野菜生産出荷統計