Skip to content

Commit

Permalink
Merge pull request #28 from mhweber/master
Browse files Browse the repository at this point in the history
fixes to sc_get_data
  • Loading branch information
mhweber authored Sep 6, 2023
2 parents 5800a43 + 9c3929e commit 20a04dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions R/sc_get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ sc_get_data <- function(metric=NA, aoi=NA, comid=NA, state=NA, county=NA,
if (!is.na(state)) post_body <- paste0(post_body,"&state=",state)
if (!is.na(county)) post_body <- paste0(post_body,"&county=",county)
if (!is.na(region)) post_body <- paste0(post_body,"&region=",region)
if (!is.na(showAreaSqKm)) post_body <- paste0(post_body,"&showAreaSqKm=",showPctFull)
if (!is.na(showPctFull)) post_body <- paste0(post_body,"&showPctFull=",showAreaSqKm)
if (!is.na(showAreaSqKm)) post_body <- paste0(post_body,"&showAreaSqKm=",showAreaSqKm)
if (!is.na(showPctFull)) post_body <- paste0(post_body,"&showPctFull=",showPctFull)
if (!is.na(conus)) post_body <- paste0(post_body,"&conus=",conus)
if (!is.na(countOnly)) post_body <- paste0(post_body,"&countOnly=",conus)
if (!is.na(countOnly)) post_body <- paste0(post_body,"&countOnly=",countOnly)
post_body = substring(post_body, 2)
resp <- httr::POST(query_url, body=post_body)
df <- httr::content(resp, type="text/csv", encoding = 'UTF-8',show_col_types = FALSE)
Expand Down
4 changes: 2 additions & 2 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pandoc: 2.19.2
pandoc: 3.1.1
pkgdown: 2.0.7
pkgdown_sha: ~
articles:
Applications: Applications.html
Introduction: Introduction.html
last_built: 2023-03-09T21:10Z
last_built: 2023-09-06T03:19Z

2 changes: 1 addition & 1 deletion tests/testthat/test-sc_get_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ test_that("st_get_params for region parameters", {
test_that("st_get_params for name parameters", {
params <- sc_get_params(param='name')
expect_true(exists("params"))
expect_equal(length(params),567)
expect_equal(length(params),588)
})

0 comments on commit 20a04dd

Please sign in to comment.