Skip to content

Commit

Permalink
Add meta information
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Wang <jay@zijie.wang>
  • Loading branch information
xiaohk committed Mar 14, 2024
1 parent b4ac312 commit 82a4b4a
Show file tree
Hide file tree
Showing 2 changed files with 147 additions and 6 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
<meta name="theme-color" content="#024d3f" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
SuperNOVA: Interactive Visualization in Computational Notebooks
</title>
<title>SuperNOVA: Interactive Notebook Visualization Browser</title>
<meta name="title" content="SuperNOVA: Interactive Notebook Visualization Browser" />
<meta name="description" content="Explore 160+ interactive visualization tools designed for computational notebooks!" />

<link rel="stylesheet" href="/global.css" />
</head>
<body>
Expand Down
146 changes: 143 additions & 3 deletions metadata/parse-table.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -635,7 +635,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -724,7 +724,7 @@
" cur_row += \"\\\\rowcolor{tablerowcolor}\\n\"\n",
"\n",
" # Name\n",
" cur_row += f'{entry[\"nameDisplay\"]}~\\citeapp{{{entry[\"bibtexKey\"]}}} & '\n",
" cur_row += f'{entry[\"nameDisplay\"]}~\\cite{{{entry[\"bibtexKey\"]}}} & '\n",
"\n",
" # User\n",
" user = entry[\"user\"]\n",
Expand Down Expand Up @@ -767,6 +767,146 @@
" fp.write(latex_table)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Long Table"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"\n",
"icon_map = {\n",
" \"scientist\": \"icon-user-scientist-alt\",\n",
" \"educator\": \"icon-user-student-alt\",\n",
" \"data scientist\": \"icon-user-data-alt\",\n",
" \"monolithic\": \"icon-mono-c\",\n",
" \"modular\": \"icon-modular-c\",\n",
" \"on-demand\": \"icon-display-demand-c\",\n",
" \"always-on\": \"icon-display-always-c\",\n",
" \"runtime\": \"icon-data-runtime-c\",\n",
" \"code\": \"icon-data-text-c\",\n",
" \"external\": \"icon-data-external-c\",\n",
" \"no\": \"icon-comm-no-c\",\n",
" \"one-way\": \"icon-comm-one-c\",\n",
" \"two-way\": \"icon-comm-two-c\",\n",
" \"jupyter\": \"icon-plat-jupyter\",\n",
" \"jupyter-lab\": \"icon-plat-jupyter-lab\",\n",
" \"lab\": \"icon-plat-lab\",\n",
" \"all\": \"icon-plat-all\",\n",
" \"custom\": \"icon-impl-custom\",\n",
" \"html\": \"icon-impl-html\",\n",
" \"ipywidget\": \"icon-impl-widget\",\n",
" \"extension\": \"icon-impl-extension\",\n",
" \"other-package\": \"icon-impl-package\",\n",
" \"nova\": \"icon-impl-nova\",\n",
"}\n",
"\n",
"# \\vcenteredhbox{\\includegraphics[height=8pt]{figures/icon-user-scientist-alt}}\n",
"\n",
"def convert_entry_row(entry):\n",
" # Name\n",
" cur_row = \"\"\n",
" cur_row += f'{entry[\"nameDisplay\"]}~\\cite{{{entry[\"bibtexKey\"]}}} & '\n",
"\n",
" # User\n",
" user = entry[\"user\"]\n",
" cur_row += f\"\\\\vcenteredhbox{{\\\\includegraphics[height=8pt]{{figures/{icon_map[user]}}}}} & \"\n",
"\n",
" # Communication\n",
" comm = entry[\"communication\"]\n",
" cur_row += f\"\\\\vcenteredhbox{{\\\\includegraphics[height=8pt]{{figures/{icon_map[comm]}}}}} & \"\n",
"\n",
" # Data\n",
" for data in entry[\"materials\"]:\n",
" cur_row += f\"\\\\vcenteredhbox{{\\\\includegraphics[height=8pt]{{figures/{icon_map[data]}}}}} \"\n",
" cur_row += \"&\"\n",
"\n",
" # Context\n",
" layout = entry[\"layouts\"][0]\n",
" cur_row += f\"\\\\vcenteredhbox{{\\\\includegraphics[height=8pt]{{figures/{icon_map[layout]}}}}} & \"\n",
"\n",
" # Modularity\n",
" modularity = entry[\"modularity\"]\n",
" cur_row += f\"\\\\vcenteredhbox{{\\\\includegraphics[height=8pt]{{figures/{icon_map[modularity]}}}}} & \"\n",
"\n",
" # Platforms\n",
" platforms = entry[\"supportedNotebooks\"]\n",
" if len(platforms) == 3:\n",
" cur_row += f'\\\\vcenteredhbox{{\\\\includegraphics[height=8pt]{{figures/{icon_map[\"all\"]}}}}} & '\n",
" elif len(platforms) == 2:\n",
" cur_row += f'\\\\vcenteredhbox{{\\\\includegraphics[height=8pt]{{figures/{icon_map[\"jupyter-lab\"]}}}}} & '\n",
" else:\n",
" platform = platforms[0]\n",
" cur_row += f\"\\\\vcenteredhbox{{\\\\includegraphics[height=8pt]{{figures/{icon_map[platform]}}}}} & \"\n",
"\n",
" # Implementations\n",
" implementation = entry[\"implementation\"]\n",
" cur_row += f\"\\\\vcenteredhbox{{\\\\includegraphics[height=8pt]{{figures/{icon_map[implementation]}}}}}\"\n",
"\n",
" return cur_row\n",
"\n",
"i = 0\n",
"latex_table = \"\"\n",
"\n",
"\n",
"while i < len(entries):\n",
" entry = entries[i]\n",
" cur_row = \"\"\n",
"\n",
" if i % 4 == 2:\n",
" cur_row += \"\\\\rowcolor{tablerowcolor}\\n\"\n",
"\n",
" if i == 0:\n",
" cur_row += \"\\\\rule{0pt}{9pt}\"\n",
" else:\n",
" cur_row += \"\\\\rule{0pt}{9pt}\"\n",
"\n",
" cur_row += convert_entry_row(entry)\n",
"\n",
" i += 1\n",
"\n",
" if i < len(entries):\n",
" entry = entries[i]\n",
" cur_row += \" & & & \"\n",
" cur_row += convert_entry_row(entry)\n",
" i += 1\n",
"\n",
" else:\n",
" cur_row += \" & & & & & & & & & & \"\n",
"\n",
" cur_row += \"\\\\\\\\ \\n\\n\"\n",
" latex_table += cur_row\n",
"\n",
"with open('./resources/latex-long-table.txt', 'w') as fp:\n",
" fp.write(latex_table)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"163"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(entries)"
]
},
{
"cell_type": "code",
"execution_count": 5,
Expand Down

0 comments on commit 82a4b4a

Please sign in to comment.