Model Findings
model_findings.json is the configuration file that defines the structure and content of insights generated by your machine learning model. It specifies visualization types, sections, subsections, and items to be displayed in the Chanterelle platform.
Table of Contents
- Overview
- Basic Structure
- Visualization Types
- Sections
- Dropdown Configuration
- Insight Items
- Complete Examples
Content Overview
The model_findings.json
file describes:
- Sections that group related insights
- Insight items with detailed specifications of Text and Visualizations supported by the platform
- Dropdowns and Subsections for filtering insights and dropdown functionality
Basic Structure
A model_findings.json
file follows this JSON schema:
{
"model_id": "example-model",
"version": "1.0.0",
"content": [
{
"type": "section",
"id": "section1",
"title": "Example Section",
"items": [
{
"type": "bar_chart",
"id": "chart1",
"title": "Example Bar Chart",
"data": {
"bars": [
{ "label": "A", "value": 10 },
{ "label": "B", "value": 20 }
],
"axis": {
"x": { "label": "Categories" },
"y": { "label": "Values" }
}
}
}
]
}
]
}
Insight Items and Visualization Types
Insight items represent text, individual visualizations or data points. Supported types include: Supported visualization types include:
bar_chart
line_chart
table
text
bullet_list
image
Each type has specific fields and configurations. Below are improved examples for each type, with optional fields explicitly marked:
Bar Chart
{
"type": "bar_chart",
"id": "chart1",
"title": "Example Bar Chart",
"description": "A bar chart example", // Optional
"comment": "This chart shows category values", // Optional
"data": {
"bars": [
{ "label": "A", "value": 10 },
{ "label": "B", "value": 20 }
],
"axis": {
"x": { "label": "Categories" },
"y": { "label": "Values" }
}
}
}
Line Chart
{
"type": "line_chart",
"id": "line1",
"title": "Example Line Chart",
"description": "A line chart example", // Optional
"comment": "This chart shows trends over time", // Optional
"data": {
"lines": [
{
"id": "lineA",
"points": [
{ "x": 1, "y": 10 },
{ "x": 2, "y": 20 }
],
"style": {
"color": "blue", // Optional
"width": 2 // Optional
}
}
],
"axis": {
"x": { "label": "Time" },
"y": { "label": "Values" }
}
}
}
Table
{
"type": "table",
"id": "table1",
"title": "Example Table",
"description": "A table example", // Optional
"comment": "This table shows data in rows and columns", // Optional
"data": {
"columns": [
{ "header": "Column 1", "field": "col1" },
{ "header": "Column 2", "field": "col2" }
],
"rows": [
{ "col1": "Row 1", "col2": 10 },
{ "col1": "Row 2", "col2": 20 }
]
}
}
Bullet List
{
"type": "bullet_list",
"id": "bullet1",
"title": "Example Bullet List",
"description": "A bullet list example", // Optional
"comment": "This list shows key points", // Optional
"data": {
"bullets": [
{ "text": "Bullet 1", "style": "bold" }, // Optional
{ "text": "Bullet 2", "style": "italic" } // Optional
]
}
}
Image
{
"type": "image",
"id": "image1",
"title": "Example Image",
"description": "An image example", // Optional
"caption": "This is an example image", // Optional
"comment": "This image illustrates the concept", // Optional
"url_filename": "example.png"
}
Text
{
"type": "text",
"id": "text1",
"title": "Example Text",
"description": "A text example", // Optional
"comment": "This text provides additional information", // Optional
"text": "This is a sample text insight."
}
Error
{
"type": "error",
"id": "error1",
"title": "Example Error",
"description": "An error example", // Optional
"comment": "This error occurred during processing", // Optional
"error": "File not found"
}
Sections
Sections group related insights and can include:
id
: Unique identifiertitle
: Display namedescription
: Optional help textitems
: Array of insight itemsdropdown
: (Optional) configuration for dropdown menus
Example Section
{
"type": "section",
"id": "section1",
"title": "Example Section",
"description": "This is an example section.",
"items": [
{
"type": "text",
"id": "text1",
"title": "Example Text",
"text": "This is a sample text insight."
}
]
}
Dropdown Configuration
Dropdowns allow users to select specific options to filter or customize the displayed insights. Each dropdown includes:
enabled
: Boolean indicating whether the dropdown is active.default_selection
: The default option selected when the dropdown is displayed.options
: Array of dropdown options, each with:id
: Unique identifier for the option.label
: Display name for the option.description
: Optional help text explaining the option.
subsections
: Nested subsections for each dropdown option, allowing further customization.
Subsections Properties
Subsections provide additional structure within dropdown options. Each subsection includes:
items
: Array of insight items to be displayed within the subsection. Insight items can include visualizations like charts, tables, images, or text.items_per_row
: Optional property specifying the number of items to display per row. Defaults to 1 if not provided.
Example of Dropdown Configuration
{
"dropdown": {
"enabled": true,
"default_selection": "overview",
"options": [
{
"id": "overview",
"label": "Overview",
"description": "General overview of the data"
},
{
"id": "details",
"label": "Details",
"description": "Detailed breakdown of the data"
},
{
"id": "summary",
"label": "Summary",
"description": "Summary of key insights"
}
]
},
"subsections": {
"overview": {
"items_per_row": 2, // Optional
"items": [
{
"type": "text",
"id": "overview_text",
"title": "Overview Text",
"text": "This section provides a general overview of the data."
}
]
},
"details": {
"items_per_row": 1, // Optional
"items": [
{
"type": "table",
"id": "details_table",
"title": "Detailed Data Table",
"data": {
"columns": [
{ "header": "Column 1", "field": "col1" },
{ "header": "Column 2", "field": "col2" }
],
"rows": [
{ "col1": "Row 1", "col2": 10 },
{ "col1": "Row 2", "col2": 20 }
]
}
}
]
},
"summary": {
"items_per_row": 1, // Optional
"items": [
{
"type": "image", // just an example, can be any type
"id": "summary_image",
"title": "Summary Image",
"url_filename": "images/summary.png"
}
]
}
}
}
Complete Example
{
"model_id": "example-model",
"version": "1.0.0",
"content": [
{
"type": "section",
"id": "section1",
"title": "Example Section",
"items": [
{
"type": "bar_chart",
"id": "chart1",
"title": "Example Bar Chart",
"data": {
"bars": [
{ "label": "A", "value": 10 },
{ "label": "B", "value": 20 }
],
"axis": {
"x": { "label": "Categories" },
"y": { "label": "Values" }
}
}
}
]
}
]
}
Decomposing and referencing other json files
You can decompose the model_meta.json
file into smaller, more manageable files. This can also be useful if you have json generated programmatically or if you want to keep your project organized.
You can reference other JSON files that include sections or insight items. This allows you to maintain a clean structure and reuse common configurations across different models.
If you want to include content from other JSON files, you can use the $ref
keyword to reference the external file and the specific section you want to include. For example:
For sections:
{
"model_id": "example-model",
"version": "1.0.0",
"content": [
{
"$ref": "path/to/other_file.json#/section1"
}
]
}
For insight items:
{
"model_id": "example-model",
"version": "1.0.0",
"content": [
{
"type": "section",
"id": "section1",
"title": "Example Section",
"items": [
{
"$ref": "path/to/other_file.json#/items/item1"
}
]
}
]
}