Skip to content

Commit

Permalink
feat: add ices_division in run_app
Browse files Browse the repository at this point in the history
Issue: #158
  • Loading branch information
PMHLambert committed May 4, 2023
1 parent b45a5c9 commit 172eaae
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ importFrom(tibble,rownames_to_column)
importFrom(tidyr,expand_grid)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,pivot_wider)
importFrom(tmap,tm_borders)
importFrom(tmap,tm_polygons)
importFrom(tmap,tm_shape)
importFrom(utils,getFromNamespace)
Expand Down
2 changes: 1 addition & 1 deletion R/globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ globalVariables(unique(c(
"basin_id", "year", "hsi_min", "hsi_max", "label", "hsi_movingavg",
"species_id", "nit_mean", "nit_min", "nit_max", "nit_movingavg",
# tm_draw:
"ices_type", "latin_name", "nb_occurence", "tm_frontiers",
"ices_type", "latin_name", "nb_occurence", "tm_frontiers", "ices_division",
# translation_help:
"contenu_markdown", "en", "es", "fr", "pt",
# others
Expand Down
1 change: 1 addition & 0 deletions R/mod_a_first.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ mod_first_server <- function(id, r = r) {
catchment_geom = golem::get_golem_options("catchment_geom"),
dataALL = golem::get_golem_options("dataALL"),
ices_geom = golem::get_golem_options("ices_geom"),
ices_division = golem::get_golem_options("ices_division"),
session = session
)
})
Expand Down
3 changes: 2 additions & 1 deletion R/mod_a_first_fct_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,14 @@ tm_catchmment <- function(dataContinent) {
# Do it once
bbox <- sf::st_bbox(c(xmin = -17.5, xmax = 19, ymax = 36, ymin = 62), crs = sf::st_crs(4326))


#' Title
#'
#' @param species_latin_name The latin name of the species
#' @param spatial_type Geom to use in the map
#' @param con The Connection object
#' @param yearStart,yearEnd date used
#' @param dataCatchment,catchment_geom,dataALL,ices_geom internal datasets
#' @param dataCatchment,catchment_geom,dataALL,ices_geom,ices_division internal datasets
#' @param session The Shiny Session object
#'
#' @return A tmap object
Expand Down
4 changes: 3 additions & 1 deletion R/run_app.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' @param species_list list of species to use in the app
#' @inheritParams shiny::shinyApp
#' @param dataCatchment,catchment_geom,dataALL,ices_geom,countries_mortalities_list internal datasets
#' @param dataCatchment,catchment_geom,dataALL,ices_geom,ices_division,countries_mortalities_list internal datasets
#' @param help_bubble_entries A character vector corresponding to all
#' keys (entries)of help bubbles to be displayed.
#'
Expand All @@ -20,6 +20,7 @@ run_app <- function(
countries_mortalities_list,
dataALL = dataALL,
ices_geom = ices_geom,
ices_division = ices_division,
help_bubble_entries = get_help_bubble_entries()
) {
cli::cat_rule("run_app")
Expand All @@ -39,6 +40,7 @@ run_app <- function(
catchment_geom = catchment_geom,
dataALL = dataALL,
ices_geom = ices_geom,
ices_division = ices_division,
help_bubble_entries = help_bubble_entries
)
)
Expand Down
1 change: 1 addition & 0 deletions dev/run_dev.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ run_app(
catchment_geom = datasets[["catchment_geom"]],
dataALL = datasets[["dataALL"]],
ices_geom = datasets[["ices_geom"]],
ices_division = datasets[["ices_division"]],
help_bubble_entries = get_help_bubble_entries()
)
3 changes: 2 additions & 1 deletion man/run_app.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/tm_draw.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 172eaae

Please sign in to comment.