Skip to content
Snippets Groups Projects

Tweaks to findex global maps page

Merged Vaarre-Lamoureux, Kaysa S requested to merge kvl_findex_tweaks into main

Context

This MR continues to add changes and tweaks to the findex global maps page.

Summary of changes

All changes have outputs in src/assets/images/.

Changes include additions to the targets pipeline that create the following:

  • Create a global map of the top threat for each basin
  • Create a series of global maps showing top threat for each basin, filtered to a specific threat (there are 5 major threat categories, so 5 sub-maps were created)
  • Create a thumbnail for the findex global maps page
  • Reduce white space around global map pngs
  • Use cowplot to place legend text

I also downloaded each major and sub threat category icon as a svg in the matching color.

Expected results

Overall top threat map: all_threat_by_basin.png

all_threat_by_basin.png

Top threat maps filtered to a specific threat: these will be used in the interactive piece of the overall top threat map. Users will be able to select a threat category which will be highlighted while the rest of the threats become grayed out.

Pollution_threat_by_basin.png, Invasive_species_threat_by_basin.png, Habitat_threat_by_basin.png, Fishing_pressure_threat_by_basin.png, and Climate_and_weather_threat_by_basin.png

Pollution_threat_by_basin.pngInvasive_species_threat_by_basin.pngHabitat_threat_by_basin.png

Fishing_pressure_threat_by_basin.png Climate_and_weather_threat_by_basin.png

Findex global maps thumbnail: threat_by_basin_thumbnail.png. This image has a white margin around it that is hard to see on the white gitlab background.

threat_by_basin_thumbnail.png

Threat icon svgs: these follow the naming convention threat-code. For example, habitat is habitat-29572. Here is an example of the subcategory threat naming convention: H-dams-3916913. There is one subcategory threat icon missing, I am waiting to hear back from the SMEs about it. It is for change in flooding.

Verification of results

After running the pipeline, all the maps should match the ones shown in this MR description. There should also be threat icons for every threat category (except change in flooding). All legends should look very similar to their previous versions.

Requested review

  • Run the pipeline and make sure no errors pop up
  • Check the map outputs in src/assets/images/ to make sure they match the ones in this MR description
  • Check to make sure there are threat icons for every major and sub threat category (change in flooding pending)
  • Let me know if tweaks need to be made to legend text spacing or sizing
  • Double check that all global map pngs have minimal white space around the map
  • I would love any feedback or suggested/required changes to clean up the pipeline. Feedback on the thumbnail and maps themselves is welcome as well.

Next steps

Next steps include implementing the top threat by basin map interactivity at the top of the global maps page.

Edited by Vaarre-Lamoureux, Kaysa S

Merge request reports

Merged by Vaarre-Lamoureux, Kaysa SVaarre-Lamoureux, Kaysa S 3 days ago (Mar 14, 2025 4:00pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
135 134 draw_label(as.character(min_val),
136 135 x = 0.02,
137 y = 0.54,
136 y = 0.55,
138 137 hjust = 0,
139 138 vjust = 1,
140 139 lineheight = 0.75,
141 140 color = "gray50",
142 size = 9) +
141 size = 8) +
143 142 draw_label(as.character(max_val),
144 x = 1,
145 y = 0.54,
143 x = 0.99,
144 y = 0.55,
146 145 hjust = 1,
  • 147 146 vjust = 1,
    148 147 lineheight = 0.75,
    149 148 color = "gray50",
    150 size = 9)
    149 size = 8) +
    150 # higher lower labels
    151 draw_label("Lower",
    152 x = 0.05,
    153 y = 0.11,
    154 hjust = 0,
    155 vjust = 0,
    156 lineheight = 0.75,
    157 color = "black",
    158 size = 8) +
    159 draw_label("Higher",
    160 x = 0.86,
  • 142 size = 9) +
    141 size = 8) +
    143 142 draw_label(as.character(max_val),
    144 x = 1,
    145 y = 0.54,
    143 x = 0.99,
    144 y = 0.55,
    146 145 hjust = 1,
    147 146 vjust = 1,
    148 147 lineheight = 0.75,
    149 148 color = "gray50",
    150 size = 9)
    149 size = 8) +
    150 # higher lower labels
    151 draw_label("Lower",
    152 x = 0.05,
  • Thanks, Kaysa! All of these changes are looking great.

    I noted a couple of SC and also some RC in a previous comment - I want to confirm that the icons are working as expected.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading