fude

R-CMD-check CRAN status

fude is an R package for working with agricultural parcel boundaries published by Japan’s Ministry of Agriculture, Forestry and Fisheries (MAFF). It helps you read and filter Fude Polygon data, link parcels to agricultural community boundaries, and visualize the results. In Japanese, fude (筆) is a counter used for land parcels.

Installation

Install the released version from CRAN.

install.packages("fude")

To try the development version, install it from GitHub.

# install.packages("pak")
pak::pak("takeshinishimura/fude")

Read your own Fude Polygon data

library(fude)

Download data by prefecture

The example below downloads the 2026 Fude Polygon release for Ehime Prefecture using the 2025 agricultural community reference year. These are also the default years for automatic downloads.

d <- read_fude(pref = "愛媛県", year = 2026, rcom_year = 2025)
ls_fude(d)
#> # A tibble: 20 × 7
#>    name     issue_year local_government_cd     n pref_name city_name city_romaji
#>    <chr>         <int> <chr>               <int> <chr>     <chr>     <chr>      
#>  1 MB0001_…       2026 382019              70801 愛媛県    松山市    Matsuyama-…
#>  2 MB0001_…       2026 382027              43883 愛媛県    今治市    Imabari-shi
#>  3 MB0001_…       2026 382035              61431 愛媛県    宇和島市  Uwajima-shi
#>  4 MB0001_…       2026 382043              37612 愛媛県    八幡浜市  Yawatahama…
#>  5 MB0001_…       2026 382051              15174 愛媛県    新居浜市  Niihama-shi
#>  6 MB0001_…       2026 382060              60917 愛媛県    西条市    Saijo-shi  
#>  7 MB0001_…       2026 382078              37354 愛媛県    大洲市    Ozu-shi    
#>  8 MB0001_…       2026 382108              28586 愛媛県    伊予市    Iyo-shi    
#>  9 MB0001_…       2026 382132              34238 愛媛県    四国中央市…… Shikokuchu…
#> 10 MB0001_…       2026 382141              73033 愛媛県    西予市    Seiyo-shi  
#> 11 MB0001_…       2026 382159              17511 愛媛県    東温市    Toon-shi   
#> 12 MB0001_…       2026 383562               2200 愛媛県    上島町    Kamijima-c…
#> 13 MB0001_…       2026 383864              17504 愛媛県    久万高原町…… Kumakogen-…
#> 14 MB0001_…       2026 384011               7228 愛媛県    松前町    Matsumae-c…
#> 15 MB0001_…       2026 384020               5867 愛媛県    砥部町    Tobe-cho   
#> 16 MB0001_…       2026 384224              27261 愛媛県    内子町    Uchiko-cho 
#> 17 MB0001_…       2026 384429              23217 愛媛県    伊方町    Ikata-cho  
#> 18 MB0001_…       2026 384844               9017 愛媛県    松野町    Matsuno-cho
#> 19 MB0001_…       2026 384887              16607 愛媛県    鬼北町    Kihoku-cho 
#> 20 MB0001_…       2026 385069              22847 愛媛県    愛南町    Ainan-cho

Read a local ZIP archive

read_fude() reads ZIP archives containing GeoJSON or FlatGeobuf files. For a split archive, keep all parts in the same directory and pass the path to the first part (.zip.001).

d <- read_fude("~/MB0001_2026_2025_38.zip.001")

MAFF provides GeoJSON format (https://open.fude.maff.go.jp) and FlatGeobuf format (https://www.maff.go.jp/j/tokei/census/shuraku_data/2025/mb/) on its Japanese-language data pages.

To save a merged ZIP separately, use merge_split_zip().

merge_split_zip("~/MB0001_2026_2025_38.zip.001")
#> Merging: MB0001_2026_2025_38.zip.001
#> Merging: MB0001_2026_2025_38.zip.002
#> Merging: MB0001_2026_2025_38.zip.003
#> Merging: MB0001_2026_2025_38.zip.004
#> Merging: MB0001_2026_2025_38.zip.005
#> Merge complete: ~/MB0001_2026_2025_38.zip

Use extract_fude() to filter parcels by municipality. With community keys in the data, you can also filter by former municipality (kcity) or agricultural community (rcom).

gogoshima <- extract_fude(d, city = "松山市", kcity = "興居島")

Use get_boundary() to download community boundaries for the prefectures represented in d. Set rcom_year to match the reference year of the parcel data. If you have already downloaded the boundary ZIP files, pass their directory as path.

b <- get_boundary(d, rcom_year = 2025)
# b <- get_boundary(d, path = "~")

combine_fude() links parcels to the selected agricultural communities. The example below maps parcels in eight communities on Gogoshima, Matsuyama.

library(ggplot2)

map_data <- combine_fude(d, b, city = "松山市", rcom = "由良|北浦|鷲ケ巣|門田|馬磯|泊|御手洗|船越")

ggplot(map_data$fude) +
  geom_sf(aes(fill = rcom_name), alpha = 0.8) +
  guides(fill = guide_legend(reverse = TRUE, title = "興居島の集落別耕地")) +
  theme_void() +
  theme(
    legend.position = "bottom",
    text = element_text(family = "Hiragino Sans")
  )

Source: Created by processing data from the Ministry of Agriculture, Forestry and Fisheries, “Fude Polygon Data (released in FY 2026)” and “Agricultural Community Boundary Data (FY 2025)”.

Explore the map interactively

shiny_fude() uses the optional packages shiny, leaflet, and DT. To launch the viewer in an interactive R session, uncomment the last line.

viewer <- shiny_fude(map_data, rcom = TRUE)
shiny::shinyApp(ui = viewer$ui, server = viewer$server)

Join MAFF statistics to community boundaries

read_ikasudb() joins an Excel or CSV table to agricultural community boundaries by community key. The example uses an Ehime table with a 2020 community reference year, so it requests 2020 boundaries. Download the Excel file from 地域の農業を見て・知って・活かすDB and adjust the local file path.

b1 <- get_boundary("愛媛県", rcom_year = 2020)
# b2 <- get_boundary(d, rcom_year = 2020, boundary_type = 2)
# b3 <- get_boundary(d, rcom_year = 2020, boundary_type = 3)
library(dplyr)
library(ggplot2)

community_stats <- b1 |>
  read_ikasudb("~/IA0001_2023_2020_38.xlsx") |>
  mutate(
    地域類型1次分類 = factor(
      地域類型1次分類,
      levels = 1:4,
      labels = c("都市的地域", "平地農業地域", "中間農業地域", "山間農業地域")
    )
  )

ggplot(community_stats) +
  geom_sf(aes(fill = 地域類型1次分類)) +
  scale_fill_brewer(palette = "BuGn", na.translate = FALSE) +
  theme_void() +
  theme(text = element_text(family = "Hiragino Sans"))

Source: `Created by processing data from the Ministry of Agriculture, Forestry and Fisheries, “Agricultural Community Boundary Data (FY 2020)”.