Skip to content

Commit

Permalink
fix: remove output
Browse files Browse the repository at this point in the history
  • Loading branch information
yolile committed Feb 10, 2024
1 parent b5fd223 commit 6154211
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 508 deletions.
19 changes: 6 additions & 13 deletions component_charts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -311,20 +311,13 @@
" )"
],
"metadata": {
"id": "Bip37aP917XY"
},
"execution_count": 5,
"outputs": [
{
"data": {
"text/html": "\n<style>\n #altair-viz-0203ac87d45949e1a15c16f2e5cd36b8.vega-embed {\n width: 100%;\n display: flex;\n }\n\n #altair-viz-0203ac87d45949e1a15c16f2e5cd36b8.vega-embed details,\n #altair-viz-0203ac87d45949e1a15c16f2e5cd36b8.vega-embed details summary {\n position: relative;\n }\n</style>\n<div id=\"altair-viz-0203ac87d45949e1a15c16f2e5cd36b8\"></div>\n<script type=\"text/javascript\">\n var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n (function(spec, embedOpt){\n let outputDiv = document.currentScript.previousElementSibling;\n if (outputDiv.id !== \"altair-viz-0203ac87d45949e1a15c16f2e5cd36b8\") {\n outputDiv = document.getElementById(\"altair-viz-0203ac87d45949e1a15c16f2e5cd36b8\");\n }\n const paths = {\n \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n \"vega-lib\": \"https://cdn.jsdelivr.net/npm/vega-lib?noext\",\n \"vega-lite\": \"https://cdn.jsdelivr.net/npm/[email protected]?noext\",\n \"vega-embed\": \"https://cdn.jsdelivr.net/npm/vega-embed@6?noext\",\n };\n\n function maybeLoadScript(lib, version) {\n var key = `${lib.replace(\"-\", \"\")}_version`;\n return (VEGA_DEBUG[key] == version) ?\n Promise.resolve(paths[lib]) :\n new Promise(function(resolve, reject) {\n var s = document.createElement('script');\n document.getElementsByTagName(\"head\")[0].appendChild(s);\n s.async = true;\n s.onload = () => {\n VEGA_DEBUG[key] = version;\n return resolve(paths[lib]);\n };\n s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n s.src = paths[lib];\n });\n }\n\n function showError(err) {\n outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n throw err;\n }\n\n function displayChart(vegaEmbed) {\n vegaEmbed(outputDiv, spec, embedOpt)\n .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n }\n\n if(typeof define === \"function\" && define.amd) {\n requirejs.config({paths});\n require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n } else {\n maybeLoadScript(\"vega\", \"5\")\n .then(() => maybeLoadScript(\"vega-lite\", \"5.16.3\"))\n .then(() => maybeLoadScript(\"vega-embed\", \"6\"))\n .catch(showError)\n .then(() => displayChart(vegaEmbed));\n }\n })({\"config\": {\"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300, \"strokeWidth\": 0}, \"axis\": {\"domain\": false, \"labelFontSize\": 14, \"labelPadding\": 5, \"ticks\": false, \"titleFontSize\": 14}}, \"data\": {\"name\": \"data-07cbcd36d244d73845d1b5238107e767\"}, \"mark\": {\"type\": \"bar\", \"fill\": \"#d6e100\"}, \"encoding\": {\"tooltip\": [{\"field\": \"stage\", \"title\": \"stage\", \"type\": \"nominal\"}, {\"field\": \"object_count\", \"title\": \"number of objects\", \"type\": \"quantitative\"}], \"x\": {\"axis\": {\"labelAngle\": 0, \"title\": \"stage\"}, \"field\": \"stage\", \"scale\": {\"domain\": [\"planning\", \"tender\", \"awards\", \"contracts\", \"implementation\"]}, \"sort\": [\"planning\", \"tender\", \"awards\", \"contracts\", \"implementation\"], \"type\": \"ordinal\"}, \"y\": {\"axis\": {\"format\": \"~s\", \"tickCount\": 5, \"title\": \"number of objects\"}, \"field\": \"object_count\", \"type\": \"quantitative\"}}, \"height\": 350, \"padding\": 50, \"title\": {\"text\": \"\", \"fontSize\": 18, \"subtitle\": [\"\"]}, \"width\": 600, \"$schema\": \"https://vega.github.io/schema/vega-lite/v5.16.3.json\", \"datasets\": {\"data-07cbcd36d244d73845d1b5238107e767\": [{\"stage\": \"planning\", \"object_count\": 100}, {\"stage\": \"tender\", \"object_count\": 80}, {\"stage\": \"awards\", \"object_count\": 70}, {\"stage\": \"contracts\", \"object_count\": 60}, {\"stage\": \"implementation\", \"object_count\": 50}]}}, {\"mode\": \"vega-lite\"});\n</script>",
"text/plain": "alt.Chart(...)"
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
"id": "Bip37aP917XY",
"pycharm": {
"is_executing": true

This comment has been minimized.

Copy link
@jpmckinney

jpmckinney Feb 12, 2024

Member

@yolile Please remove pycharm metadata.

This comment has been minimized.

Copy link
@yolile

yolile Feb 12, 2024

Author Member

Ops, done!

}
]
},
"execution_count": null,
"outputs": []
}
]
}
90 changes: 7 additions & 83 deletions template_data_quality_feedback.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -169,90 +169,14 @@
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"id": "Bip37aP917XY"
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"<style>\n",
" #altair-viz-0203ac87d45949e1a15c16f2e5cd36b8.vega-embed {\n",
" width: 100%;\n",
" display: flex;\n",
" }\n",
"\n",
" #altair-viz-0203ac87d45949e1a15c16f2e5cd36b8.vega-embed details,\n",
" #altair-viz-0203ac87d45949e1a15c16f2e5cd36b8.vega-embed details summary {\n",
" position: relative;\n",
" }\n",
"</style>\n",
"<div id=\"altair-viz-0203ac87d45949e1a15c16f2e5cd36b8\"></div>\n",
"<script type=\"text/javascript\">\n",
" var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
" (function(spec, embedOpt){\n",
" let outputDiv = document.currentScript.previousElementSibling;\n",
" if (outputDiv.id !== \"altair-viz-0203ac87d45949e1a15c16f2e5cd36b8\") {\n",
" outputDiv = document.getElementById(\"altair-viz-0203ac87d45949e1a15c16f2e5cd36b8\");\n",
" }\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n",
" \"vega-lib\": \"https://cdn.jsdelivr.net/npm/vega-lib?noext\",\n",
" \"vega-lite\": \"https://cdn.jsdelivr.net/npm/[email protected]?noext\",\n",
" \"vega-embed\": \"https://cdn.jsdelivr.net/npm/vega-embed@6?noext\",\n",
" };\n",
"\n",
" function maybeLoadScript(lib, version) {\n",
" var key = `${lib.replace(\"-\", \"\")}_version`;\n",
" return (VEGA_DEBUG[key] == version) ?\n",
" Promise.resolve(paths[lib]) :\n",
" new Promise(function(resolve, reject) {\n",
" var s = document.createElement('script');\n",
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
" s.async = true;\n",
" s.onload = () => {\n",
" VEGA_DEBUG[key] = version;\n",
" return resolve(paths[lib]);\n",
" };\n",
" s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
" s.src = paths[lib];\n",
" });\n",
" }\n",
"\n",
" function showError(err) {\n",
" outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
" throw err;\n",
" }\n",
"\n",
" function displayChart(vegaEmbed) {\n",
" vegaEmbed(outputDiv, spec, embedOpt)\n",
" .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
" }\n",
"\n",
" if(typeof define === \"function\" && define.amd) {\n",
" requirejs.config({paths});\n",
" require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
" } else {\n",
" maybeLoadScript(\"vega\", \"5\")\n",
" .then(() => maybeLoadScript(\"vega-lite\", \"5.16.3\"))\n",
" .then(() => maybeLoadScript(\"vega-embed\", \"6\"))\n",
" .catch(showError)\n",
" .then(() => displayChart(vegaEmbed));\n",
" }\n",
" })({\"config\": {\"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300, \"strokeWidth\": 0}, \"axis\": {\"domain\": false, \"labelFontSize\": 14, \"labelPadding\": 5, \"ticks\": false, \"titleFontSize\": 14}}, \"data\": {\"name\": \"data-07cbcd36d244d73845d1b5238107e767\"}, \"mark\": {\"type\": \"bar\", \"fill\": \"#d6e100\"}, \"encoding\": {\"tooltip\": [{\"field\": \"stage\", \"title\": \"stage\", \"type\": \"nominal\"}, {\"field\": \"object_count\", \"title\": \"number of objects\", \"type\": \"quantitative\"}], \"x\": {\"axis\": {\"labelAngle\": 0, \"title\": \"stage\"}, \"field\": \"stage\", \"scale\": {\"domain\": [\"planning\", \"tender\", \"awards\", \"contracts\", \"implementation\"]}, \"sort\": [\"planning\", \"tender\", \"awards\", \"contracts\", \"implementation\"], \"type\": \"ordinal\"}, \"y\": {\"axis\": {\"format\": \"~s\", \"tickCount\": 5, \"title\": \"number of objects\"}, \"field\": \"object_count\", \"type\": \"quantitative\"}}, \"height\": 350, \"padding\": 50, \"title\": {\"text\": \"\", \"fontSize\": 18, \"subtitle\": [\"\"]}, \"width\": 600, \"$schema\": \"https://vega.github.io/schema/vega-lite/v5.16.3.json\", \"datasets\": {\"data-07cbcd36d244d73845d1b5238107e767\": [{\"stage\": \"planning\", \"object_count\": 100}, {\"stage\": \"tender\", \"object_count\": 80}, {\"stage\": \"awards\", \"object_count\": 70}, {\"stage\": \"contracts\", \"object_count\": 60}, {\"stage\": \"implementation\", \"object_count\": 50}]}}, {\"mode\": \"vega-lite\"});\n",
"</script>"
],
"text/plain": [
"alt.Chart(...)"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
"execution_count": null,
"metadata": {
"id": "Bip37aP917XY",
"pycharm": {
"is_executing": true
}
],
},
"outputs": [],
"source": [
"# @title Chart functions { display-mode: \"form\" }\n",
"\n",
Expand Down
88 changes: 6 additions & 82 deletions template_publisher_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -169,90 +169,14 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"id": "Bip37aP917XY"
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"<style>\n",
" #altair-viz-0203ac87d45949e1a15c16f2e5cd36b8.vega-embed {\n",
" width: 100%;\n",
" display: flex;\n",
" }\n",
"\n",
" #altair-viz-0203ac87d45949e1a15c16f2e5cd36b8.vega-embed details,\n",
" #altair-viz-0203ac87d45949e1a15c16f2e5cd36b8.vega-embed details summary {\n",
" position: relative;\n",
" }\n",
"</style>\n",
"<div id=\"altair-viz-0203ac87d45949e1a15c16f2e5cd36b8\"></div>\n",
"<script type=\"text/javascript\">\n",
" var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n",
" (function(spec, embedOpt){\n",
" let outputDiv = document.currentScript.previousElementSibling;\n",
" if (outputDiv.id !== \"altair-viz-0203ac87d45949e1a15c16f2e5cd36b8\") {\n",
" outputDiv = document.getElementById(\"altair-viz-0203ac87d45949e1a15c16f2e5cd36b8\");\n",
" }\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm/vega@5?noext\",\n",
" \"vega-lib\": \"https://cdn.jsdelivr.net/npm/vega-lib?noext\",\n",
" \"vega-lite\": \"https://cdn.jsdelivr.net/npm/[email protected]?noext\",\n",
" \"vega-embed\": \"https://cdn.jsdelivr.net/npm/vega-embed@6?noext\",\n",
" };\n",
"\n",
" function maybeLoadScript(lib, version) {\n",
" var key = `${lib.replace(\"-\", \"\")}_version`;\n",
" return (VEGA_DEBUG[key] == version) ?\n",
" Promise.resolve(paths[lib]) :\n",
" new Promise(function(resolve, reject) {\n",
" var s = document.createElement('script');\n",
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
" s.async = true;\n",
" s.onload = () => {\n",
" VEGA_DEBUG[key] = version;\n",
" return resolve(paths[lib]);\n",
" };\n",
" s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
" s.src = paths[lib];\n",
" });\n",
" }\n",
"\n",
" function showError(err) {\n",
" outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
" throw err;\n",
" }\n",
"\n",
" function displayChart(vegaEmbed) {\n",
" vegaEmbed(outputDiv, spec, embedOpt)\n",
" .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
" }\n",
"\n",
" if(typeof define === \"function\" && define.amd) {\n",
" requirejs.config({paths});\n",
" require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
" } else {\n",
" maybeLoadScript(\"vega\", \"5\")\n",
" .then(() => maybeLoadScript(\"vega-lite\", \"5.16.3\"))\n",
" .then(() => maybeLoadScript(\"vega-embed\", \"6\"))\n",
" .catch(showError)\n",
" .then(() => displayChart(vegaEmbed));\n",
" }\n",
" })({\"config\": {\"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300, \"strokeWidth\": 0}, \"axis\": {\"domain\": false, \"labelFontSize\": 14, \"labelPadding\": 5, \"ticks\": false, \"titleFontSize\": 14}}, \"data\": {\"name\": \"data-07cbcd36d244d73845d1b5238107e767\"}, \"mark\": {\"type\": \"bar\", \"fill\": \"#d6e100\"}, \"encoding\": {\"tooltip\": [{\"field\": \"stage\", \"title\": \"stage\", \"type\": \"nominal\"}, {\"field\": \"object_count\", \"title\": \"number of objects\", \"type\": \"quantitative\"}], \"x\": {\"axis\": {\"labelAngle\": 0, \"title\": \"stage\"}, \"field\": \"stage\", \"scale\": {\"domain\": [\"planning\", \"tender\", \"awards\", \"contracts\", \"implementation\"]}, \"sort\": [\"planning\", \"tender\", \"awards\", \"contracts\", \"implementation\"], \"type\": \"ordinal\"}, \"y\": {\"axis\": {\"format\": \"~s\", \"tickCount\": 5, \"title\": \"number of objects\"}, \"field\": \"object_count\", \"type\": \"quantitative\"}}, \"height\": 350, \"padding\": 50, \"title\": {\"text\": \"\", \"fontSize\": 18, \"subtitle\": [\"\"]}, \"width\": 600, \"$schema\": \"https://vega.github.io/schema/vega-lite/v5.16.3.json\", \"datasets\": {\"data-07cbcd36d244d73845d1b5238107e767\": [{\"stage\": \"planning\", \"object_count\": 100}, {\"stage\": \"tender\", \"object_count\": 80}, {\"stage\": \"awards\", \"object_count\": 70}, {\"stage\": \"contracts\", \"object_count\": 60}, {\"stage\": \"implementation\", \"object_count\": 50}]}}, {\"mode\": \"vega-lite\"});\n",
"</script>"
],
"text/plain": [
"alt.Chart(...)"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
"id": "Bip37aP917XY",
"pycharm": {
"is_executing": true
}
],
},
"outputs": [],
"source": [
"# @title Chart functions { display-mode: \"form\" }\n",
"\n",
Expand Down
Loading

0 comments on commit 6154211

Please sign in to comment.