-
Notifications
You must be signed in to change notification settings - Fork 3
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
create file similar to camtrapR's recordTable #36
Comments
I think it would be better to write a function which transforms a camtrap datapackage in a camtrapR-like input (recordTable and camOp). See jniedballa/camtrapR#14 In this way you can continue to work with camtrapR, which is the eind goal of this work in this package: developing something, testing it thouroughly and then trying to adding it in an existing package, ideally camtrapR. |
@damianooldoni : isn't that the same as what I was saying? write one (or two) functions in camtrapdp to create a recordTable and camOp like object for further use in camtrapR ? |
If recordTable and camOp are all we need to fully map a camtrap datapackage to be used in camtrapR, then yes, it's the same. 👍 |
Based on https://jniedballa.github.io/camtrapR/articles/camtrapr3.html, I will document here the mapping of the output of
To derive library(dplyr)
obs <- camtrapdp$observations
obs <- obs %>%
filter(!is.na(scientific_name)) %>%
group_by(scientific_name, location_name) %>%
arrange(timestamp) %>%
mutate(delta.time = lead(timestamp) - timestamp) Once we have obs <- obs %>%
mutate(delta.time.secs = as.numeric(delta.time)) %>%
mutate(delta.time.minutes = delta.time.secs/60) %>%
mutate(delta.time.hours = delta.time.minutes/60) %>%
mutate(delta.time.days = delta.time.hours/24) %>%
select(delta.time.days) @peterdesmet: could you please give a look, I think this mapping it's quite smooth, but maybe I am missing something. In the meantime I will go further studying the mapping of |
@damianooldoni |
Thanks @jimcasaer. I have just replaced |
@peterdesmet: while calculating the camera operation matrix, camtrapR package makes a distinction among camera(s) not set up (value NA) and camera(s) not operational (value 0). I wonder whether we have such a distinction in cameratrap datapackage standard. |
@jimcasaer are there ever deployments created that did not result in photos (i.e. because the camera turned out to be defunct). Are there deployments were the camera malfunctioned halfway? @damianooldoni the short answer I think is that we have no structured or unstructured information on malfunctioning cameras. |
Some remarks:
|
About I will check further what best for fields |
in the GMU 8 project, the same 'location'/'gridcel' is visited twice a year, however, the exact location can change between surveys, therefore, the location_id changes (cameras are moved - 6 months interval). The location_name in this project includes both the year, the survey and the grid cell (e.g. 2018_4_1062). For detection histories and multiseason occupancy models revisiting the same grid cell is the issue - therefore location, in this case, equals the grid cell and we often first create a new column called 'grid'. In many other projects (surely if camera's do not move between deployments) -- location_name does reflect the location of the camera and can be used to specify the 'station'. I would suggest to use as a default in this function the location_name but allow users to specify another column. |
@jimcasaer so it is by design (and a bit of an exception) in GMU8 that locations that are revisited do not get the same |
Any discussion about camOps should be posted in the new issue #44. This issue will be reserved for |
This issue can be closed as a record table can be generated now via this package. For any improvement, please open a new issue. |
An important feature of camtrapR is that it creates a detection history that can be used as an input for occupancy modelling in the unmarked package.
To do this the detectionHistory command is used in camtrapR
This command uses two objects
=> given this functionality and the use of camtrapR by many users it would be good to create two function in camtrapdp
all information can be found here: https://cran.r-project.org/web/packages/camtrapR/index.html
The text was updated successfully, but these errors were encountered: