Skip to content

Commit

Permalink
more suggests packages
Browse files Browse the repository at this point in the history
  • Loading branch information
cole-brokamp committed Mar 14, 2024
1 parent de12c71 commit d3d327f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Imports:
cli,
dotenv,
dplyr,
fs,
furrr,
Expand All @@ -22,7 +21,6 @@ Imports:
httr,
purrr,
qs,
readr,
rlang,
s2,
sf,
Expand All @@ -34,15 +32,17 @@ Imports:
RoxygenNote: 7.2.3
Suggests:
curl,
dotenv,
ggplot2,
hexbin,
knitr,
lwgeom,
rmarkdown,
mappp,
tidync,
readr,
rmarkdown,
scales,
testthat (>= 3.0.0),
tidync,
viridis
Config/testthat/edition: 3
Config/testthat/parallel: true
Expand Down
1 change: 1 addition & 0 deletions R/aqs.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#' get_daily_aqs("pm25", "2023")
#' @export
get_daily_aqs <- function(pollutant = c("pm25", "ozone", "no2"), year = as.character(2017:2023)) {
rlang::check_installed("readr", "to read daily AQS CSV files from the EPA.")
pollutant <- rlang::arg_match(pollutant)
year <- rlang::arg_match(year)
pollutant_code <-
Expand Down
3 changes: 2 additions & 1 deletion R/merra.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ install_merra_data <- function(merra_year = as.character(2016:2023)) {
#' @export
#' @rdname get_merra_data
create_daily_merra_data <- function(merra_date) {
rlang::check_installed("tidync", "to read daily MERRA files.")
rlang::check_installed("dotenv", "to read Earthdata credentials; see Details.")
the_date <- as.Date(merra_date)
if (file.exists(".env")) dotenv::load_dot_env()
earthdata_secrets <- Sys.getenv(c("EARTHDATA_USERNAME", "EARTHDATA_PASSWORD"), unset = NA)
Expand All @@ -129,7 +131,6 @@ create_daily_merra_data <- function(merra_date) {
httr::authenticate(user = earthdata_secrets["EARTHDATA_USERNAME"], password = earthdata_secrets["EARTHDATA_PASSWORD"]),
httr::write_disk(tf)
)
rlang::check_installed("tidync", "to read daily MERRA files.")
out <-
tidync::tidync(tf) |>
tidync::hyper_filter(
Expand Down
1 change: 1 addition & 0 deletions R/nei.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ get_nei_point_summary <- function(x, year = c("2020", "2017"), pollutant_code =
#' @rdname get_nei_point_summary
#' @export
install_nei_point_data <- function(year = c("2020", "2017")) {
rlang::check_installed("readr", "to read and install NEI CSV files from the EPA.")
year <- rlang::arg_match(year)
dest_file <- fs::path(tools::R_user_dir("appc", "data"), glue::glue("nei_{year}.rds"))
if (file.exists(dest_file)) {
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ train_model:
# upload grf model and training data to current github release
release_model:
gh release upload v{{pkg_version}} "{{geomarker_folder}}/training_data_v{{pkg_version}}.rds"
gh release upload v{{pkg_version}} "{{geomarker_folder}}/rf_pm_v{{pkg_version}}.rds"
gh release upload v{{pkg_version}} "{{geomarker_folder}}/rf_pm_v{{pkg_version}}.qs"

# install smoke data from source and upload to github release
release_hms_smoke_data:
Expand Down

0 comments on commit d3d327f

Please sign in to comment.