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
Recently, the OHI+ Arctic (ARC) updated the goal function for NP. When running this function from within functions.r, it was fine. But when running CalculateAll(), it failed.
I investigated it and fixed it, here's my whole troubleshooting process:
From calculate_scores.r:
## run the configure_toolbox.r script to check configuration
source('~/github/arc/circle2016/configure_toolbox.r')
## calculate scenario scoresscores=ohicore::CalculateAll(conf, layers)
Running Setup()...CalculatingStatusandTrendforeachregionforFIS...CalculatingStatusandTrendforeachregionforMAR...CalculatingStatusandTrendforeachregionforAO...CalculatingStatusandTrendforeachregionforNP...Error:Unknowncolumns'goal', 'region_id', 'score'
This error happened in the NP goal function, and from the looks of it it has something to do with the scores variable, which I know should have column headers 'goal', 'region_id', 'dimension', and 'score'.
So I went into functions.r and started running the NP code line by line (which is possible since I already ran configure_toolbox.r):
...and everything worked. So I looked at the scores variable; it has only 3 columns
So I've reformatted scores: here are the commits: 839cd4ed and 6f960eb to see exactly how I fixed them line-by-line.
Now, it calculates everything except fails on the Pressures--the next step for ARC will be to make sure the Pressures Matrix represents ARC as it is now before that will work.
But the NP function in functions.r works! Nice job!!
The text was updated successfully, but these errors were encountered:
Recently, the OHI+ Arctic (ARC) updated the goal function for NP. When running this function from within
functions.r
, it was fine. But when running CalculateAll(), it failed.I investigated it and fixed it, here's my whole troubleshooting process:
From
calculate_scores.r
:This error happened in the NP goal function, and from the looks of it it has something to do with the scores variable, which I know should have column headers 'goal', 'region_id', 'dimension', and 'score'.
So I went into
functions.r
and started running the NP code line by line (which is possible since I already ranconfigure_toolbox.r
):...and everything worked. So I looked at the scores variable; it has only 3 columns
So I've reformatted scores: here are the commits: 839cd4ed and 6f960eb to see exactly how I fixed them line-by-line.
Now, it calculates everything except fails on the Pressures--the next step for ARC will be to make sure the Pressures Matrix represents ARC as it is now before that will work.
But the NP function in
functions.r
works! Nice job!!The text was updated successfully, but these errors were encountered: