Make either a histogram or boxplot showing the number of pixels in each polygon of an sf object
plot_resolution(
plot_type,
covariates,
shape,
resolution,
original_resolution = NULL
)
A plotly object
raster <- terra::rast(system.file("extdata", "covariates", "EVI.tif", package = "disagapp"))
shape <- sf::st_read(system.file("extdata", "shapes", package = "disagapp"))
#> Reading layer `mdg_shapes' from data source
#> `/home/runner/work/_temp/Library/disagapp/extdata/shapes' using driver `ESRI Shapefile'
#> Simple feature collection with 109 features and 16 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: 43.19138 ymin: -25.60895 xmax: 50.48378 ymax: -11.94543
#> Geodetic CRS: WGS 84
plot_resolution("histogram", raster, shape, "low")