ConservationInternational / cplus-plugin

QGIS plugin for using CPLUS framework in effective land-use planning
https://conservationinternational.github.io/cplus-plugin/
GNU General Public License v3.0
3 stars 6 forks source link

UR 3.1: Automate Carbon Calculations: Logic and UI #548

Open amyburness opened 2 days ago

amyburness commented 2 days ago

Expectation: image

1.1) As a plugin user, I want to calculate several carbon impact metrics for a scenario.

Acceptance Criteria:

1.1) When the user has run a scenario they should be provided with a UI (fig 2) in which to add and calculate custom carbon metrics based on the scenario outputs. 1.2) The user needs access to the expression builder to generate custom calculations 1.3) The user must have access to a CPLUS calculation library that gives guidance on Carbon calculations 1.4) The user must have access to variables required for the calculations from the scenario calculation.

amyburness commented 2 days ago

how we want to initiate step 5:

  1. This is and optional wizard we initiate this in step 4
  2. detect the activities chosen in step 2
  3. calculation guides for specific metrics
gkahiu commented 5 hours ago

@amyburness below is a summary of the proposed workflow with accompanying implementation notes:

A) Step 4 will now incorporate an option for customizing the metric table as shown below:

Implementation Notes Illustration
  1. Incorporate a checkbox for customizing output metrics table (see A)
  2. By default, the control will be unchecked
  3. If checked and the user does not define anything, then the output report will use the default table
  4. On clicking the edit button, a wizard will be shown with the steps described in B) below
  5. Clarification:
    • Should we persist the last-used custom metric configuration when QGIS is closed/restarted; OR,
    • Should we persist the custom design only for the current session that QGIS is open. Any restart of QGIS will default to 2 above and user has to redefine the customization afresh; OR,
    • User to redefine the customization afresh for each scenario run?
  6. In terms of level of effort, the first option will require much more time, whereas the last two options will take less time to incorporate
image

B) The wizard workflow is described below:

The UI mockups are for illustration purposes, and there will be slight changes in the actual implementation.

Step 1 – Intro Page

Implementation Notes Illustration
  1. Intro page with brief description and graphic illustration
  2. Propose an appropriate image and any additional text to use
image

Step 2 – Column Customization

Implementation Notes Illustration
  1. Area column will be loaded by default but the user will have the option of removing it
  2. Area metric control will be disabled since the value is auto-calculated
  3. Column name will be mandatory
  4. Default horizontal alignment will be Centre
  5. For convenience purposes, a user will have the option of specifying a column-wide metric
  6. If column metric is not specified then the user will have to specify the metric for each selected activity (in step 3)
image

Step 3 – Activity Metric Customization

Implementation Notes Illustration
  1. This will be an optional step on condition that a metric has been defined for each column in step 2
  2. If a column metric has been defined, user will have the option of choosing to retain it for all selected activities or define a custom metric for specific activities
  3. Greyed-out cells indicate the cell values are not editable
image

Step 4 – Summary and Save

Implementation Notes Illustration
  1. This will present a summary of the metrics configuration
  2. A user can hover over a specific activity metric to see the specific expression used
  3. On clicking Finish, the configuration will be saved and automatically initiate the report generation process
image

General Implementation Notes:

a. We can have two scenario analysis report templates: the default one (currently being used), which will be applied when no custom metrics are required, and a second one, which (re)moves the PWL weighting table to create more space on the left for additional user-defined metrics columns.