Closed edlabo closed 1 year ago
we might actually need to do a little code editing to transform AIM's categories to the SHMI categories, need to think about/look into this more.
aim category transformation to shmi categories: Absent = Absent Common = Present Rare = Present
we might actually need to do a little code editing to transform AIM's categories to the SHMI categories, need to think about/look into this more.
Yes. It looks like there are lines of code regarding AIM's beaverImpactFlow in the CombineData.R
file. Lines of code below:
To update this to AIM's field BeaverSigns, in addition to updating the DataMapping, MetadataDictionary, and CategoryDictionary files as listed in the first post of this Issue, I think we will need to change the code selected above to something like:
#from the datamapping find the field name that contains the percent dry for AIM
field <- dataMapVariable("beaverPresence", p)
#change BVR_FLW_MD to YES, NO
beaverPresence <- data[[field]]
beaverPresence <- as.character(beaverPresence)
beaverPresence <- str_replace(beaverPresence,c("Absent"),"Absent")
beaverPresence <- str_replace(beaverPresence, c("Common"),"Present")
beaverPresence <- str_replace(beaverPresence, c("Rare"),"Present")
data[[field]] <- beaverPresence
what we need to do:
@eheaston -- modified CombineData.R script and fixed this issue. Code now reads:
field <- dataMapVariable("beaverPresence", p)
beaverPresence <- data[[field]] beaverPresence <- as.character(beaverPresence) beaverPresence <- str_replace(beaverPresence,c("Absent"),"Absent") beaverPresence <- str_replace(beaverPresence, c("Common"),"Present") beaverPresence <- str_replace(beaverPresence, c("Rare"),"Present") data[[field]] <- beaverPresence
Issue: update beaverImpactFlow to beaverPresence in the Location table change Major, Minor, NA, None categories to: Present, Absent, NA (and update their definitions) update beaverPresence definition to: signs of beavers are noted in the surveyed reach (e.g., chewed wood, lodges) update AIM's beaverImpactFlow data mapping field from BeaverFlowMod to BeaverSigns
Issue location(s): DataMappingDES MetadataDictionary CategoryDictionary
Location(s) in code: with the changes in input files above, when the code is run again, this should make these changes to Location table without modifying code.
Action to take: n/a
Notes: