viewof v2 = embed({
$schema: "https://vega.github.io/schema/vega-lite/v5.json",
data: { url: data["movies.json"].url },
mark: "bar",
transform: [
{
filter:
"brush['IMDB Rating'][0] <= datum['IMDB Rating'] && datum['IMDB Rating'] < brush['IMDB Rating'][1]"
}
],
params: [
{
name: "brush",
value: { "IMDB Rating": [0, 10] }
}
],
encoding: {
x: {
bin: true,
field: "Rotten Tomatoes Rating"
},
y: { aggregate: "count" }
}
})