Skip to contents

combine_fude() uses the agricultural community boundary data to reduce the Fude Polygon data to the community units.

Usage

combine_fude(data, boundary, city, community, year = NULL)

Arguments

data

List of sf::sf() objects.

boundary

List of one or more agricultural community boundary data provided by the MAFF.

city

A local government name in Japanese to be extracted. In the case of overlapping local government names, the prefecture name must be included (e.g., Fuchu-shi). Alternatively, it could be a local government code.

community

String by regular expression. One or more agricultural community name in Japanese to be extracted.

year

Year in the column name of the data, if there is more than one applicable local government code.

Value

A list of sf::sf() objects.

Examples

path <- system.file("extdata", "castle.zip", package = "fude")
d <- read_fude(path)
#> Reading layer `2021_382019' from data source 
#>   `/private/var/folders/33/1nmp7drn6c56394qxrzb2cth0000gn/T/RtmpXELmP2/file14e4d54d3d005/castle/2021_382019.json' 
#>   using driver `GeoJSON'
#> Simple feature collection with 1 feature and 6 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 132.7653 ymin: 33.84506 xmax: 132.7662 ymax: 33.84575
#> Geodetic CRS:  WGS 84
#> Reading layer `2022_382019' from data source 
#>   `/private/var/folders/33/1nmp7drn6c56394qxrzb2cth0000gn/T/RtmpXELmP2/file14e4d54d3d005/castle/2022_382019.json' 
#>   using driver `GeoJSON'
#> Simple feature collection with 1 feature and 6 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 132.7653 ymin: 33.84506 xmax: 132.7662 ymax: 33.84575
#> Geodetic CRS:  WGS 84
#> Reading layer `2022_382078' from data source 
#>   `/private/var/folders/33/1nmp7drn6c56394qxrzb2cth0000gn/T/RtmpXELmP2/file14e4d54d3d005/castle/2022_382078.json' 
#>   using driver `GeoJSON'
#> Simple feature collection with 1 feature and 6 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 132.541 ymin: 33.50931 xmax: 132.5415 ymax: 33.50966
#> Geodetic CRS:  WGS 84
b <- get_boundary(d)
#> options:        ENCODING=CP932 
#> Reading layer `rcom' from data source 
#>   `/private/var/folders/33/1nmp7drn6c56394qxrzb2cth0000gn/T/RtmpXELmP2/MA0001_2020_2020_38/rcom.shp' 
#>   using driver `ESRI Shapefile'
#> Simple feature collection with 3302 features and 11 fields
#> Geometry type: MULTIPOLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 132.0123 ymin: 32.88498 xmax: 133.6928 ymax: 34.30165
#> Geodetic CRS:  JGD2000
db <- combine_fude(d, b, "\u677e\u5c71\u5e02", "\u57ce\u6771", year = 2022)
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries