Skip to content

Commit

Permalink
feat: move mgcv to Suggests
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-davison committed Nov 25, 2024
1 parent bda065d commit aa217b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: openairmaps
Title: Create Maps of Air Pollution Data
Version: 0.9.1.9003
Version: 0.9.1.9004
Authors@R: c(
person("Jack", "Davison", , "[email protected]", role = c("cre", "aut"),
comment = c(ORCID = "0000-0003-2653-6615")),
Expand All @@ -25,7 +25,6 @@ Imports:
leaflet (>= 2.2.0),
lifecycle,
lubridate,
mgcv,
openair (>= 2.13),
purrr (>= 1.0.0),
rlang,
Expand All @@ -39,6 +38,7 @@ Suggests:
httr,
jsonlite,
knitr,
mgcv,
mirai,
prettymapr,
rmarkdown,
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@

* The progress bar shown when `progress = TRUE` now better reflects the actual time until function completion.

## Refactoring

* `{ggplot2}`, `{ggspatial}`, `{prettymapr}` and `{ggtext}`, the packages which support static mapping, have been moved to `Suggests` from `Imports`. This gives the package a smaller size for users who only use `{openairmaps}` for interactive mapping. On first trying to use a static mapping function, users will be prompted to install these packages.

* `{mgcv}` has been moved to `Suggests` as it is only used in one place (`trajLevelMap(smooth = TRUE)`)

# openairmaps 0.9.1

## New features
Expand Down
1 change: 1 addition & 0 deletions R/traj_trajLevelMap.R
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ trajLevelMapStatic <-
#' Smooth grid for trajectories
#' @noRd
smooth_trajgrid <- function(mydata, z, k = 50, dist = 0.05) {
rlang::check_installed("mgcv")
myform <-
stats::formula(stringr::str_glue("{z}^0.5 ~ s(xgrid, ygrid, k = {k})"))

Expand Down

0 comments on commit aa217b0

Please sign in to comment.