Closed mtango99 closed 3 years ago
Maybe this hint helps with fig5: to refer to the new attribute we calculated for diff
, use fig5comp["diff"]
based on the stars subset operator guide here: https://r-spatial.github.io/stars/articles/stars1.html
I haven't investigated FID 15, but here are three guesses:
1) does it now fall outside of the range of values you're mapping
2) does it have an invalid geometry?
3) did it not have an invalid or out of range value in either the vulnerability analysis you ran or in the QGIS digitizing?
Thanks! It worked: write_stars(fig5comp["diff"], here("data","derived","public","fig5comp.tif"))
aha, probably write_stars
was going with the first attribute by default, which was rp
, your reproduction results. I added this hint to the final bit of code @ https://gis4dev.github.io/lessons/2021-04-23-correlation
Looks like FID 15 is one of 59 NULL values (from joining difference values to MWI_adm2 layer, thanks Evan for the idea).
My Figure 5 difference map looks exactly the same as my ta_capacity map-- except it's just on a different scale from 0-1.
And FID 15 disappeared from my Figure 4 difference map.
Any ideas?
edit: this was from exporting as geopackages and putting into R
Also whenever I try to make a codeblock and run it I get this error message: "[codeblock name] is not recognized as an internal or external command, operable program or batch file." Anyone else run into this? solution: first word should be "r"