Skip to contents

extract_fude() extracts a subset of Fude Polygon data returned by read_fude() by year, municipality, former municipality, and/or agricultural community.

Usage

extract_fude(data, year = NULL, city = NULL, kcity = "", rcom = "")

Arguments

data

A Fude Polygon data object returned by read_fude(). data may be a single data frame or a list of data frames.

year

A numeric vector of issue years to extract. If NULL, all years are kept.

city

A character vector of municipality names or local government codes used to identify target municipalities. If NULL, all municipalities are kept.

kcity

A character vector of regular expression patterns used to match former municipality names in Japanese.

rcom

A character vector of regular expression patterns used to match agricultural community names in Japanese.

Value

A data frame containing the extracted subset, returned as an sf::sf() object for spatial input.

Details

The community key column name is matched case-insensitively and standardized to key. Keys are stored as ten-character strings, with leading zeros restored for numeric keys and blank values treated as missing. Community names are looked up using each parcel's rcom_year, with 2020 used when that year is missing. Multiple key columns in a layer or a nonblank key with an invalid format cause an error.

Parcels without a community key can only be filtered by municipality code. A warning is issued if kcity or rcom is specified and the result includes these parcels. Use combine_fude() with community boundaries for spatial matching of parcels without keys.