measure_vector_kgc()
counts the Köppen-Geiger climate classification
in the range cropped with raster_kgc()
, and calculates the basic spatial
features of a vector geometry such as perimeter and area.
quantify_vector_kgc()
, in addition, summarizes the counts.
Examples
geom = rnaturalearth::ne_countries(country = "Japan") |> sf::st_geometry()
measure_vector_kgc(geom)
#> $kgc
#> [1] 0 0 0 0 0 0 0 0 3637 307 0 0 0 0 0
#> [16] 0 0 31 1689 150 0 0 0 0 0 0 0 0 0 0
#> [31] 0 151
#>
#> $perimeter
#> [1] 6474035
#>
#> $area
#> [1] 404420164917
#>
quantify_vector_kgc(geom)
#> perimeter area abundance richness idx_shannon idx_simpson
#> 1 6474035 404420164917 5814 5 0.9301313 0.4791999
#> idx_brillouin
#> 1 0.927681