Generate chartpacks

Exactly one of chartpack and chartpacks is required. These are setup instructions for creating chartpack files. They use a different structure from the standalone YAML.

The reviewed setup generator supports all nine chart families and their 1.4 presentation controls. Select version: "1.4.0" in each pack to use those features. Omitting the version retains numeric 1; the generator does not upgrade the format automatically. Check package and template compatibility when using an older installation. Setup does not choose the runtime HTML template; that path belongs in the experiment’s run script.

One chartpack

chartpack:
  file_name: chartpack.yaml
  title: Policy experiment
  version: "1.4.0"
  first_result_year: 2026
  last_result_year: 2050
  table_of_contents: true
  sector_selection_dimensions: [sectors]
  sector_selection_include_default: false
  derivations: [GDPRGROWTH]
  max_series_per_chart: 12
  charts:
    - variable_prefix: GDPRGROWTH
      selectors:
        - dimension: regions
          members: all

max_series_per_chart splits a large selector result into readable charts. Its default is 25. Heatmaps, small multiples, scatter plots, compositions and waterfalls keep their related series together regardless of this limit.

sector_selection_dimensions lists the dimensions shown in the generated HTML report’s sector-selection control. With the list present, sector_selection_include_default: true also includes the template’s automatically discovered sector and goods dimensions; false uses only the listed dimensions. The include-default field requires the explicit list.

A chart with selected styled series

charts:
  - section: Financial outcomes
    title: Real interest rates
    start_year: 2026
    end_year: 2040
    y_axis:
      min: -2
      max: 8
    series:
      - variable: INTR(USA)
        label: USA
        style:
          colour: "#2455a4"
          line: solid
      - variable: INTR(CHN)
        label: China
        style:
          colour: "#d62728"
          line: dash

The optional section is emitted immediately before the first chart slice created from this declaration. It is not repeated when max_series_per_chart creates further slices.

A series-delta chart

charts:
  - section: Changes over time
    title: Change in real interest rates
    chart_type: series-delta
    start_year: 2026
    end_year: 2040
    series:
      - variable: INTR(USA)
      - variable: INTR(CHN)
        start_year: 2030
        end_year: 2045

The generated bars show the ending value minus the starting value. A series-level year replaces the corresponding chart-level year. Use this explicit series form when a chart needs section or chart_type; the single-series shorthand cannot carry either field.

Regional snapshots and deviation heatmaps

This setup fragment generates a pack for real GDP deviations from baseline. Supply the experiment’s deviation data when producing the report. The chart selects observations; it does not compute the baseline comparison. Confirm the GDP deviation units in your export before choosing the axis label.

chartpack:
  title: Real GDP effects relative to baseline
  version: "1.4.0"
  first_result_year: 2026
  last_result_year: 2050
  charts:
    - section: Regional outcomes
      title: Real GDP effects in 2030
      caption: Percentage deviations from baseline in the selected year.
      chart_type: series-value
      year: 2030
      year_selector: true
      orientation: horizontal
      color_by_sign: true
      show_labels: true
      x_axis: { label: "Deviation from baseline (%)" }
      y_axis: { label: Region }
      series:
        - variable_prefix: GDPR
          selectors:
            - dimension: regions
              members: all
    - title: Real GDP effects over time
      chart_type: heatmap
      x_dimension: year
      y_dimension: regions
      x_axis: { label: Year }
      y_axis: { label: Region }
      color_axis:
        min: -2
        max: 2
        midpoint: 0
        palette: semantic-diverging
      series:
        - variable_prefix: GDPR
          selectors:
            - dimension: regions
              members: all

Use ordinary lines for GDP or inflation paths when precise timing matters; use the heatmap to scan positive and negative effects across regions and many years. Adjust the symmetric colour bounds to cover the deviations in your data; the example uses −2% to +2%. A year axis already includes the time dimension, so this heatmap does not need a Year selector. For sector output, use small-multiples with facet_dimension: regions and group_dimension: sectors, selecting a sector output prefix and the corresponding members for the target model. See the illustrated guide for the complete chart declarations and economic data requirements.

Several output files

chartpacks:
  - file_name: chartpack.yaml
    title: Main results
    charts:
      - variable_prefix: GDPR
        selectors:
          - dimension: regions
            members: all
  - file_name: target_comparison.yaml
    title: Target comparison
    first_result_year: 2026
    last_result_year: 2035
    charts:
      - variable: target_CO2(USA)

In plural form, every filename is required and unique. See standalone chartpack YAML for the generated file syntax.