The data set rotmilan.gpkg originates from a larger research project of the Sempach Ornithological Institute which can be accessed via the platform movebank platform (see Scherler 2020). This is a single individual that has been fitted with a transmitter since 2017 and is travelling across the whole of Central Europe. In this exercise, we only work with the data points that were recorded in Switzerland. If you would like to analyse the entire data set, you can download it via the Movebank link.
To calculate the a 2D Kernel over our data, use the function density from the R package spatstat.
Note
x, the point pattern, needs to be of class ppp. Use the function as.ppp to convert our red kite dataeps is an argument passed on to as.maks to determine the output resolution / pixel size. Choose a reasonable size (not too pixelated, not to slow in computing)im) to a raster using the function terra::rastsigma and choose a reasonable parametersigma: bw.diggle, bw.CvL, bw.scott and bw.ppl.Thiessen polygons offer an alternative for visualising differences in the density distribution of point data sets. You can create these using the function sf::st_voronoi.
Note
MULTIPOINT using the function sf::st_union.st_voronoi takes an envelope argument, however this only takes effect when it is larger than the default envelope. Use sf::st_intersection to clip your output to the boundary of switzerland.