KluaneRedSquirrelProject / KRSP-Database-Errors

0 stars 2 forks source link

Incorrect locs #96

Open martinig opened 2 years ago

martinig commented 2 years ago

For squirrel_id==6544 the following ids: 62528 62529 62639 62640 62763 62764 62846

Should have a locx as 4.0 not NA in the behaviour LTD (i.e., the squirrel is at D9 and D10 on KL). These values were pulled from the field books Stan lent me to try and figure out all the problems with Mark's data. :)

martinig commented 2 years ago

for locx values in the behaviour LTD:

record id - correct locx

  1. 379347 - should be I.4
  2. 372804 - should be 3.0
  3. 374308 - should be -3.4
  4. 379702 - should be H.1
  5. 373002 - should be 0.4 or 0.5 (for my stuff I just went with 0.5 -> zero (not the letter O))
  6. 381787 - should be I.4
  7. 377053 and 377636 - should be I.3
  8. 63054 and 62630 - should be 10.0
  9. 62753 and 62753 - should be 9.5
  10. 63082 - should be 6.0
  11. id %in% c(60816, 60817, 60818, 60819, 60911, 60912, 60913, 60914, 60915, 60916) - locx should be N (or 14)

record id - correct locy

  1. 377851 - locy should be 10.1
  2. 371917 - locy should be 3.0
  3. 380553 - locy should be 17.0
  4. 380336 - locy should be 0.0 (i.e., zero.zero)
  5. 376552 and 376553 - locy should be 6.0 (not H.4)
  6. 379780 - locy should be 8.3 (not E.3)

record id - correct locx and locy

  1. id %in% c(370545, 370546, 370547, 370548, 371667) - I was on enema for this squirrel - probably best to make the locx and locy NA because I was having to make a really rough estimate for where I was
  2. 377985 - should be locx=M.1 and locy=10.1
  3. 21562 - should be locx=13.5 and locy=0.5
  4. 378726 - locx should be S.0 and locy=8.0
  5. 372014 - colours were entered in for locs, squirrel is locd to locx=I.5 and locy=1 the whole time - might be able to use these instead of NAs?
  6. 376607 and 377304 - locx and locy may be switched
  7. 379545 - locx=P.5 and locy=7.0

General edits :

mutate(locx = str_replace_all(locx, c(" "="", ","=".", ":"=".")), 
    locy = str_replace_all(locy, c(" "="", ","=".", ":"="."))) #to remove spaces (e.g., for locx "I .4", "M.4 ", "M.8 ", etc.)
martinig commented 2 years ago

Typo in comment: record id: 66531 in trapping LTD

comment should read: colors out, UTM 656380/6764369

(this is a settlement loc, so it might be important to have the correct location)

martinig commented 2 years ago

For squirrel id 6844 there are ~100 rows in the behLTD where the locx are NA, but the locy are between 7.0 and 10.0. In these cases, the locx value should be 15.0.

i.e., locx=case_when(squirrel_id==6844 & is.na(locx) & locy==7.0 ~ "O.0", squirrel_id==6844 & is.na(locx) & locy==8.0 ~ "O.0", squirrel_id==6844 & is.na(locx) & locy==9.0 ~ "O.0", squirrel_id==6844 & is.na(locx) & locy==10.0 ~ "O.0", ... etc.

Same sort of thing for squirrel_id== 6514

i.e., (squirrel_id== 6514 & is.na(locx) & locy=="8.0") | (squirrel_id== 6514 & is.na(locx) & locy=="9.0") |(squirrel_id== 6514 & is.na(locx) & locy=="10.0") ~ "O.0"

martinig commented 2 years ago

Settlement records for squirrel id 6492 suggest that it was at locx=3.5 from 2005-09-13 onwards.

record ids: 62513, 62629, 62751, 62844, 62852, 62851, 62949

martinig commented 2 years ago

locx values in beh LTD:

Squirrel id 7306 should have all locx==8.5 instead of NA

Also, squirrel_id==10138 & is.na(locx) ~ "2.5"

squirrel_id==7664 & is.na(locx) & str_detect(comments, "M14") ~ "13.0" squirrel_id==7664 & is.na(locx) & str_detect(comments, "H15") ~ "8.0" squirrel_id==7664 & is.na(locx) & str_detect(comments, "K.17") ~ "11.5"

squirrel_id==10183 & is.na(locx) ~ "13.0" squirrel_id==10182 & is.na(locx) & str_detect(comments, "M14") ~ "13.0"

martinig commented 2 years ago

Similar vein - squirrel id 7822, behaviour record id 71432

Grid should be AG not SU (this loc is on AG, see comments)

martinig commented 2 years ago

Census reflo should be E12. for record 11849 Census reflo should be B11 for record 11551 and record 11547 Census reflo should be L.5 or M5 for 13036 (I used L.5 in my records).

Missing census record: squirrel_id==22296, reflo==E13, date==2019-08-15, grid==KL squirrel_id==23577, reflo==E13, date==2018-08-15 grid==KL (share with mom)

martinig commented 2 years ago

Trapping LTD record id 61353 should have NA for locx and locy because the squirrel is off grid (UTMs), not on grid) - details are in comments

