Skip to content

Add Scenario management #593

Description

@pplonski

Add scenario support to Mercury for what-if analysis.

Expected use case

A user wants to save several versions of an analysis, for example:

  • Baseline
  • High growth
  • Low price

Each scenario contains:

  • scenario name
  • inputs
  • outputs

User can later load or compare saved scenarios.

V1

Add:

  • Save scenario button
  • ask for scenario name
  • save provided inputs
  • save provided outputs
  • scenario selector
  • Compare button showing scenarios side by side

Possible API:

mr.Scenarios(
    inputs={
        "Growth": growth,
        "Price": price,
    },
    outputs={
        "Revenue": revenue,
        "Profit": profit,
    },
)

Example comparison:

              Baseline   High growth
Growth            5%          15%
Price            $50          $50
Revenue         $4.1M        $5.2M
Profit          $1.2M        $1.6M

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions