Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

number of observed animals (count individuals) #41

Closed
jimcasaer opened this issue May 30, 2021 · 10 comments
Closed

number of observed animals (count individuals) #41

jimcasaer opened this issue May 30, 2021 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@jimcasaer
Copy link
Collaborator

create a function to calculate the number of observed animals in a deployment (get_count() ?) or for a specific time interval (see #38)

rai could also be based on the number of observed animals rather than the number of observations (allow selection? )

@damianooldoni
Copy link
Member

I would call this function get_n_individuals() to maintain same syntax of other functions, especially the similar one, get_n_obs().

@damianooldoni damianooldoni changed the title number of observed animals number of observed animals (count individuals) Jun 2, 2021
@jimcasaer
Copy link
Collaborator Author

can this issue be closed ? @damianooldoni

@damianooldoni
Copy link
Member

I would prefer to leave it open as you mentioned in this issue a second requirement:

rai could also be based on the number of observed animals rather than the number of observations (allow selection? )

So, I was thinking to tackle this after tackling the filtering by age and sex for RAI as well (see inbo/camtrapdp#42 (comment))

@damianooldoni
Copy link
Member

Meanwhile, the more reasonable way to add the option of calculating RAI based on n_obs (via get_n_obs()) or n_individuals (via get_n_individuals()) is by a new argument; but how to call it? @peterdesmet: I need your help 🆘
Here below the best idea I have in mind, I hope it is enough to trigger your sisth sense for naming things:

get_rai(datapkg, species, by) # allowed values of by arg: one of "n_obs", "n_individuals"

@jimcasaer: should this new arg have a default value? In other words, do you use RAI more often by using the number of observations or the number of individuals or it's 50%-50%?

@jimcasaer
Copy link
Collaborator Author

why don't you cal it 'feature' as was done in the map_dep() ?
however if it is to much trouble we stick to n_obs for rai as this is the general rule in literature

@damianooldoni
Copy link
Member

That's also a good idea, @jimcasaer.

No, it's not so difficult to add this, no worries, just that it's good practice to wait 5 minutes about thinking about a good name than changing it afterwards as it is annoying for the users as they have to unlearn something.

@peterdesmet: what do you think?

get_rai(..., feature = "n_obs") # other possible value: "n_individuals"

I agree with @jimcasaer and I would prefer feature above my previous idea (by).

@peterdesmet
Copy link
Member

Don't know the context, but feature sounds more clarifying that by, so I support feature.

damianooldoni added a commit that referenced this issue Jun 3, 2021
@damianooldoni
Copy link
Member

damianooldoni commented Jun 3, 2021

One problem found just now: if we use feature as arg name in get_rai() it's impossible to say to map_dep() that we want to visualize RAI with number of individuals as feature = "rai"in map_dep(). Simply because the name of the argument is the same.

map_dep(camtrapdp, feature = "rai", ...) # how to pass feature = "n_individuals" to get_rai()???

We should avoid to reuse feature! Ideas for the name of the argument to use in get_rai()?

# one option
get_rai(..., n = "n_obs") #where is the common part between n_obs and n_individuals
# other option
get_rai(..., n_obs = TRUE, n_individuals = FALSE) # two args which if both TRUE or FALSE n_obs is used and warning returned

we should also find a good name to use in map_dep() as well, better if the same as in get_rai() of course.

@damianooldoni
Copy link
Member

The nights whispered a wise and simple solution: just splitting it in two functions, get_rai() and get_rai_individuals() which could be visualized via map_dep(feature = "rai") and map_dep(feature = "rai_individuals").

@jimcasaer
Copy link
Collaborator Author

I like the night :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants