Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    ArrowNotImplementedError
Message:      Cannot write struct type 'timeStats' with no child field to Parquet. Consider adding a dummy child field.
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2011, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 583, in write_table
                  self._build_writer(inferred_schema=pa_table.schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 404, in _build_writer
                  self.pa_writer = self._WRITER_CLASS(self.stream, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 1010, in __init__
                  self.writer = _parquet.ParquetWriter(
                File "pyarrow/_parquet.pyx", line 2157, in pyarrow._parquet.ParquetWriter.__cinit__
                File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
              pyarrow.lib.ArrowNotImplementedError: Cannot write struct type 'timeStats' with no child field to Parquet. Consider adding a dummy child field.
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2027, in _prepare_split_single
                  num_examples, num_bytes = writer.finalize()
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 602, in finalize
                  self._build_writer(self.schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 404, in _build_writer
                  self.pa_writer = self._WRITER_CLASS(self.stream, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 1010, in __init__
                  self.writer = _parquet.ParquetWriter(
                File "pyarrow/_parquet.pyx", line 2157, in pyarrow._parquet.ParquetWriter.__cinit__
                File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
              pyarrow.lib.ArrowNotImplementedError: Cannot write struct type 'timeStats' with no child field to Parquet. Consider adding a dummy child field.
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1529, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1154, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1027, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1122, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2038, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

COLOR_NOMINAL_VS_QUANTITATIVE
bool
ancestor_ids
sequence
seed_data_name
string
COLOR_SAME_QUANTITATIVE
bool
parent_id
string
cost
int64
COLOR_CONSTANT_VS_QUANTITATIVE
bool
source_code
string
COLOR_CONSTANT_VS_NOMINAL
bool
COLOR_DIFF_QUANTITATIVE
bool
SHAPE_SAME_NOMINAL
bool
XY_MEASURE_NAMES
bool
revision_step
string
COLOR_DIFF_NOMINAL
bool
file_number
int64
CHANNEL_FIELD_SHIFT
bool
revision_step_function
string
seed_data_stats
list
provenance_step_types
sequence
parent_source_code
string
is_consistent
bool
CHANNEL_FIELD_SWAP
bool
number_of_charts_in_dashboard
int64
SHAPE_DIFF_NOMINAL
bool
XY_SAME_QUANTITATIVE
bool
SIZE_SAME_QUANTITATIVE
bool
SIZE_NO_DIFF
bool
COLOR_SAME_NOMINAL
bool
SHAPE_CONSTANT
bool
id
string
XY_SAME_NOMINAL
bool
provenance
sequence
provenance_step_costs
sequence
false
[ "" ]
Barley
false
4
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
false
false
false
false
REVISION_STEP_ADD_CHART
false
0
false
function addChart(parent, stepType, allFields, option) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_ADD_CHART; } if (option === void 0) { option = 'random'; } var _a = parent.dashboard, chartIDs = _a.chartIDs, chartTitles = _a.chartTitles, vlSpecs = _a.vlSpecs; var enumerated = []; if (vlSpecs.length >= 5) { return enumerated; } // keep at most 5 charts in dashboard switch (option) { case 'empty': enumerated.push(__assign({}, parent.dashboard, { stepType: stepType, textDescription: NL_EMPTY[Math.floor(Math.random() * NL_EMPTY.length)], chartIDs: __spread(chartIDs, [chartIDs.length]), chartTitles: __spread(chartTitles, ["untitled"]), vlSpecs: __spread(vlSpecs, [models_1.DEFAULT_SPEC]), hasBeen: __assign({}, parent.dashboard.hasBeen) })); break; case 'random': var ENCODINGS = 3; var _b = getRandomChart(ENCODINGS, allFields), spec = _b.spec, provenance = _b.provenance; enumerated.push(__assign({}, parent.dashboard, { stepType: stepType, textDescription: provenance.join(' '), chartIDs: __spread(chartIDs, [chartIDs.length]), chartTitles: __spread(chartTitles, ["untitled"]), vlSpecs: __spread(vlSpecs, [spec]), hasBeen: __assign({}, parent.dashboard.hasBeen) })); break; default: break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART" ]
false
false
1
false
false
false
false
false
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape." ]
[ 4 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]" ]
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
5
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"value":"#83bcb6"}}}]
false
false
false
false
REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS
false
1
false
function enumSetConstantColorInAllCharts(parent, stepType, enumerate, sampleSize) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS; } if (enumerate === void 0) { enumerate = 'random'; } if (sampleSize === void 0) { sampleSize = models_1.SAMPLE_SIZE; } // if default color has already been set, don't set again // in this way, we only set default color once from root to each leaf if (parent.dashboard.hasBeen.setConstantColor) { return []; } var enumerated = []; switch (enumerate) { case 'common': for (var c in color_def_1.COMMON_CONSTANT_COLORS) { var color = color_def_1.COMMON_CONSTANT_COLORS[c]; var withColorSet = setConstantColorInAllCharts(parent, stepType, color); if (withColorSet) { enumerated.push(withColorSet); } } break; case 'random': for (var i = 0; i < sampleSize; i++) { var color = Object.values(color_def_1.TABLEAU20)[Math.floor(Math.random() * 20)]; var withColorSet = setConstantColorInAllCharts(parent, stepType, color); if (withColorSet) { enumerated.push(withColorSet); } } default: break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
true
false
1
false
false
false
false
false
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"value":"#83bcb6"}}}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Set the default color to #83bcb6 in all charts." ]
[ 4, 1 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]" ]
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
6
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"x":{"field":"yield","type":"quantitative"}}}]
false
false
false
false
REVISION_STEP_ADD_FIELD
false
2
false
function enumAddField(parent, stepType, allFields, enumerate, sampleSize) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_ADD_FIELD; } if (enumerate === void 0) { enumerate = 'random'; } if (sampleSize === void 0) { sampleSize = models_1.SAMPLE_SIZE; } var enumerated = []; var allConsistencySpecs = parent.consistencySpecs; var allChannels = ['x', 'y', 'color', 'size', 'shape']; switch (enumerate) { case 'all': allFields.all.forEach(function (field) { allConsistencySpecs.forEach(function (cSpec, index) { allChannels.forEach(function (channel) { var withFieldAdded = addField(parent.dashboard, cSpec, index, stepType, field, channel); if (withFieldAdded) { enumerated.push(withFieldAdded); } }); }); }); break; case 'random': for (var i = 0; i < sampleSize; i++) { var field = allFields.all[Math.floor(Math.random() * allFields.all.length)]; var index = Math.floor(Math.random() * allConsistencySpecs.length); if ((parent.dashboard.vlSpecs[index].description || '').startsWith('vl-template-')) { continue; } // skip template var cSpec = allConsistencySpecs[index]; var channelPool = channel_field_1.getChannelPool(cSpec.channelFieldMap); var channel = channelPool[Math.floor(Math.random() * channelPool.length)]; var withFieldAdded = addField(parent.dashboard, cSpec, index, stepType, field, channel); if (withFieldAdded) { enumerated.push(withFieldAdded); } } break; case 'nominal': case 'quantitative': default: break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_ADD_FIELD" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
true
false
1
false
false
false
false
false
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"x":{"field":"yield","type":"quantitative"}}}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Add \"yield\" to x in chart 1." ]
[ 4, 2 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":...
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"x":{"field":"yield","type":"quantitative"}}}]
7
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"x":{"field":"yield","type":"quantitative"},"color":{"value":"#d6a5c9"}}}]
false
false
false
false
REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS
false
3
false
function enumSetConstantColorInAllCharts(parent, stepType, enumerate, sampleSize) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS; } if (enumerate === void 0) { enumerate = 'random'; } if (sampleSize === void 0) { sampleSize = models_1.SAMPLE_SIZE; } // if default color has already been set, don't set again // in this way, we only set default color once from root to each leaf if (parent.dashboard.hasBeen.setConstantColor) { return []; } var enumerated = []; switch (enumerate) { case 'common': for (var c in color_def_1.COMMON_CONSTANT_COLORS) { var color = color_def_1.COMMON_CONSTANT_COLORS[c]; var withColorSet = setConstantColorInAllCharts(parent, stepType, color); if (withColorSet) { enumerated.push(withColorSet); } } break; case 'random': for (var i = 0; i < sampleSize; i++) { var color = Object.values(color_def_1.TABLEAU20)[Math.floor(Math.random() * 20)]; var withColorSet = setConstantColorInAllCharts(parent, stepType, color); if (withColorSet) { enumerated.push(withColorSet); } } default: break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_ADD_FIELD", "REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"x":{"field":"yield","type":"quantitative"}}}]
true
false
1
false
false
false
false
false
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"x":{"field":"yield","type":"quantitative"},"color":{"value":"#d6a5c9"}}}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Add \"yield\" to x in chart 1.", "The dashboard should be #d6a5c9." ]
[ 4, 2, 1 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":...
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"value":"#83bcb6"}}}]
7
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"field":"year","type":"nominal"}}}]
false
false
false
false
REVISION_STEP_ADD_FIELD
false
4
false
function enumAddField(parent, stepType, allFields, enumerate, sampleSize) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_ADD_FIELD; } if (enumerate === void 0) { enumerate = 'random'; } if (sampleSize === void 0) { sampleSize = models_1.SAMPLE_SIZE; } var enumerated = []; var allConsistencySpecs = parent.consistencySpecs; var allChannels = ['x', 'y', 'color', 'size', 'shape']; switch (enumerate) { case 'all': allFields.all.forEach(function (field) { allConsistencySpecs.forEach(function (cSpec, index) { allChannels.forEach(function (channel) { var withFieldAdded = addField(parent.dashboard, cSpec, index, stepType, field, channel); if (withFieldAdded) { enumerated.push(withFieldAdded); } }); }); }); break; case 'random': for (var i = 0; i < sampleSize; i++) { var field = allFields.all[Math.floor(Math.random() * allFields.all.length)]; var index = Math.floor(Math.random() * allConsistencySpecs.length); if ((parent.dashboard.vlSpecs[index].description || '').startsWith('vl-template-')) { continue; } // skip template var cSpec = allConsistencySpecs[index]; var channelPool = channel_field_1.getChannelPool(cSpec.channelFieldMap); var channel = channelPool[Math.floor(Math.random() * channelPool.length)]; var withFieldAdded = addField(parent.dashboard, cSpec, index, stepType, field, channel); if (withFieldAdded) { enumerated.push(withFieldAdded); } } break; case 'nominal': case 'quantitative': default: break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS", "REVISION_STEP_ADD_FIELD" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"value":"#83bcb6"}}}]
true
false
1
false
false
false
false
false
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"field":"year","type":"nominal"}}}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Set the default color to #83bcb6 in all charts.", "In chart 1, add field \"year\" to color." ]
[ 4, 1, 2 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":...
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"x":{"field":"yield","type":"quantitative"}}}]
8
false
[{"mark":"point","data":{"name":"source"},"encoding":{"shape":{"field":"year","type":"nominal"},"x":{"field":"yield","type":"quantitative"}}}]
false
false
false
false
REVISION_STEP_REMOVE_FIELD
false
5
false
function enumRemoveField(parent, stepType, enumerate, sampleSize) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_REMOVE_FIELD; } if (enumerate === void 0) { enumerate = 'random'; } if (sampleSize === void 0) { sampleSize = models_1.SAMPLE_SIZE; } var enumerated = []; switch (enumerate) { case 'all': parent.consistencySpecs.forEach(function (cSpec, index) { for (var channel in cSpec.channelFieldMap) { var field = cSpec.channelFieldMap[channel]; if (field) { var withFieldRemoved = removeField(parent.dashboard, cSpec, index, stepType, field, channel); if (withFieldRemoved) { enumerated.push(withFieldRemoved); } } } }); break; case 'random': for (var i = 0; i < sampleSize; i++) { var index = Math.floor(Math.random() * parent.consistencySpecs.length); if ((parent.dashboard.vlSpecs[index].description || '').startsWith('vl-template-')) { continue; } // skip template var cSpec = parent.consistencySpecs[index]; var couldBeRemovedChannels = [ 'x', 'y', 'color', 'size', 'shape', ]; var channel = couldBeRemovedChannels[Math.floor(Math.random() * couldBeRemovedChannels.length)]; var field = cSpec.channelFieldMap[channel]; if (field) { var withFieldRemoved = removeField(parent.dashboard, cSpec, index, stepType, field, channel); if (withFieldRemoved) { enumerated.push(withFieldRemoved); } } } break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_ADD_FIELD", "REVISION_STEP_REMOVE_FIELD" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"x":{"field":"yield","type":"quantitative"}}}]
true
false
1
false
false
false
false
false
false
[{"mark":"point","data":{"name":"source"},"encoding":{"shape":{"field":"year","type":"nominal"},"x":{"field":"yield","type":"quantitative"}}}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Add \"yield\" to x in chart 1.", "Delete site from y in chart 1." ]
[ 4, 2, 2 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":...
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"value":"#83bcb6"}}}]
8
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"variety","type":"nominal"},"color":{"value":"#83bcb6"}}}]
false
false
false
false
REVISION_STEP_REPLACE_FIELD
false
6
false
function enumReplaceField(parent, stepType, fields, enumerate, sampleSize) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_REPLACE_FIELD; } if (enumerate === void 0) { enumerate = 'random'; } if (sampleSize === void 0) { sampleSize = models_1.SAMPLE_SIZE; } var enumerated = []; var allConsistencySpecs = parent.consistencySpecs; var allChannels = ['x', 'y', 'color', 'size', 'shape']; switch (enumerate) { case 'all': fields.all.forEach(function (field) { allConsistencySpecs.forEach(function (cSpec, index) { allChannels.forEach(function (channel) { var withFieldReplaced = replaceField(parent.dashboard, cSpec, index, stepType, field, channel); if (withFieldReplaced) { enumerated.push(withFieldReplaced); } }); }); }); break; case 'random': for (var i = 0; i < sampleSize; i++) { var field = fields.all[Math.floor(Math.random() * fields.all.length)]; var index = Math.floor(Math.random() * allConsistencySpecs.length); if ((parent.dashboard.vlSpecs[index].description || '').startsWith('vl-template-')) { continue; } // skip template var cSpec = allConsistencySpecs[index]; var probablisticChannels = [ 'x', 'x', 'x', 'y', 'y', 'y', 'color', 'color', 'size', 'shape', ]; var channel = probablisticChannels[Math.floor(Math.random() * probablisticChannels.length)]; var withFieldReplaced = replaceField(parent.dashboard, cSpec, index, stepType, field, channel); if (withFieldReplaced) { enumerated.push(withFieldReplaced); } } break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS", "REVISION_STEP_REPLACE_FIELD" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"value":"#83bcb6"}}}]
true
false
1
false
false
false
false
false
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"variety","type":"nominal"},"color":{"value":"#83bcb6"}}}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Set the default color to #83bcb6 in all charts.", "Remove year in chart 1 and add variety instead." ]
[ 4, 1, 3 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]" ]
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
8
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}},{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"name":"source"},"vconcat":[{"params":[{"name":"brush","select":"interval"}],"mark":"point","encoding":{"x":{"field":"yield","type":"quantitative","title":"yield"},"y":{"field":"yield","type":"quantitative","title":"yield"}}},{"transform":[{"filter":{"param":"brush"}}],"mark":"point","encoding":{"x":{"field":"yield","type":"quantitative","scale":{},"title":"yield"},"y":{"field":"yield","type":"quantitative","scale":{},"title":"yield"}}}],"index":643,"description":"vl-template-643","title":""}]
false
false
false
false
REVISION_STEP_ADD_TEMPLATE
false
7
false
function enumAddTemplate(parent, stepType, gallery, fields, enumerate, sampleSize) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_ADD_TEMPLATE; } if (enumerate === void 0) { enumerate = 'random'; } if (sampleSize === void 0) { sampleSize = models_1.SAMPLE_SIZE; } var enumerated = []; switch (enumerate) { case 'random': for (var i = 0; i < sampleSize; i++) { var index = WORKING_TEMPLATES[Math.floor(Math.random() * WORKING_TEMPLATES.length)]; var templateWithProvenance = replaceAllFieldsInTemplate(gallery[index], index, fields); if (!templateWithProvenance) { continue; } if (templateWithProvenance.provenance.length <= 1) { continue; } // (hack): patch for empty template var withTemplateAdded = addTemplate(parent, stepType, templateWithProvenance); if (withTemplateAdded) { enumerated.push(withTemplateAdded); } } break; case 'all': for (var i = 0; i < WORKING_TEMPLATES.length; i++) { var templateWithProvenance = replaceAllFieldsInTemplate(gallery[i], i, fields); if (!templateWithProvenance) { continue; } var withTemplateAdded = addTemplate(parent, stepType, templateWithProvenance); if (withTemplateAdded) { enumerated.push(withTemplateAdded); } } break; default: break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_ADD_TEMPLATE" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
false
false
2
false
false
false
false
false
true
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}},{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"name":"source"},"vconcat":[{"params":[{"name":"brush","select":"interval"}],"mark":"point","encoding":{"x":{"field":"yield","type":"quantitative","title":"yield"},"y":{"field":"yield","type":"quantitative","title":"yield"}}},{"transform":[{"filter":{"param":"brush"}}],"mark":"point","encoding":{"x":{"field":"yield","type":"quantitative","scale":{},"title":"yield"},"y":{"field":"yield","type":"quantitative","scale":{},"title":"yield"}}}],"index":643,"description":"vl-template-643","title":""}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Add vl-template-643 to the dashboard. Replace field in x with yield. Plug in yield on y. Plug in \"yield\" Replace field in y with yield." ]
[ 4, 4 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]" ]
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
8
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}},{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"name":"source"},"repeat":{"row":["Displacement","Miles_per_Gallon"],"column":["Horsepower","Miles_per_Gallon"]},"spec":{"mark":"point","encoding":{"x":{"field":"yield","type":"quantitative","title":"yield"},"y":{"field":"yield","type":"quantitative","title":"yield"},"color":{"field":"year","type":"nominal","title":"year"}}},"index":630,"description":"vl-template-630","title":""}]
false
false
false
false
REVISION_STEP_ADD_TEMPLATE
false
8
false
function enumAddTemplate(parent, stepType, gallery, fields, enumerate, sampleSize) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_ADD_TEMPLATE; } if (enumerate === void 0) { enumerate = 'random'; } if (sampleSize === void 0) { sampleSize = models_1.SAMPLE_SIZE; } var enumerated = []; switch (enumerate) { case 'random': for (var i = 0; i < sampleSize; i++) { var index = WORKING_TEMPLATES[Math.floor(Math.random() * WORKING_TEMPLATES.length)]; var templateWithProvenance = replaceAllFieldsInTemplate(gallery[index], index, fields); if (!templateWithProvenance) { continue; } if (templateWithProvenance.provenance.length <= 1) { continue; } // (hack): patch for empty template var withTemplateAdded = addTemplate(parent, stepType, templateWithProvenance); if (withTemplateAdded) { enumerated.push(withTemplateAdded); } } break; case 'all': for (var i = 0; i < WORKING_TEMPLATES.length; i++) { var templateWithProvenance = replaceAllFieldsInTemplate(gallery[i], i, fields); if (!templateWithProvenance) { continue; } var withTemplateAdded = addTemplate(parent, stepType, templateWithProvenance); if (withTemplateAdded) { enumerated.push(withTemplateAdded); } } break; default: break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_ADD_TEMPLATE" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
false
false
2
false
false
false
false
false
true
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}},{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"name":"source"},"repeat":{"row":["Displacement","Miles_per_Gallon"],"column":["Horsepower","Miles_per_Gallon"]},"spec":{"mark":"point","encoding":{"x":{"field":"yield","type":"quantitative","title":"yield"},"y":{"field":"yield","type":"quantitative","title":"yield"},"color":{"field":"year","type":"nominal","title":"year"}}},"index":630,"description":"vl-template-630","title":""}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Add vl-template-630 to the dashboard and plug in my data: Replace field in x with yield. Replace [object Object] with yield on y. Plug in year on color." ]
[ 4, 4 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]" ]
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
8
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}},{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"year","type":"nominal"},"color":{"field":"year","type":"nominal"}}}]
true
false
false
false
REVISION_STEP_ADD_CHART
false
9
true
function addChart(parent, stepType, allFields, option) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_ADD_CHART; } if (option === void 0) { option = 'random'; } var _a = parent.dashboard, chartIDs = _a.chartIDs, chartTitles = _a.chartTitles, vlSpecs = _a.vlSpecs; var enumerated = []; if (vlSpecs.length >= 5) { return enumerated; } // keep at most 5 charts in dashboard switch (option) { case 'empty': enumerated.push(__assign({}, parent.dashboard, { stepType: stepType, textDescription: NL_EMPTY[Math.floor(Math.random() * NL_EMPTY.length)], chartIDs: __spread(chartIDs, [chartIDs.length]), chartTitles: __spread(chartTitles, ["untitled"]), vlSpecs: __spread(vlSpecs, [models_1.DEFAULT_SPEC]), hasBeen: __assign({}, parent.dashboard.hasBeen) })); break; case 'random': var ENCODINGS = 3; var _b = getRandomChart(ENCODINGS, allFields), spec = _b.spec, provenance = _b.provenance; enumerated.push(__assign({}, parent.dashboard, { stepType: stepType, textDescription: provenance.join(' '), chartIDs: __spread(chartIDs, [chartIDs.length]), chartTitles: __spread(chartTitles, ["untitled"]), vlSpecs: __spread(vlSpecs, [spec]), hasBeen: __assign({}, parent.dashboard.hasBeen) })); break; default: break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_ADD_CHART" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}}]
false
false
2
false
false
false
false
false
true
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}},{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"year","type":"nominal"},"color":{"field":"year","type":"nominal"}}}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Create a new empty chart. Add field \"year\" to y. Add year to color." ]
[ 4, 4 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":...
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}},{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"year","type":"nominal"},"color":{"field":"year","type":"nominal"}}}]
9
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"value":"#9ecae9"}}},{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"year","type":"nominal"},"color":{"field":"year","type":"nominal"}}}]
false
false
false
false
REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS
false
10
true
function enumSetConstantColorInAllCharts(parent, stepType, enumerate, sampleSize) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS; } if (enumerate === void 0) { enumerate = 'random'; } if (sampleSize === void 0) { sampleSize = models_1.SAMPLE_SIZE; } // if default color has already been set, don't set again // in this way, we only set default color once from root to each leaf if (parent.dashboard.hasBeen.setConstantColor) { return []; } var enumerated = []; switch (enumerate) { case 'common': for (var c in color_def_1.COMMON_CONSTANT_COLORS) { var color = color_def_1.COMMON_CONSTANT_COLORS[c]; var withColorSet = setConstantColorInAllCharts(parent, stepType, color); if (withColorSet) { enumerated.push(withColorSet); } } break; case 'random': for (var i = 0; i < sampleSize; i++) { var color = Object.values(color_def_1.TABLEAU20)[Math.floor(Math.random() * 20)]; var withColorSet = setConstantColorInAllCharts(parent, stepType, color); if (withColorSet) { enumerated.push(withColorSet); } } default: break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_ADD_CHART", "REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}},{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"year","type":"nominal"},"color":{"field":"year","type":"nominal"}}}]
false
false
2
false
false
false
false
false
true
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"value":"#9ecae9"}}},{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"year","type":"nominal"},"color":{"field":"year","type":"nominal"}}}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Create a new empty chart. Add field \"year\" to y. Add year to color.", "When possible, use color #9ecae9 in charts." ]
[ 4, 4, 1 ]
false
[ "", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":\"year\",\"type\":\"nominal\"}}}]", "[{\"mark\":\"point\",\"data\":{\"name\":\"source\"},\"encoding\":{\"y\":{\"field\":\"site\",\"type\":\"nominal\"},\"shape\":{\"field\":...
Barley
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}},{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"name":"source"},"repeat":{"row":["Displacement","Miles_per_Gallon"],"column":["Horsepower","Miles_per_Gallon"]},"spec":{"mark":"point","encoding":{"x":{"field":"yield","type":"quantitative","title":"yield"},"y":{"field":"yield","type":"quantitative","title":"yield"},"color":{"field":"year","type":"nominal","title":"year"}}},"index":630,"description":"vl-template-630","title":""}]
9
false
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"value":"#d67195"}}},{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"name":"source"},"repeat":{"row":["Displacement","Miles_per_Gallon"],"column":["Horsepower","Miles_per_Gallon"]},"spec":{"mark":"point","encoding":{"x":{"field":"yield","type":"quantitative","title":"yield"},"y":{"field":"yield","type":"quantitative","title":"yield"},"color":{"field":"year","type":"nominal","title":"year"}}},"index":630,"description":"vl-template-630","title":"","encoding":{"color":{"value":"#d67195"}}}]
false
false
false
false
REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS
false
11
false
function enumSetConstantColorInAllCharts(parent, stepType, enumerate, sampleSize) { if (stepType === void 0) { stepType = models_1.REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS; } if (enumerate === void 0) { enumerate = 'random'; } if (sampleSize === void 0) { sampleSize = models_1.SAMPLE_SIZE; } // if default color has already been set, don't set again // in this way, we only set default color once from root to each leaf if (parent.dashboard.hasBeen.setConstantColor) { return []; } var enumerated = []; switch (enumerate) { case 'common': for (var c in color_def_1.COMMON_CONSTANT_COLORS) { var color = color_def_1.COMMON_CONSTANT_COLORS[c]; var withColorSet = setConstantColorInAllCharts(parent, stepType, color); if (withColorSet) { enumerated.push(withColorSet); } } break; case 'random': for (var i = 0; i < sampleSize; i++) { var color = Object.values(color_def_1.TABLEAU20)[Math.floor(Math.random() * 20)]; var withColorSet = setConstantColorInAllCharts(parent, stepType, color); if (withColorSet) { enumerated.push(withColorSet); } } default: break; } return enumerated; }
[ { "binStats": { "5": null, "10": null, "20": null }, "index": 0, "name": "site", "originalIndex": 3, "stats": { "count": 120, "distinct": 6, "field": "site", "max": 15, "mean": 9, "median": 7.5, "min": 6, "missing": 0, "...
[ "REVISION_STEP_ADD_CHART", "REVISION_STEP_ADD_TEMPLATE", "REVISION_STEP_SET_CONSTANT_COLOR_IN_ALL_CHARTS" ]
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"}}},{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"name":"source"},"repeat":{"row":["Displacement","Miles_per_Gallon"],"column":["Horsepower","Miles_per_Gallon"]},"spec":{"mark":"point","encoding":{"x":{"field":"yield","type":"quantitative","title":"yield"},"y":{"field":"yield","type":"quantitative","title":"yield"},"color":{"field":"year","type":"nominal","title":"year"}}},"index":630,"description":"vl-template-630","title":""}]
false
false
2
false
false
false
false
false
true
[{"mark":"point","data":{"name":"source"},"encoding":{"y":{"field":"site","type":"nominal"},"shape":{"field":"year","type":"nominal"},"color":{"value":"#d67195"}}},{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","data":{"name":"source"},"repeat":{"row":["Displacement","Miles_per_Gallon"],"column":["Horsepower","Miles_per_Gallon"]},"spec":{"mark":"point","encoding":{"x":{"field":"yield","type":"quantitative","title":"yield"},"y":{"field":"yield","type":"quantitative","title":"yield"},"color":{"field":"year","type":"nominal","title":"year"}}},"index":630,"description":"vl-template-630","title":"","encoding":{"color":{"value":"#d67195"}}}]
false
[ "Make a new chart. Add variety to y. Add field \"site\" to y. Add \"year\" to shape.", "Add vl-template-630 to the dashboard and plug in my data: Replace field in x with yield. Replace [object Object] with yield on y. Plug in year on color.", "The dashboard should be #d67195." ]
[ 4, 4, 1 ]
End of preview.

No dataset card yet

Downloads last month
13