Extract specified agricultural community boundary data
Source:R/extract_boundary.R
extract_boundary.Rdextract_boundary() extracts subsets of agricultural community boundary data
returned by get_boundary() by municipality, former municipality, and/or
agricultural community.
Arguments
- boundary
Boundary data returned by
get_boundary(), or ansf::sf()object or list of such objects with ten-character region keys.- 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.
- layer
Logical. If
TRUE, return a list containing extracted agricultural community boundaries together with former municipality, municipality, and prefecture boundary layers.
Details
Names are matched using the agricultural community reference year (rcom_year)
recorded in boundary. Use boundaries from a single reference year. If no
reference year is recorded, the 2020 lookup is used for compatibility.
With no search criteria, all supplied boundaries are returned. For filtered
searches, a coarser boundary can match when its region has no finer boundaries
in the input. Aggregated layers retain a recorded year when the contributing
features agree on it.