
転出入人口比率の高い市町村(福岡県)
転出入人口比率(OutOverIn)について。
```{r,echo=FALSE,include=FALSE}
for (i in 1:60) {
cat(dat$X2[i],"--",dat$OutOverIn[i],"\n")
}
```
```{r}
# データフレームを転出入人口比率の降順で並び替える
# 新しいオブジェクト名: OutOverIn
d <- arrange(dat,-OutOverIn)
```
```{r}
# 上位20を抜き出す
top20 <- d[1:20,]
top20[,c(1,2,28)]
```
```{r}
# 転出入人口比率(OutOverIn)の高い順に市町村名を並び替えて表示する
# ggplot2で作成
ggplot(top20,aes(x=OutOverIn,y=reorder(X2,OutOverIn)))+
geom_point(size=3,col="seagreen")+
labs(x="転出入人口率",y="市町村名",title="転出入人口比率の高い市町村",caption = "2015年")+
theme_minimal(base_family="HiraKakuProN-W3")
```