-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
e27dc41
commit be1adfa
Showing
4 changed files
with
7 additions
and
7 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 |
---|---|---|
@@ -1 +1 @@ | ||
f17dd61f | ||
d583e3ba |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
"href": "results/index.html", | ||
"title": "Results", | ||
"section": "", | ||
"text": "funkyheatmap = (await require('d3@7').then(d3 => {\n\n window.d3 = d3;\n\n window._ = _;\n\n return import('https://unpkg.com/[email protected]');\n //return import('./js/funkyheatmap.js')\n\n})).default;\n\n//d3 = require(\"d3@7\")\n//import { funkyheatmap } from './js/funkyheatmap.js'\nfinal_data_raw = FileAttachment(\"./data/final_data2.csv\").csv()\n\ncolumn_info = await FileAttachment(\"./data/column_info_v2.csv\").csv()\ncolumn_groups = await FileAttachment(\"./data/column_groups.JSON\").json()\n\npalettes = [\n {\n overall: \"Greys\",\n palette1: \"Blues\",\n palette2: \"Reds\",\n palette3: \"Yellows\",\n palette4: \"YlOrBr\",\n NA: \"Greys\",\n white6black4: \"Greys\",\n error_reason: {\n colors: [\"#8DD3C7\", \"#FFFFB3\", \"#BEBADA\", \"#FFFFFF\"],\n names: [\"Memory limit exceeded\", \"Time limit exceeded\", \"Execution error\", \"No error\"]\n }\n }\n ][0]\nfunction removeSuffix(data, column, suffix) {\n return data.map(row => {\n if (row[column].endsWith(suffix)) {\n row[column] = row[column].replace(new RegExp(suffix + '$'), ''); // Remove the suffix\n }\n return row;\n });\n}\n\n\nfunction removeLastNColumns(data, n) {\n if (data.length === 0 || n <= 0) return data;\n\n // Extract the keys of the columns\n const keys = Object.keys(data[0]);\n\n // Determine the columns to keep\n const columnsToKeep = keys.slice(0, -n);\n\n // Filter columns for each row\n return data.map(row => {\n const newRow = {};\n columnsToKeep.forEach(key => {\n newRow[key] = row[key];\n });\n return newRow;\n });\n}\n\nfinal_data = removeSuffix(final_data_raw, \"method\", \"_rf\");\n//console.log(final_data)\n\n// Remove the last 4 columns from the data\nfilteredData = removeLastNColumns(final_data, 6);\n\n//console.log(filteredData)\n\nfunction removeLastNItems(array, n) {\n return array.slice(0, -n);\n}\n\n\n// Remove the last 4 items\nfilteredColumnInfo = removeLastNItems(column_info, 12);\n\nfilteredColumnGroups = removeLastNItems(column_groups, 2);\n:::" | ||
"text": "funkyheatmap = (await require('d3@7').then(d3 => {\n\n window.d3 = d3;\n\n window._ = _;\n\n return import('https://unpkg.com/[email protected]');\n //return import('./js/funkyheatmap.js')\n\n})).default;\n\n//d3 = require(\"d3@7\")\n//import { funkyheatmap } from './js/funkyheatmap.js'\nfinal_data_raw = FileAttachment(\"./data/final_data2.csv\").csv()\n\ncolumn_info = await FileAttachment(\"./data/column_info_v2.csv\").csv()\ncolumn_groups = await FileAttachment(\"./data/column_groups.JSON\").json()\n\npalettes = [\n {\n overall: \"Greys\",\n palette1: \"Blues\",\n palette2: \"Reds\",\n palette3: \"Greens\",\n palette4: \"YlOrBr\",\n NA: \"Greys\",\n white6black4: \"Greys\",\n error_reason: {\n colors: [\"#8DD3C7\", \"#FFFFB3\", \"#BEBADA\", \"#FFFFFF\"],\n names: [\"Memory limit exceeded\", \"Time limit exceeded\", \"Execution error\", \"No error\"]\n }\n }\n ][0]\nfunction removeSuffix(data, column, suffix) {\n return data.map(row => {\n if (row[column].endsWith(suffix)) {\n row[column] = row[column].replace(new RegExp(suffix + '$'), ''); // Remove the suffix\n }\n return row;\n });\n}\n\n\nfunction removeLastNColumns(data, n) {\n if (data.length === 0 || n <= 0) return data;\n\n // Extract the keys of the columns\n const keys = Object.keys(data[0]);\n\n // Determine the columns to keep\n const columnsToKeep = keys.slice(0, -n);\n\n // Filter columns for each row\n return data.map(row => {\n const newRow = {};\n columnsToKeep.forEach(key => {\n newRow[key] = row[key];\n });\n return newRow;\n });\n}\n\nfinal_data = removeSuffix(final_data_raw, \"method\", \"_rf\");\n//console.log(final_data)\n\n// Remove the last 4 columns from the data\nfilteredData = removeLastNColumns(final_data, 6);\n\n//console.log(filteredData)\n\nfunction removeLastNItems(array, n) {\n return array.slice(0, -n);\n}\n\n\n// Remove the last 4 items\nfilteredColumnInfo = removeLastNItems(column_info, 12);\n\nfilteredColumnGroups = removeLastNItems(column_groups, 2);\n:::" | ||
}, | ||
{ | ||
"objectID": "results/index.html#results---heatmap", | ||
|
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