Ompp UI Microdata Aggregate and Compare - openmpp/openmpp.github.io GitHub Wiki

Home > Aggregate and Compare Microdata

This topic shows functionality of the OpenM++ UI through annotated screenshots. The UI can also be explored by hovering over elements to display short descriptions. To find additional information about model run comparison please see: Compare model run results

Microdata UI has two views:

  • source (raw) microdata view
  • aggregation and run comparison microdata view

OpenM++ UI: microdata views

Aggregation and compare view allow you to aggregate source microdata attributes, group it by selected dimensions attributes and optionally compare microdata from Base model run to one or more Variant model runs.

To aggregate microdata do following:

  • click on Aggregate microdata button to open the menu
  • select desired aggregation, on screenshots example below it is Average
  • select one or more dimension attributes to group microdata, for example: Age Group, Gender
  • select one or more measure attributes, for example: Income
  • click on Apply button to se the results

OpenM++ UI: select microdata aggregation

OpenM++ UI: select microdata aggregation dimensions

OpenM++ UI: select microdata aggregation measures

As result you will see an Average Income grouped by Age Group and Gender:

OpenM++ UI: microdata aggregation view

Compare model runs microdata

In order to compare microdata from Base run you need to select one or more Variant model runs to compare with and open your microdata. On screenshots below it is Person entity microdata:

OpenM++ UI: select model runs to compare microdata

After that you will need to:

  • click on Aggregate microdata button to open the menu
  • select desired comparison, on screenshots example below it is Percent, calculated as:
100 * (Variant Measure Value - Base Measure Value) / Base Measure Value
  • select desired aggregation, for example: Average
  • select one or more dimension attributes to group microdata, for example: Age Group, Gender
  • select one or more measure attributes, for example: Income
  • click on Apply button to see the results

OpenM++ UI: select microdata model runs comparison

Results below:

  • Average Income grouped by Age Group and Gender side by side for Base and Variant model runs
  • Calculated comparison values: Average Percent of Income difference for each Variant model runs

Important: It is strongly recommended to drag Measure dimension on columns or rows.

Important: You may need to increase "page size" (number of rows to display), default value is 10 only, below it is 40.

OpenM++ UI: microdata comparison view

Adavnced microdata aggregation and comparison

If standard aggregation and comparison menu does not cover your needs then it is possible to Edit, add or remove aggregation and comparison measures.

You can use any Output Expressions but top level must be an aggregation function or combination of. For example, it can be: OM_AVG(Income) + OM_AVG(Tax) but cannot be: Income + OM_AVG(Tax).

To edit existing measures, remove or add more click on Edit... menu button:

OpenM++ UI: Edit button in microdata aggregation menu

OpenM++ UI: edit microdata aggregation and comparison

For example to compare Base case and Tax changes then we can find how many Person are winners and losers in each Age Group and Gender. In order to do it:

  • select Base_values and TaxChanges model runs for comparison
  • in Person microdata Edit... comparison measures and enter:
    • Label Winners 125% is count of Persons who have Tax changes model run income > 125% of Base case income
    • Label Losers 75% is count of Persons who have Tax changes model run income < 75% of Base case income
OM_COUNT_IF( (100.0 * Income[variant] / Income[base]) > 125)
OM_COUNT_IF( (100.0 * Income[variant] / Income[base]) <  75)
  • click on Apply dialog button

OpenM++ UI: edit microdata comparison

OpenM++ UI: edit microdata aggregation and comparison

⚠️ **GitHub.com Fallback** ⚠️