Open martinig opened 2 years ago
for locx values in the behaviour LTD:
record id - correct locx
record id - correct locy
record id - correct locx and locy
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.)
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)
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"
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
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"
Similar vein - squirrel id 7822, behaviour record id 71432
Grid should be AG not SU (this loc is on AG, see comments)
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)
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
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"
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"
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",
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",
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",
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",
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",
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",
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",
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",
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.
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. :)