A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
{
"$schema": "https://vega.github.io/schema/vega-lite/v6.4.1.json",
"config": {
"axis": {
"grid": false
},
"view": {
"continuousHeight": 300,
"continuousWidth": 300,
"stroke": null
}
},
"data": {
"format": {
"type": "csv"
},
"url": "data:text/csv;base64,QgphCmEKYQo="
},
"layer": [
{
"encoding": {
"tooltip": [
{
"field": "B",
"type": "nominal"
},
{
"field": "count",
"format": ",.0f",
"title": "Number of records",
"type": "quantitative"
}
],
"x": {
"field": "count",
"title": "Number of records",
"type": "quantitative"
},
"y": {
"axis": {
"title": null
},
"field": "B",
"sort": "-x",
"type": "nominal"
}
},
"mark": {
"color": "#8ec8f6",
"type": "bar"
},
"transform": [
{
"aggregate": [
{
"as": "count",
"op": "count"
}
],
"groupby": [
"B"
]
},
{
"sort": [
{
"field": "count",
"order": "descending"
},
{
"field": "B",
"order": "ascending"
}
],
"window": [
{
"as": "rank",
"field": "",
"op": "rank"
}
]
},
{
"joinaggregate": [
{
"as": "total_count",
"field": "count",
"op": "sum"
}
]
},
{
"as": "percentage",
"calculate": "datum.count / datum.total_count"
}
]
},
{
"encoding": {
"text": {
"field": "percentage",
"format": ".2%",
"type": "quantitative"
},
"tooltip": [
{
"field": "B",
"type": "nominal"
},
{
"field": "count",
"format": ",.0f",
"title": "Number of records",
"type": "quantitative"
}
],
"x": {
"field": "count",
"title": "Number of records",
"type": "quantitative"
},
"y": {
"axis": {
"title": null
},
"field": "B",
"sort": "-x",
"type": "nominal"
}
},
"mark": {
"align": "left",
"color": "black",
"dx": 3,
"type": "text"
},
"transform": [
{
"aggregate": [
{
"as": "count",
"op": "count"
}
],
"groupby": [
"B"
]
},
{
"sort": [
{
"field": "count",
"order": "descending"
},
{
"field": "B",
"order": "ascending"
}
],
"window": [
{
"as": "rank",
"field": "",
"op": "rank"
}
]
},
{
"joinaggregate": [
{
"as": "total_count",
"field": "count",
"op": "sum"
}
]
},
{
"as": "percentage",
"calculate": "datum.count / datum.total_count"
}
]
}
],
"title": "B",
"width": "container"
}