-
Notifications
You must be signed in to change notification settings - Fork 162
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
45 changed files
with
53 additions
and
132 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 |
---|---|---|
|
@@ -28,94 +28,15 @@ | |
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"\n", | ||
"<style>\n", | ||
" #altair-viz-529a742e56c04aa69ce439a4a1eda480.vega-embed {\n", | ||
" width: 100%;\n", | ||
" display: flex;\n", | ||
" }\n", | ||
"\n", | ||
" #altair-viz-529a742e56c04aa69ce439a4a1eda480.vega-embed details,\n", | ||
" #altair-viz-529a742e56c04aa69ce439a4a1eda480.vega-embed details summary {\n", | ||
" position: relative;\n", | ||
" }\n", | ||
"</style>\n", | ||
"<div id=\"altair-viz-529a742e56c04aa69ce439a4a1eda480\"></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-529a742e56c04aa69ce439a4a1eda480\") {\n", | ||
" outputDiv = document.getElementById(\"altair-viz-529a742e56c04aa69ce439a4a1eda480\");\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.8.0\"))\n", | ||
" .then(() => maybeLoadScript(\"vega-embed\", \"6\"))\n", | ||
" .catch(showError)\n", | ||
" .then(() => displayChart(vegaEmbed));\n", | ||
" }\n", | ||
" })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300}, \"axis\": {\"labelFontSize\": 11}}, \"layer\": [{\"mark\": \"bar\", \"encoding\": {\"color\": {\"field\": \"null_proportion\", \"legend\": {\"format\": \".0%\", \"offset\": 30}, \"scale\": {\"domain\": [0, 1], \"range\": \"heatmap\"}, \"title\": \"Missingness\", \"type\": \"quantitative\"}, \"tooltip\": [{\"field\": \"column_name\", \"title\": \"Column\", \"type\": \"nominal\"}, {\"field\": \"null_count\", \"format\": \",.0f\", \"title\": \"Count of nulls\", \"type\": \"quantitative\"}, {\"field\": \"null_proportion\", \"format\": \".2%\", \"title\": \"Percentage of nulls\", \"type\": \"quantitative\"}, {\"field\": \"total_record_count\", \"format\": \",.0f\", \"title\": \"Total record count\", \"type\": \"quantitative\"}], \"x\": {\"axis\": {\"format\": \"%\", \"labelAlign\": \"center\", \"title\": \"Percentage of nulls\"}, \"field\": \"null_proportion\", \"scale\": {\"domain\": [0, 1]}, \"type\": \"quantitative\"}, \"y\": {\"axis\": {\"title\": \"\"}, \"field\": \"column_name\", \"sort\": \"-x\", \"type\": \"nominal\"}}, \"title\": \"Missingness per column out of 50,578 records\"}], \"data\": {\"values\": [{\"null_proportion\": 0.0, \"null_count\": 0, \"total_record_count\": 50578, \"column_name\": \"None\"}, {\"null_proportion\": 0.0, \"null_count\": 0, \"total_record_count\": 50578, \"column_name\": \"unique_id\"}, {\"null_proportion\": 0.0, \"null_count\": 0, \"total_record_count\": 50578, \"column_name\": \"cluster\"}, {\"null_proportion\": 0.0013247132301330566, \"null_count\": 67, \"total_record_count\": 50578, \"column_name\": \"full_name\"}, {\"null_proportion\": 0.0013247132301330566, \"null_count\": 67, \"total_record_count\": 50578, \"column_name\": \"first_and_surname\"}, {\"null_proportion\": 0.0013247132301330566, \"null_count\": 67, \"total_record_count\": 50578, \"column_name\": \"first_name\"}, {\"null_proportion\": 0.08926808834075928, \"null_count\": 4515, \"total_record_count\": 50578, \"column_name\": \"surname\"}, {\"null_proportion\": 0.22545373439788818, \"null_count\": 11403, \"total_record_count\": 50578, \"column_name\": \"dob\"}, {\"null_proportion\": 0.13695675134658813, \"null_count\": 6927, \"total_record_count\": 50578, \"column_name\": \"birth_place\"}, {\"null_proportion\": 0.22590851783752441, \"null_count\": 11426, \"total_record_count\": 50578, \"column_name\": \"postcode_fake\"}, {\"null_proportion\": 0.2220333218574524, \"null_count\": 11230, \"total_record_count\": 50578, \"column_name\": \"gender\"}, {\"null_proportion\": 0.5, \"null_count\": 25289, \"total_record_count\": 50578, \"column_name\": \"occupation\"}], \"name\": \"data-0e7bce5a1d2f132e282789d6ef7780fe\"}, \"title\": \"\", \"$schema\": \"https://vega.github.io/schema/vega-lite/v5.9.3.json\"}, {\"mode\": \"vega-lite\"});\n", | ||
"</script>" | ||
], | ||
"text/plain": [ | ||
"alt.LayerChart(...)" | ||
] | ||
}, | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"from splink.datasets import splink_datasets\n", | ||
"from splink.duckdb.linker import DuckDBLinker\n", | ||
"\n", | ||
"df = splink_datasets.historical_50k\n", | ||
"linker = DuckDBLinker(df)\n", | ||
"linker.missingness_chart()" | ||
] | ||
], | ||
"outputs": [] | ||
}, | ||
{ | ||
"attachments": {}, | ||
|
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
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
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
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
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
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
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.