Skip to contents

Drawing Agricultural Community Boundaries

This package may be beneficial, especially for R beginners, when simply wanting to draw agricultural community boundaries.

library(dplyr)
library(ggplot2)
library(gghighlight)
library(ggrepel)

db <- combine_fude(d, b, city = "西予市", old_village = "遊子川")

ggplot() +
  geom_sf(data = db$pref, fill = NA) +
  geom_sf(data = db$lg, fill = "gray") +
  gghighlight(fill == 1,
    unhighlighted_params = list(
      alpha = .05
    )) +
  geom_sf(data = db$ov |> filter(fill == 1), fill = "black") +
  geom_sf_text(data = db$lg |> filter(fill == 1),
               aes(label = city_kanji),
               size = 3,
               nudge_x = -.025, nudge_y = -.025,
               family = "HiraKakuProN-W3") +
  geom_point(data = db$community_union, aes(x = x, y = y), colour = "black") +
  geom_text_repel(data = db$community_union,
                  aes(x = x, y = y),
                  label = "遊子川地区",
                  nudge_x = .3, nudge_y = -.025,
                  segment.color = "black",
                  size = 3,
                  family = "HiraKakuProN-W3") +
  theme_void()

出典:農林水産省「筆ポリゴンデータ(2022年度公開)」および「農業集落境界データ(2022年度)」を加工して作成。

db <- combine_fude(d, b, city = "八幡浜市", old_village = "真穴")

ggplot(data = db$community) +
  geom_sf(data = db$lg |> filter(fill == 1), fill = "gray") +
  geom_sf_text(data = db$lg |> filter(fill == 1), aes(label = city_kanji), family = "HiraKakuProN-W3") +
  geom_sf(fill = "ivory") +
# geom_sf(data = db$fude, aes(fill = land_type), colour = NA) +
  geom_sf_label(aes(label = RCOM_NAME), family = "HiraKakuProN-W3") +
  theme_void() +
  theme(legend.position = "none")

出典:農林水産省「筆ポリゴンデータ(2022年度公開)」および「農業集落境界データ(2022年度)」を加工して作成。