Skip to content

Commit

Permalink
Fix #231
Browse files Browse the repository at this point in the history
  • Loading branch information
damianooldoni committed Jul 22, 2024
1 parent cbd8fea commit 7521921
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 129 deletions.
54 changes: 27 additions & 27 deletions R/map_dep.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,35 +110,35 @@
#' x <- example_dataset()
#'
#' # Show number of species
#' map_dep(
#' map_deployments(
#' x,
#' "n_species"
#' )
#'
#' # Show number of observations (observations of unidentified species included
#' # if any)
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs"
#' )
#'
#' # Show number of observations of Anas platyrhynchos
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' species = "Anas platyrhynchos"
#' )
#'
#' # Show number of observations of subadult individuals of Anas strepera
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' species = "Anas strepera",
#' life_stage = "subadult"
#' )
#'
#' # Show number of observations of female or unknown individuals of gadwall
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' species = "gadwall",
Expand All @@ -147,13 +147,13 @@
#'
#' # Show number of individuals (individuals of unidentified species included if
#' # any)
#' map_dep(
#' map_deployments(
#' x,
#' "n_individuals"
#' )
#'
#' # Same filters by life stage and sex as for number of observations apply
#' map_dep(
#' map_deployments(
#' x,
#' "n_individuals",
#' species = "Anas strepera",
Expand All @@ -162,14 +162,14 @@
#' )
#'
#' # Show RAI
#' map_dep(
#' map_deployments(
#' x,
#' "rai",
#' species = "Anas strepera"
#' )
#'
#' # Same filters by life_stage and sex as for number of observations apply
#' map_dep(
#' map_deployments(
#' x,
#' "rai",
#' species = "Anas strepera",
Expand All @@ -178,14 +178,14 @@
#' )
#'
#' # Show RAI calculated by using number of detected individuals
#' map_dep(
#' map_deployments(
#' x,
#' "rai_individuals",
#' species = "Anas strepera"
#' )
#'
#' # Same filters by life stage and sex as for basic RAI apply
#' map_dep(
#' map_deployments(
#' x,
#' "rai_individuals",
#' species = "Anas strepera",
Expand All @@ -194,47 +194,47 @@
#' )
#'
#' # Show effort (hours)
#' map_dep(
#' map_deployments(
#' x,
#' "effort"
#' )
#' # Show effort (days)
#' map_dep(
#' map_deployments(
#' x,
#' "effort",
#' effort_unit = "day"
#' )
#'
#' # Use viridis palette (viridis palettes)
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' palette = "viridis"
#' )
#'
#' # Use "BuPu" colour palette (RColorBrewer palettes)
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' palette = "BuPu"
#' )
#'
#' # Use a palette defined by colour names
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' palette = c("black", "blue", "white")
#' )
#'
#' # Use a palette defined by hex colours
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' palette = c("#000000", "#0000FF", "#FFFFFF")
#' )
#'
#' # Do not show deployments with zero values
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' life_stage = "subadult",
Expand All @@ -243,15 +243,15 @@
#'
#' # Use same icon but but a non default colour for zero values deployments,
#' # E.g. red (hex: E74C3C)
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' life_stage = "subadult",
#' zero_values_icon_url = "https://img.icons8.com/ios-glyphs/30/E74C3C/multiply.png"
#' )
#'
#' # ... or yellow (F1C40F)
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' life_stage = "subadult",
Expand All @@ -260,7 +260,7 @@
#'
#' # Use another icon via a different URL, e.g. the character Fry from Futurama
#' # in green (2ECC71)
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' life_stage = "subadult",
Expand All @@ -277,7 +277,7 @@
#' # A deployment has no observations
#' filter(deploymentID != "62c200a9-0e03-4495-bcd8-032944f6f5a1")
#' # create new map
#' map_dep(
#' map_deployments(
#' unknown_species_vs_no_obs,
#' feature = "n_species",
#' zero_values_icon_url = "https://img.icons8.com/ios-glyphs/30/2ECC71/futurama-fry.png",
Expand All @@ -287,36 +287,36 @@
#' )
#'
#' # Set size of the icon for zero values deployments
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' life_stage = "subadult",
#' zero_values_icon_size = 30
#' )
#'
#' # Disable cluster
#' map_dep(
#' map_deployments(
#' x,
#' "n_species",
#' cluster = FALSE
#' )
#'
#' # Show only number of observations and location name while hovering
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' hover_columns = c("locationName", "n")
#' )
#'
#' # Use absolute scale for colours and radius
#' map_dep(x,
#' map_deployments(x,
#' "n_species",
#' relative_scale = FALSE,
#' max_scale = 4
#' )
#'
#' # Change max and min size circles
#' map_dep(
#' map_deployments(
#' x,
#' "n_obs",
#' radius_range = c(40, 150)
Expand Down
Loading

0 comments on commit 7521921

Please sign in to comment.