В Vega-Lite вы можете использовать агрегатное преобразование с последующим преобразованием фильтра. Например:
{
"data": {
"values": [
{"ST": 0, "ID": 1, "time": "12:04"},
{"ST": 1, "ID": 1, "time": "12:00"},
{"ST": 0, "ID": 2, "time": "12:02"},
{"ST": 1, "ID": 2, "time": "11:58"},
{"ST": 0, "ID": 2, "time": "11:22"},
{"ST": 1, "ID": 3, "time": "12:33"},
{"ST": 0, "ID": 3, "time": "12:20"}
],
"format": {"parse": {"time": "date:'%H:%M'"}}
},
"transform": [
{
"aggregate": [
{"op": "max", "field": "time", "as": "time"},
{"op": "argmax", "field": "time", "as": "argmax"}
],
"groupby": ["ID"]
},
{"filter": "datum.argmax.ST == 0"}
],
"mark": "point",
"encoding": {
"y": {"type": "ordinal", "field": "ID"},
"x": {"type": "temporal", "field": "time"}
}
}