Skip to content

Commit

Permalink
feat: new palette and updattin popup for catcment
Browse files Browse the repository at this point in the history
  • Loading branch information
PMHLambert committed May 4, 2023
1 parent a5a91ad commit 348763c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions R/mod_a_first_fct_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tm_ocean <- function(dataOcean,
tm_polygons(
"prevalence",
title = paste0(title, "\n(", yearStart, "-", yearEnd, ")"),
palette = "Blues",
palette = c("#F7FBFF", "#C6DBEF", "#9ECAE1", "#4292C6", "#08519C", "#08306B"),
n = 6,
labels = c(
"Not recorded in the period" %>% with_i18("absent") %>% as.character(),
Expand All @@ -45,7 +45,7 @@ tm_ocean <- function(dataOcean,
"[10, 12]",
"[13, 15]"
),
popup.vars = c("prevalence" = "nb_occurence")
popup.vars = c("prevalence: " = "nb_occurence")
)
}

Expand All @@ -72,15 +72,16 @@ tm_catchmment <- function(dataContinent) {
"abundance_interpretation",
title = "Status in river catchments (1951-2010)" %>% with_i18("status_in_river_catchments") %>% as.character(),
# "<span data-i18n='status_in_river_catchments'>Status in river catchments (1951-2010)</span>",
palette = "Reds",
palette = c("#FEE0D2", "#FCBBA1", "#A50F15", "#67000D"),
n = 4,
textNA = "Missing" %>% with_i18("missing") %>% as.character(),
labels = c(
"Not recorded in the period" %>% with_i18("absent") %>% as.character(),
"Occasional vagrants" %>% with_i18("rare") %>% as.character(),
"Functional populations" %>% with_i18("common") %>% as.character(),
"Abundant functional populations" %>% with_i18("abundant") %>% as.character()
)
),
popup.vars = c("population status: " = "abundance_interpretation")
)
}

Expand Down
2 changes: 1 addition & 1 deletion data-raw/bb-page1-catch-bycatch.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ tm_draw(
tm1 <- tm_draw(
species_latin_name = "Chelon ramada",
spatial_type = "division",
spatial_type = "rectangle",
con = con,
dataCatchment = datasets$dataCatchment,
catchment_geom = datasets$catchment_geom,
Expand Down

0 comments on commit 348763c

Please sign in to comment.