Skip to content

Commit

Permalink
extract items from json return in sc and lc get data functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mhweber committed Jan 2, 2025
1 parent 00b646b commit 4b7932a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions R/lc_get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,7 @@ lc_get_data <- function(metric = NULL,
httr2::resp_body_string() |>
jsonlite::fromJSON()
# End of function. Return a data frame.
if (is.null(countOnly)){
df <- df$items |>
dplyr::select(comid, everything())
}
return(df)
return(df$items)
}

#' @title Get NLCD Data
Expand Down
2 changes: 1 addition & 1 deletion R/sc_get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ sc_get_data <- function(comid = NULL,
httr2::resp_body_string() |>
jsonlite::fromJSON()
# End of function. Return a data frame.
return(df)
return(df$items)
}

#' @title Get NLCD Data
Expand Down

0 comments on commit 4b7932a

Please sign in to comment.