martinig commented 2 years ago

behaviour record id followed by correct locx

62630 = 10 62753 & 62994 = 9.5

Also, for locx:

squirrel_id==10181 & is.na(locx) & comments %in% c("Midden I.2 emerge", "Midden I.2") ~ 9.5

squirrel_id==10181 & is.na(locx) & comments %in% c("Midden J2", "Midden J1", "Midden J0.", "J1 mid", "Midden J1, popped out of mid hole", "Midden J0., popped out of hole in groun") ~ 10.0

squirrel_id==10181 & is.na(locx) & comments %in% c("Midden J.0.", "Midden J.0., clipping cones", "Cache new cone, midden J.0.", "Clip cone, midden J.0.") ~ 10.5

squirrel_id==10137 & is.na(locx) & comments %in% c("Midden -2.4.", "Midden -2.4., cones", "Midden -2.4., clipping cones", "Midden -2.4., cache cone", "Clip cone, midden -2.4.", "Cache new cone, midden -2.4.", "Trap, RCOFF, midden -2.4.") ~ "-2.5"

martinig commented 2 years ago

loc x values:

squirrel_id== 6522 & is.na(locx) & comments %in% c("trap, RCOFF", "Trap") ~ "-4.4" squirrel_id== 6522 & is.na(locx) & comments %in% c("Midden -3.5.") ~ "-3.5"

martinig commented 2 years ago

squirrel_id== 7437 & is.na(locx) & comments %in% c("Midden A.13.", "Midden A.13., trap") ~ "1.5", squirrel_id== 7437 & is.na(locx) & comments %in% c("Midden B13", "Midden B13, clipping cones", "Midden B13, cache cone in tree", "B13 midden", "Trap") ~ "2.0",
squirrel_id== 7437 & is.na(locx) & comments %in% c("Midden B.13.", "Cache new cone, midden B.13.", "Midden B.13., dropped cone", "Clip cone, midden B.13.", "Midden B.13., clipping cones", "Midden B.13., goshawk flew over", "Midden B.13., underground") ~ "2.5",
squirrel_id== 7437 & is.na(locx) & comments %in% c("Midden C13", "Midden C13, popped out", "Mom present, midden C13") ~ "3.0",

martinig commented 2 years ago

squirrel_id== 8733 & is.na(locx) & comments %in% c("Midden 0.12, chased by B/W", "Midden 0.12") ~ "0.5", squirrel_id== 8733 & is.na(locx) & comments %in% c("Midden B13") ~ "2.0", squirrel_id== 8733 & is.na(locx) & comments %in% c("Midden B.13.", "Midden B.13., trap") ~ "2.5", squirrel_id== 8733 & is.na(locx) & comments %in% c("Midden C13", "Midden C13, cache cones", "Mom present, midden C13", "Midden C13, clipping cones", "Midden C13, Goshawk land C.0 12.3 b/f b", "Midden C13, popped out", "Trap") ~ "3.0",

