jcoliver / biodiversity-sdm-lesson

Introductory lesson to generate range maps for butterfly-host plant interactions and predict distributional shifts using publicly available biodiversity data and data science tools
MIT License
14 stars 5 forks source link

Fix StackTwoRasters #21

Open jcoliver opened 1 month ago

jcoliver commented 1 month ago

Output raster is messed up. Example from A. californica:

image

Image comes from scripts/examples/Adelpha_californica-sdm-pairwise.R; butterfly and plant rasters are fine (print the outputs from these two lines to see):

butterfly_raster <- SDMRaster(data = butterfly_data)
plant_raster <- SDMRaster(data = plant_data)
jcoliver commented 1 month ago

Quite idiosyncratic - only seems to come about when plotting contemporary model of A. californica + Q. chrysolepis. :thinking:

jcoliver commented 1 month ago

Try going through a terra::sprc()...?