I'm trying to calculate the sum of certain responses in a repeat. I am able to successfully sum all the responses in a repeat thanks to this post. But I have not figured out how to sum certain responses from a repeat.
This specific group of repeats is for invasive species, and the percent coverage is displayed as a category. The data collection method preceded my arrival so I cannot change anything as it is a long term dataset. So behind the scenes the percentage category is really an integer. See below.
The data analysis part calculates the sum of coverage for 4 invasive species out of the many. So a coverage of 1-4% of Eleagnus, and 25-49% of Microstigeum would sum to 4. I've arranged the four species of interest at the top of the list because these are chosen the most.
| 1 | 1-4% |
| 2 | 5-24% |
| 3 | 25-49% |
| 4 | 50-74% |
| 5 | 75-100% |
I've tried selected() but being boolean it doesn't help. I've looked into index repeats, but it doesn't seem to fit either. According to my pomodoro tracker I've spent 17.5 hrs trying to search for what I'm trying to do if it's possible. I've attached abridged CSV for the survey and an abridged exotic species list. The latter includes the top four choices and a few non-choices for the sum. The survey CSV shows in orange what I was last using.
Side note: If anyone is curious about the table formatting using join and concat to view as a table the responses in repeats below a repeat see here. It's great for viewing for vegetation surveys using select_one in the repeat.