Skip to content

Uom nbs - #6

Open
Mares2022 wants to merge 3 commits into
mainfrom
uom_nbs
Open

Uom nbs#6
Mares2022 wants to merge 3 commits into
mainfrom
uom_nbs

Conversation

@Mares2022

Copy link
Copy Markdown
Collaborator

Hi Ioanna and Gerrit,

I’ve added a new process lare-nbs (Get NBS per UOM). Please find a description of the main changes of the inputs and outputs below:

  1. I have created a clc_nbs_hazard_updated.csv file with the "scripts/harmonize_clc_nbs_hazard.py". This codes harmonizes the table to have a single name per hazard in the case for intance of "Floods" and "Flood". The table also adds the landscape_case (Urban / Rural / Coastal), based on the information in data/landscapearchetype.csv, using desc0 as the linking key between the two tables. Note that landscapearchetype.csv is incomplete as not all have desc0 have a lac_d, and as a result not all NbS can taken into consideration in the lare-nbs process. We need to update this table to bring all the available NbS (e.g. Agro-forestry areas).

  2. Config (app.yml) has new parameters where the NbS csv path is defined. The parameters also define the matching between hazard as defined in the app.yml and hazard as defined in the NbS csv table.

    Under nbs:
    nbs_table: path to the NBS CSV (now data/clc_nbs_hazard_updated.csv)
    nbs_labels: maps API/hazard keys (heat, drought, pluvial_RP200, …) to hazard names in that CSV (Heat, Drought, Flood, …)

  3. The hexagon_*.gpkg file has three new columns after running the process_nbs.py that can be used in the fronted to colour the hexagons or display a list of available NbS for the current combination of archeotype + hazard.

clc_nbs_majority: CLC class with the most pixels that has NBS for the selected archetype + hazard
nbs_list_majority: NbS codes for that class
clc_nbs_majority_area: pixel count for that CLC × CLC pixel size from clc.tif → area in m²

Note that in order to decide whether a list of NbS is applicable you also need to check if the hexagos is in a hotspot based on the columns created by uom.py and uomkcs.py processes.

I’ve checked results in QGISa and they look consistent.

Best,
Mario

Identification of NBS per UOM. This development adds a new process called process_nbs.py that takes as input the clc.tif and hexagons_*.gpkg from proces_uomkc.py. Use case "coastal" uom.py had to be modified to produced clc.tif as it was not created before with the previous functionality of the process. The commit indludes  test/api_cases.uc6.json, test/api_cases.uc8.jsonand test/api_cases.uc8.json to demostrate the new process application to different user cases and archetypes.
…e app.yml file

Updating NbS process to define NbS table and mapping of hazards in the app.yml file. This change removes hardcoded matching of hazards from the API with hazards from the clc_nbs_hazazard_updated.csv table.
Correcting app.yml file to have nbs as an independant section. The configuration for nbs was embedded in hazards section before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant