NewGraphEnvironment / dff-2022

Building digital field forms and processing data collected using R, postgresql, QGIS and other tools
Creative Commons Zero v1.0 Universal
0 stars 3 forks source link

pit tag records didn't line up for parsnip #44

Closed NewGraphEnvironment closed 1 year ago

NewGraphEnvironment commented 1 year ago

@Mateo9569 - is it because this was changed from slice(2:nrow(.)) to slice(1....) ?

https://github.com/NewGraphEnvironment/dff-2022/blob/a6ae3388879413f8396ca8632ca4e01044b46ed3/scripts/pit_tags.R#L33

did you happen to see the notes in the PR? If not maybe let me know.

If the slice start number was the issue maybe close this issue

Mateo9569 commented 1 year ago

I don't think the slice number was the issue. When I ran it with 2:nrow() the rows still didn't line up perfectly. If you can send me the pit tag data for skeena when you get the chance I will run the script again when I get to it and resolve the issue.

NewGraphEnvironment commented 1 year ago

Looks like the issue is here

https://github.com/NewGraphEnvironment/dff-2022/blob/066c382b2eef2517dfe1d35df2d0bd3a73fd230d/scripts/pit_tags.R#L17

the rowid should be assigned after we slice out that anomaly first row vs before. This shouldn’t be an issue with Skeena because the first row coincides with the first fish I think

NewGraphEnvironment commented 1 year ago

Also there were two fish at a Missinka site in the mix at the top of the pit export spreadsheet too but maybe those are accounted for…

Mateo9569 commented 1 year ago

Also there were two fish at a Missinka site in the mix at the top of the pit export spreadsheet too but maybe those are accounted for…

Are you talking about that one site we fished just briefly to trial run the tags on two fish? Yes those are in there.

NewGraphEnvironment commented 1 year ago

Looking at the times of the pit_tag file generated from https://github.com/NewGraphEnvironment/dff-2022/blob/066c382b2eef2517dfe1d35df2d0bd3a73fd230d/scripts/pit_tags.R#L13 they look like those first two fish from the Missinka site. If that is the case then the numbers in the fish dataframe would all be off by one. To remedy that we would need to add 1 to the row_id numbering in the pit_tag sheet for it to match. Moving this to the Parsnip Reporting repo. Actually, none of the pit tag stuff really belongs in this repo so going to close.

NewGraphEnvironment commented 1 year ago

reopening until we remove import script from repo

NewGraphEnvironment commented 1 year ago

https://github.com/NewGraphEnvironment/fish_passage_peace_2022_reporting/issues/1