Corrects potentially incorrect locations based on the content of cameras.
Indeed, for Zooniverse data, cameras in OVE have the locationID DHP and
cameras in KHO have the locationID KGA.
Usage
clean_locations(cameras, locations, logger = NA)
Arguments
- cameras
characgter vector of cameras
- locations
character vector of locations (same length)
- logger
a log4r logger object if you want logging (can be created with create_logger),
else NA.
Value
a character vector of locations with the same length as input.
Details
The code DHP is replaced with OVE if the corresponding camera code starts with 'O'.
The code KGA is replaced with KHO if the corresponding camera code starts with 'KHO'.
The code PIL is replaced with PLN
Examples
clean_locations(c("OA01", "KHOGA01"), c("DHP", "KGA"))
#> [1] "OVE" "KHO"