You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are two errors recently encountered when running CalculateAll() during the pressures calculation, and how we troubleshooted them. Both errors were due to data layers that were missing from the layers/ folder or not registered to layers.csv because it was not obvious that the Toolbox would need them. We try to improve the ohicore code to safe-guard against these sorts of problems but as a general guide, please do not remove layers from layers.csv from the spatial or weighting categories.
This error was because of three layers that were not registered in layers.csv or saved to the layers/ folder:
element_wts_cs_km2_x_storage
element_wts_cp_km2_x_protection
element_wts_hab_pres_abs
These layers are a bit confusing (and honestly, a bit unideal), but important for goals that have data for specific elements within them (in this case, habitats). These layers exist as .csv files but are actually blank except for the headers. They are calculated from within the CS, CP, and HAB goal models in functions.R and saved as an object for calculations but not as a .csv (because they will be overwritten each time CalculateAll is run.
The error was fixed by adding these (headers-only) csv files back to the layers/ folder and registering them in layers.csv.
We have also updated ohicore to include warning messages to warn for the need for these files in the future.
The text was updated successfully, but these errors were encountered:
Here are two errors recently encountered when running
CalculateAll()
during the pressures calculation, and how we troubleshooted them. Both errors were due to data layers that were missing from thelayers/
folder or not registered tolayers.csv
because it was not obvious that the Toolbox would need them. We try to improve theohicore
code to safe-guard against these sorts of problems but as a general guide, please do not remove layers fromlayers.csv
from thespatial
orweighting
categories.1. Error in UseMethod("select_")
This error turned out to be due to the
rgn_global
layer not being registered. Adding this back tolayers.csv
fixed this error.2. Error in filter_impl(.data, quo)
This error was because of three layers that were not registered in
layers.csv
or saved to thelayers/
folder:element_wts_cs_km2_x_storage
element_wts_cp_km2_x_protection
element_wts_hab_pres_abs
These layers are a bit confusing (and honestly, a bit unideal), but important for goals that have data for specific elements within them (in this case, habitats). These layers exist as .csv files but are actually blank except for the headers. They are calculated from within the CS, CP, and HAB goal models in
functions.R
and saved as an object for calculations but not as a.csv
(because they will be overwritten each timeCalculateAll
is run.The error was fixed by adding these (headers-only) csv files back to the
layers/
folder and registering them inlayers.csv
.We have also updated
ohicore
to include warning messages to warn for the need for these files in the future.The text was updated successfully, but these errors were encountered: