Closed mvisalli closed 5 years ago
Also @bbest did seascape values change from continuous to binary in reprojected versions?
When seascape indices change when reprojected, it messes up seascape numbering in scenario report. To address this I added this line: https://github.com/ecoquants/bbnj/blob/6758a09b91285644aa7e910e9857be25028fc7d8/inst/app/www/scenarios/s00c.bio.30pct.gl.mol50km.Rmd#L80
And changed the way seascapes are named in report. https://github.com/ecoquants/bbnj/blob/6758a09b91285644aa7e910e9857be25028fc7d8/inst/app/www/scenarios/s00c.bio.30pct.gl.mol50km.Rmd#L89
Probably a better/more elegant way to fix this but it seems to be working for an interim fix
Hi @mvisalli,
Good eye and fix on the class names getting jumbled!
Yes, I previously reported the amount of each class per half-degree cell since the original scapes raster is 0.1 º and I could aggregate to 0.5º:
But then with new projection-resolutions (pr
), there isn't a clean strategy for doing this, and instead:
prioritizr::binary_stack()
to split single raster of seascape class values to stack of rasters per class with binary 1 or 0 values
https://github.com/ecoquants/bbnj/blob/6758a09b91285644aa7e910e9857be25028fc7d8/data-raw/create_data.R#L564Got it, thanks!
Just flagging that seascape indices change when projected into mol_50km. e.g. calling seascape 5 returns seascape 3.
So subset by name i.e.