Input: schema field:T|N|O|Q …, then a Vega-Lite specification produced by an AI (possibly invalid JSON).
Checks: valid JSON (else print REJECT: not valid JSON (<message> at line <n>)); the mark (string or object type) is one of bar, line, point, circle, square, area, rect, rule, text, tick, arc, boxplot, geoshape; for each encoding channel (alphabetical): the aggregate (if any) is one of count, sum, mean, average, median, min, max, distinct, stdev, variance; a channel without field is allowed only for count; the field exists in the schema (or is created by a transform's as); the encoding type is compatible (Q → quantitative; N or O → nominal/ordinal; T → temporal/ordinal; count fields may be quantitative); sum/mean/average/median/stdev/variance only on Q fields.
Print ACCEPT: line chart with color, x, y or REJECT (3 problem(s)): followed by lines - x: field 'District' does not exist (columns: date, district, pm25, station_id), - y: unknown aggregate 'avg', - x: 'date' is T in the data but encoded as nominal, - y: mean of non-quantitative field 'station_id', - unknown mark 'pie', - y: no field.