Skip to content

Commit

Permalink
Fix to get_data_availability function
Browse files Browse the repository at this point in the history
Removes CS data from data availability dataset and cleans DAA data appropriately for 2021.
  • Loading branch information
cnemarich committed Oct 22, 2021
1 parent ab65fa8 commit 4ea6dbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: daa.analytics
Title: Utilities for Compiling and Analyzing PEPFAR Data Alignment Activity Data
Version: 0.1.5
Version: 0.1.6
Date: 2021-06-17
Authors@R:
person(given = "Chris",
Expand Down
3 changes: 3 additions & 0 deletions R/get-geoalign-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ get_data_availability <- function(geo_session = geo_session) {

# Loops through all available years to pull data availability from GeoAlign
df %<>%
.[df != "CS_2021"] %>%
lapply(function(x) {
tryCatch({
args <- list(end_point = paste0(end_point, "/", x),
Expand All @@ -75,6 +76,8 @@ get_data_availability <- function(geo_session = geo_session) {
}) %>%
remove_missing_dfs() %>%
dplyr::bind_rows() %>%
dplyr::mutate(period = stringr::str_sub(.data$period,
start = -4, end = -1)) %>%
tidyr::pivot_longer(-c(.data$period, .data$CountryName,
.data$CountryCode, .data$generated),
names_sep = "_(?=[^_]*$)",
Expand Down

0 comments on commit 4ea6dbe

Please sign in to comment.