Skip to content

Commit

Permalink
minor changes to AreaType == "All" related to #90
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Fox committed Feb 7, 2020
1 parent 8b88960 commit 6012536
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/fingertips_data.R
Expand Up @@ -168,10 +168,9 @@ fingertips_data <- function(IndicatorID = NULL,
ParentAreaTypeID %in% c(15, unique(ind_ats$AreaTypeID))) %>%
filter(!(AreaTypeID %in% remove_ats),
!(ParentAreaTypeID %in% remove_ats)) %>%
group_by(AreaTypeID) %>%
arrange(-ParentAreaTypeID) %>%
top_n(1, ParentAreaTypeID) %>%
select(AreaTypeID, ParentAreaTypeID) %>%
select(AreaTypeID) %>%
unique() %>%
mutate(ParentAreaTypeID = 15) %>%
bind_rows(parent_only)
ind_ats <- ind_ats %>%
inner_join(at, by = "AreaTypeID")
Expand Down Expand Up @@ -335,7 +334,8 @@ fingertips_data <- function(IndicatorID = NULL,
fingertips_data[fingertips_data==""] <- NA

if (categorytype == FALSE) {
fingertips_data <- filter(fingertips_data, is.na(CategoryType))
fingertips_data <- fingertips_data %>%
filter(is.na(CategoryType))
}
}
return(unique(fingertips_data))
Expand Down

0 comments on commit 6012536

Please sign in to comment.