Base URL:

Change aggregates

Compute change statistics comparing baseline vs reform simulations. Accepts a list of specifications.

List change aggregates

GET/outputs/change-aggregates

Retrieve all computed change aggregates.

https://v2.api.policyengine.org/outputs/change-aggregates

Get change aggregate

GET/outputs/change-aggregates/:output_id

Retrieve a specific change aggregate result.

Path parameters

https://v2.api.policyengine.org/outputs/change-aggregates/990e8400-e29b-41d4-a716-446655440000

Create change aggregates (batch)

POST/outputs/change-aggregates

Create multiple change aggregates from a list of specifications.

Request body

https://v2.api.policyengine.org/outputs/change-aggregates

Change aggregate specification

baseline_simulation_idUUID - Baseline simulation
reform_simulation_idUUID - Reform simulation
variablestring - Variable name to compare
aggregate_typesum | mean | count
entitystring - Entity level
change_geqnumber | null - Filter: change greater than or equal to
change_leqnumber | null - Filter: change less than or equal to

Aggregate types

sumTotal change across population (weighted)
meanWeighted average change
countNumber of entities (use with change_geq/change_leq to count winners/losers)