bcgov / bcgov/bccamtrap

Relative Activity Index (RAI) - Update/Fix required

Open
#34 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

**RAI equation**

- RAI is a standardized calculation of relative activity over a set period of time, typically 100 trap days.
- It looks like the RAI being generated in the script is **total count / trap days** as opposed to **(total count * 100) / trap days**, with the 100 being the standardized trap days.
- This is why we're getting rai values as a proportion of 1 instead of whole numbers (see below).
![thumbnail_image](https://github.com/bcgov/bccamtrap/assets/166165197/a0e92da4-7579-412f-a4d3-4a98189a5327)

**total_rai_by_year function**

The scale of the ggplot graph produced by this function doesn't make sense since rai is currently being calculated as a proportion of 1.
![thumbnail_image](https://github.com/bcgov/bccamtrap/assets/166165197/15db49a5-614a-453a-8fd4-39fae1ca1329)

- Examining the data via **View(total_rai_by_year)** it appears that the entire deployment is only being assigned 1 trap day so the rai value being calculated is actually just a count total by deployment per month.
- That is why the J7_2023105 value for 2023 in the table below is so high (270), its the total count.
- If we assume one trap day between January 1 2023 and October 5 2023 (277) then using the rai equation mentioned above ((total count * 100)/trap days) that rai value should read: (270*100)/277 = 97.5
![thumbnail_Outlook-p3vm1oi1](https://github.com/bcgov/bccamtrap/assets/166165197/eb464815-ceed-4701-9058-2004253ff950)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.