【R】都道府県別 かぼちゃ出荷量
2020年1月18日
					農林水産省が公表している 作物統計調査 から平成18年(2006年)都道府県別のかぼちゃ出荷量を地図に描画します。出荷量が不明の都道府県は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="平成18年 都道府県別 かぼちゃ出荷量 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 | 
|---|---|
| 北海道 | 94168 | 
| 青森 | 1437 | 
| 岩手 | 0 | 
| 宮城 | 0 | 
| 秋田 | 1185 | 
| 山形 | 0 | 
| 福島 | 1262 | 
| 茨城 | 8625 | 
| 栃木 | 1534 | 
| 群馬 | 0 | 
| 埼玉 | 0 | 
| 千葉 | 4057 | 
| 東京 | 216 | 
| 神奈川 | 3774 | 
| 新潟 | 0 | 
| 富山 | 0 | 
| 石川 | 1993 | 
| 福井 | 200 | 
| 山梨 | 330 | 
| 長野 | 0 | 
| 岐阜 | 0 | 
| 静岡 | 834 | 
| 愛知 | 1483 | 
| 三重 | 873 | 
| 滋賀 | 0 | 
| 京都 | 626 | 
| 大阪 | 0 | 
| 兵庫 | 0 | 
| 奈良 | 0 | 
| 和歌山 | 306 | 
| 鳥取 | 0 | 
| 島根 | 0 | 
| 岡山 | 2670 | 
| 広島 | 706 | 
| 山口 | 545 | 
| 徳島 | 0 | 
| 香川 | 0 | 
| 愛媛 | 1150 | 
| 高知 | 0 | 
| 福岡 | 0 | 
| 佐賀 | 470 | 
| 長崎 | 5167 | 
| 熊本 | 0 | 
| 大分 | 1213 | 
| 宮崎 | 4013 | 
| 鹿児島 | 12395 | 
| 沖縄 | 2357 | 
北海道が圧倒的に多いです。
出典:農林水産省 2006年 作物統計調査 平成18年産市町村別データ
 
																					