Charts
A G-Cubed chartpack selects projection series and organises them into a report. Changing a chartpack changes presentation, not the model or its results.
Related YAML documentation: chartpack YAML, series selectors, labels and styles and setup-generated chartpacks.
A small chartpack
- chartpack:
format: gcubed-chartpack
version: 1
title: Policy experiment
- chart:
title: Inflation
series:
- variable: INFL(USA)
- variable: INFL(CHN)
Build 199 chartpacks use .yaml and the chart-template-2.0.html reporting template.
Select model members
Use an exact variable for a known line or a selector to expand a prefix:
- chart:
title: Real GDP by region
series:
- variable_prefix: GDPR
selectors:
regions: all
Selectors are resolved against the target projections. Every selected series in one chart must have the same units.
Generate chartpacks from setup
Setup uses a concise, model-aware declaration and writes standalone chartpack YAML. The two grammars differ: setup uses ordered selector records and the style key colour; a standalone chartpack uses selector mappings and color.
See generate chartpacks for single and multiple output files.
Projection CSV files
G-Cubed reports use charting projections or deviations written by a run script. These projection data files remain CSV. Their leading columns identify and describe each series:
| Column | Meaning |
|---|---|
| first column | Full G-Cubed variable name |
prefix | Variable-name prefix |
set_member_descriptions | Descriptions of the selected set members |
description | Description of the variable |
units | Units of measurement |
vector | G-Cubed vector type |
region | G-Cubed region associated with the variable |
YYYY columns | Projection values for each year, in order |
When creating a chartpack, start from a build 199 YAML chartpack for the same model and adapt its charts and selectors. Lists of related variable names in a projection CSV can help identify useful series, but the chartpack itself must remain YAML.
Produce the report
The maintained baseline or experiment run script selects the standalone chartpack and produces the report. Setup does not run the model and a standalone chartpack does not calculate derived variables by itself.
This page does not currently provide a supported build 199 YAML chartpack browser application. Use the normal Python reporting workflow documented by the maintained run script.
G-Cubed