martinig commented 2 years ago

squirrel_id== 8745 & is.na(locx) & comments %in% c("Midden L10") ~ "12.0", squirrel_id== 8745 & is.na(locx) & comments %in% c("Midden K.10", "Midden K.10, trap", "Clip cone, midden K.10", "Trap RCOFF, midden K.10") ~ "11.5",

martinig commented 2 years ago

squirrel_id== 6524 & is.na(locx) & comments %in% c("Midden K.10") ~ "11.5", squirrel_id== 6524 & is.na(locx) & comments %in% c("Midden L10") ~ "12.0", squirrel_id== 6524 & is.na(locx) & comments %in% c("Midden M10", "Cache new cone, midden M10", "Clip cone, midden M10") ~ "13.0", squirrel_id== 6524 & is.na(locx) & comments %in% c("Midden M.9.", "Cache new cone, midden M.9.", "Clip cone, midden M.9.") ~ "13.5",

martinig commented 2 years ago

squirrel_id== 6487 & is.na(locx) & comments %in% c("Midden I17.", "Midden I17., cones", "Midden I17., build nest", "Midden I17., clipping cones", "Midden I17., dig holes", "Midden I17., cone", "Midden ( I17.) In trap", "trap") ~ "9.0", squirrel_id== 6487 & is.na(locx) & comments %in% c("Midden I.15.") ~ "9.5", squirrel_id== 6487 & is.na(locx) & comments %in% c("Midden J16", "Midden J14") ~ "10.0",

martinig commented 2 years ago

squirrel_id== 6483 & is.na(locx) & comments %in% c("Midden E.10") ~ "5.5", squirrel_id== 6483 & is.na(locx) & comments %in% c("Midden F.10.", "in trap RC change") ~ "6.5", squirrel_id== 6483 & is.na(locx) & comments %in% c("in trap") ~ "6.8", squirrel_id== 6483 & is.na(locx) & comments %in% c("Midden G.9.") ~ "7.5",

martinig commented 2 years ago

squirrel_id== 10140 & is.na(locx) & comments %in% c("Midden E9., adult present & R", "Midden E9.") ~ "5.0", squirrel_id== 10140 & is.na(locx) & comments %in% c("Midden E.10", "Midden E.10, foot stomp", "Midden E.10, clipping cones", "Mom present, midden E.10, clipping cone", "Midden E.10 Flushed spr grs from next t", "E.10 mid in trap", "Trap RCOFF, midden E.10") ~ "5.5", squirrel_id== 10140 & is.na(locx) & comments %in% c("Midden F.10., foot stomp", "build nest, Midden F.10.", "Midden F.10.", "F.10. mid") ~ "6.5", squirrel_id== 10140 & is.na(locx) & comments %in% c("Midden G.9.", "Midden G.9., PB'd") ~ "7.5", squirrel_id== 10140 & is.na(locx) & comments %in% c("Midden H12") ~ "8.0",

martinig commented 2 years ago

squirrel_id== 7390 & is.na(locx) & comments %in% c("Midden I.15.") ~ "9.5", squirrel_id== 7390 & is.na(locx) & comments %in% c("Clip cone, midden L8", "Midden L8", "Midden L8 clipping cones", "Midden L8 clipping cones", "Midden L8 chased unknown sq", "Clip cone, midden L8", "Midden L8, clipping cones", "In trap", "Cache new cone, midden L8") ~ "12.0", squirrel_id== 7390 & is.na(locx) & comments %in% c("Midden M.9.") ~ "13.5", squirrel_id== 7390 & is.na(locx) & comments %in% c("Midden N6", "Midden N6, movement in wbr no visual", "N6M", "Midden N9 cone", "Midden N9", "Midden N9, clipping cones", "Cache mush, midden N9", "Midden N9, trap") ~ "14.0", squirrel_id== 7390 & is.na(locx) & comments %in% c("Midden O10.") ~ "15.0",

agmcadam commented 1 year ago

Corrections made except for locs from character string in comments; grid change for 7822 not made; census records not changed; all of the subsets including references to strings in comments were not changed.