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

Read camtrap dp v1.0 rc.1 #223

Merged
merged 124 commits into from
Jul 20, 2023
Merged

Read camtrap dp v1.0 rc.1 #223

merged 124 commits into from
Jul 20, 2023

Conversation

damianooldoni
Copy link
Member

@damianooldoni damianooldoni commented Jul 12, 2023

This PR allows users to read camtrap data packages written using v1.0-rc.1 without affecting the other functions (i.e. non-breaking change). See issue discussion in #196. While working on this PR, I fixed two other minor issues spotted while helping @jimcasaer: see #218 and #217.

Notice that .observations data.frame could de different based on the Camtrap DP version. media and deployments are the same.

Minor issue: by writing the converting functions I introduced some NOTES while running package checks:

convert_media_to_0.1.6: no visible binding for global variable
    'deploymentID'
  convert_media_to_0.1.6: no visible global function definition for
    'between'
  convert_media_to_0.1.6: no visible binding for global variable 'x'
  convert_media_to_0.1.6: no visible binding for global variable 'y'

They don't seem easy to remove. I will check them later, but I think we can start the review process.

Fixes #217

Only interval related indo needs changes
Retrieve values from tags, comments otherwise. If not possible: set FALSE  to "none" and TRUE to "other".
Add assertion and test
And check that's supported
@damianooldoni
Copy link
Member Author

About taxonRank: it is not in example dataset v0.1.6, but still a valid field. If present, the previous version of read_camtrap_dp() added it to observations. More details in #196 (comment).

@damianooldoni
Copy link
Member Author

About speed, radius and angle: , I agree this three columns are not standard in v0.1.6, but I added them via patch end 2022 as they were requested by Marcus Rowcliffe. See #185. It sounds strange to remove them now. I would get again the same complaint. Unless, we allow them while reading datapackages formatted using v0.1.6, but not while reading datapackages formatted using v1.0-rc.1? IMO not really an optimal solution.

@damianooldoni
Copy link
Member Author

@peterdesmet: about your suggestion for the README, see a91a02a.

@damianooldoni
Copy link
Member Author

About message returning ignored terms, media.filePublic improved in 47ff332. I found also that I was not consequent and sometimes I didn't return any message for other terms. I am improving this, e.g. in 139a61f and feff15b.

@peterdesmet, I have question about messaging these two terms: observations.eventEnd , observations.observationLevel. They are set to NULL, and so ignored, BUT only after using them to populate other terms (sequenceID) or to remove media-based observations. Do you think adding the messages - observations.eventEnd has been ignored. and - observations.observationLevel has been ignored. could be confusing for the user? I don't think so, and my proposal is to add these two lines as we do for other ignored terms.

@peterdesmet
Copy link
Member

I would not add any specific lines about what is and hasn't been ignored.

@damianooldoni
Copy link
Member Author

Thanks, now I understand perfectly what you meant with The latter two sentences could be removed in my opinion.. You referred to your piece of code as well. 👍
Much easier for us to do so, actually. Removed such messages in a6997e6

@damianooldoni damianooldoni merged commit c8a3c9f into main Jul 20, 2023
10 checks passed
@damianooldoni damianooldoni deleted the read-CamtrapDP-v1.0-rc.1 branch July 20, 2023 12:45
damianooldoni added a commit that referenced this pull request Jul 24, 2023
Especially taking care of improving check_package() in check_package.R based on the work done in #223
@PietrH PietrH mentioned this pull request Sep 4, 2023
44 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants