Skip to content

Commit

Permalink
Merge pull request #28 from UrbanInstitute/unavailable_dd_bug
Browse files Browse the repository at this point in the history
Unavailable dd bug
  • Loading branch information
Thiyaghessan authored Mar 20, 2024
2 parents e31c55d + 76ed9fb commit f74f477
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 33 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

gem "webrick", "~> 1.8"
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ GEM
minitest (5.20.0)
nokogiri (1.16.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.2-x64-mingw-ucrt)
racc (~> 1.4)
nokogiri (1.16.2-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
Expand Down Expand Up @@ -249,6 +251,7 @@ GEM
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.8.1)

PLATFORMS
arm64-darwin-21
Expand All @@ -262,6 +265,7 @@ DEPENDENCIES
tzinfo (>= 1, < 3)
tzinfo-data
wdm (~> 0.1.1)
webrick (~> 1.8)

BUNDLED WITH
2.3.16
10 changes: 7 additions & 3 deletions catalogs/build-catalog-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ get_file_paths <- function(series,
} else if (series == "core"){
expr <- paste0( "CORE-[0-9]{4}-501C[0-9A-Z]-", tscope )
paths <- grep( expr, paths, value = TRUE )
paths <- grep( paste0( "-", fscope, "\\b"), paths, value=T )
paths <- grep( paste0( "-", fscope, "\\.csv"), paths, value=T )
} else if (series == "misc"){
expr <- "SUPPLEMENTAL-CORE.*"
paths <- grep(expr, paths, value = TRUE)
Expand Down Expand Up @@ -200,8 +200,12 @@ make_archive_urls <- function(series,
matches <- gsub("\\.csv", "", matches)

archive_urls <- paste0(base_url, matches)
# archive_urls <- lapply(archive_urls,
# function(x) if (RCurl::url.exists(x)) x else unavail_url)
archive_urls <- lapply(archive_urls,
function(x)
if (RCurl::url.exists(x))
x
else
unavail_url)

return(archive_urls)
}
Expand Down
Loading

0 comments on commit f74f477

Please sign in to comment.