-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
45 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
} | ||
] | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
Oops, something went wrong.
@yolile Please remove pycharm metadata.