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

Add verbose in get_dep_no_obs() #356

Closed
Rafnuss opened this issue Jan 3, 2025 · 5 comments
Closed

Add verbose in get_dep_no_obs() #356

Rafnuss opened this issue Jan 3, 2025 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@Rafnuss
Copy link
Collaborator

Rafnuss commented Jan 3, 2025

When using get_*() and map_dep() with a species filter, it is expected that some of my deployements won't have any observations of this species. I find the list of deployements display unecessary and suggest to have a verbose argument to the function.

> get_rai(pkg, species = "Suni")
There are 103 deployments without observations: 2022-05-13_L5_c10, 2020-11-10_K3_c05, 2021-06-26_I6_c09, 2020-08-29_G8_c09, 2021-04-25_F4_c01, 2020-08-29_H9_c03, 2020-01-14_I7_C10, 2022-02-27_K5_c09, 2021-09-03_C2_c10, 2022-05-13_M5_c09, 2019-11-07_k7_C01, 2019-08-23_j8_c03, 2020-01-13_h8_c07, 2021-06-26_K7_c05, 2019-04-17_i9_C09, 2022-02-26_D5_c01, 2020-01-14_J7_C09, 2020-05-27_G4_c10, 2019-09-21_h7_C07, 2020-05-28_H4_c09 and others..
@damianooldoni
Copy link
Member

The get_*() functions, such as the map_dep() are getting a new shape, see my comment see my comment #351 (comment). and #314. Still, your idea is good 👍 I think we should control the verbosity at package level instead of function level, as described in this nice rOpenSci blogpost. Notice also that the pred_*() functions will be not present anymore in camtraptor v1.0 as they are replaced by the reexported camtrapdp's function filter_deployments(). They are returning also some messages.

So, we will get something like this at the moment using version-1.0 branch of camtraptor:

# Load dev version of camtraptor (branch version-1.0)
library(camtraptor)

# Load example dataset
x <- example_dataset()
# Filter deployments
x %>% filter_deployments(latitude > 100)
#> A Camera Trap Data Package with 3 tables:
#> • deployments: 0 rows
#> • media: 0 rows
#> • observations: 0 rows
#> 
#> And 1 additional resource:
#> • individuals
#> Use `unclass()` to print the Data Package as a list.

Created on 2025-01-06 with reprex v2.1.1

Notice that we get now the printed message as returned by camtrapdp R package. I think your idea of setting a verbosity control, is also a valid enhancement for camtrapdp R package as well. I will create an issue for it mentioning this one.

@damianooldoni damianooldoni added the enhancement New feature or request label Jan 6, 2025
@damianooldoni damianooldoni added this to the v1.x milestone Jan 6, 2025
@damianooldoni
Copy link
Member

As mentioned in PR #357, I think it's better to implement this at later stage after release of camtraptor 1.0. Something for camtraptor 1.1.

@Rafnuss
Copy link
Collaborator Author

Rafnuss commented Jan 6, 2025

Thanks for sharing the blogpost! Intresting to read and some food for thought on my side!

@peterdesmet
Copy link
Member

From inbo/camtrapdp#152 (comment):

My main point was just to say that when filtering by species, it seems logical that some deployements won't have any observations and I don't think that this info deserved to be outputed to the user.

Conclusion: no action needs to be taken on verbosity control at the moment, since camtraptor 1.0 will rely on camtrapdp's filter_ functions. Those functions do not message the user that there are deployments without observations, which is the desired behaviour.

@damianooldoni
Copy link
Member

Added a general issue based on the conversation here, see #358. We can close this specific one as the camtrapdp's filter_*() functions do not return info about deployments with no observations. The automatically printing output doesn't seem to be a real issue.

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