Current implementation for excluding specific hospital admissions data points loops through locations and checks for exclusions. We should instead use anti_join because we are passing a table of exclusions.
Requirements
[ ] get rid of the for loop and replace with anti-join for handling table of exclusions in eval pipeline
Context
Not for this PR but it would be good to refactor the exclusion logic to avoid having to go one location at a time and check carefully for multiple locations, etc (and the check is important because otherwise non-target datapoints could be filtered out).
Given that you have a table of exclusions, I'd suggest writing this function so that it can work on multiple locations at once (though you can still always go one location at a time if you prefer. An anti_join on location and date should work:
Problem
Current implementation for excluding specific hospital admissions data points loops through locations and checks for exclusions. We should instead use
anti_join
because we are passing a table of exclusions.Requirements
Context
https://dplyr.tidyverse.org/reference/filter-joins.html