|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "markdown", |
5 | | - "id": "b48a4e89", |
| 5 | + "id": "bb0cd5d7", |
6 | 6 | "metadata": {}, |
7 | 7 | "source": [ |
8 | 8 | "# HTML export\n", |
|
13 | 13 | { |
14 | 14 | "cell_type": "code", |
15 | 15 | "execution_count": 1, |
16 | | - "id": "74b61d76", |
| 16 | + "id": "67d88445", |
17 | 17 | "metadata": {}, |
18 | 18 | "outputs": [], |
19 | 19 | "source": [ |
|
27 | 27 | }, |
28 | 28 | { |
29 | 29 | "cell_type": "markdown", |
30 | | - "id": "3bc886ab", |
| 30 | + "id": "70b93db5", |
31 | 31 | "metadata": {}, |
32 | 32 | "source": [ |
33 | 33 | "You can then save the `html` variable to a text file (note: if you're writing an HTML application, you could consider using [Shiny](shiny.md) or [Streamlit](streamlit.md) instead), or print it:" |
|
36 | 36 | { |
37 | 37 | "cell_type": "code", |
38 | 38 | "execution_count": 2, |
39 | | - "id": "fddbf4b1", |
| 39 | + "id": "bda45945", |
40 | 40 | "metadata": { |
41 | 41 | "tags": [ |
42 | 42 | "scroll-output" |
|
48 | 48 | "output_type": "stream", |
49 | 49 | "text": [ |
50 | 50 | "<!--| quarto-html-table-processing: none -->\n", |
51 | | - "<table id=\"itables_0c2491e6_7357_4169_a254_3c84cb4b0da5\"><tbody><tr>\n", |
| 51 | + "<table id=\"itables_48afd65d_fb56_4967_a54c_c93a211550f1\"><tbody><tr>\n", |
52 | 52 | " <td style=\"vertical-align:middle; text-align:left\">\n", |
53 | 53 | " \n", |
54 | 54 | " Loading ITables v2.4.1-dev from the internet...\n", |
|
58 | 58 | "<script type=\"module\">\n", |
59 | 59 | " import { ITable, jQuery as $ } from 'https://www.unpkg.com/[email protected]/dt_bundle.js';\n", |
60 | 60 | "\n", |
61 | | - " document.querySelectorAll(\"#itables_0c2491e6_7357_4169_a254_3c84cb4b0da5:not(.dataTable)\").forEach(table => {\n", |
| 61 | + " document.querySelectorAll(\"#itables_48afd65d_fb56_4967_a54c_c93a211550f1:not(.dataTable)\").forEach(table => {\n", |
62 | 62 | " if (!(table instanceof HTMLTableElement))\n", |
63 | 63 | " return;\n", |
64 | 64 | "\n", |
65 | | - " let dt_args = {\"layout\": {\"topStart\": null, \"topEnd\": null, \"bottomStart\": null, \"bottomEnd\": null}, \"order\": [], \"style\": {\"table-layout\": \"auto\", \"width\": \"auto\", \"margin\": \"auto\", \"caption-side\": \"bottom\"}, \"text_in_header_can_be_selected\": true, \"classes\": [\"display\", \"nowrap\"], \"table_html\": \"<table><thead>\\n <tr style=\\\"text-align: right;\\\">\\n <th></th>\\n <th>region</th>\\n <th>country</th>\\n <th>capital</th>\\n <th>longitude</th>\\n <th>latitude</th>\\n </tr>\\n <tr>\\n <th>code</th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n </tr>\\n </thead></table>\", \"data_json\": \"[[\\\"AW\\\", \\\"Latin America & Caribbean\\\", \\\"Aruba\\\", \\\"Oranjestad\\\", -70.0167, 12.5167], [\\\"AF\\\", \\\"South Asia\\\", \\\"Afghanistan\\\", \\\"Kabul\\\", 69.1761, 34.5228], [\\\"AO\\\", \\\"Sub-Saharan Africa\\\", \\\"Angola\\\", \\\"Luanda\\\", 13.242, -8.81155]]\"};\n", |
| 65 | + " let dt_args = {\"layout\": {\"topStart\": null, \"topEnd\": null, \"bottomStart\": null, \"bottomEnd\": null}, \"style\": {\"table-layout\": \"auto\", \"width\": \"auto\", \"margin\": \"auto\", \"caption-side\": \"bottom\"}, \"text_in_header_can_be_selected\": true, \"order\": [], \"classes\": [\"display\", \"nowrap\"], \"table_html\": \"<table><thead>\\n <tr style=\\\"text-align: right;\\\">\\n <th></th>\\n <th>region</th>\\n <th>country</th>\\n <th>capital</th>\\n <th>longitude</th>\\n <th>latitude</th>\\n </tr>\\n <tr>\\n <th>code</th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n </tr>\\n </thead></table>\", \"data_json\": \"[[\\\"AW\\\", \\\"Latin America & Caribbean\\\", \\\"Aruba\\\", \\\"Oranjestad\\\", -70.0167, 12.5167], [\\\"AF\\\", \\\"South Asia\\\", \\\"Afghanistan\\\", \\\"Kabul\\\", 69.1761, 34.5228], [\\\"AO\\\", \\\"Sub-Saharan Africa\\\", \\\"Angola\\\", \\\"Luanda\\\", 13.242, -8.81155]]\"};\n", |
66 | 66 | " new ITable(table, dt_args);\n", |
67 | 67 | " });\n", |
68 | 68 | "</script>\n", |
|
76 | 76 | }, |
77 | 77 | { |
78 | 78 | "cell_type": "markdown", |
79 | | - "id": "c3675efc", |
| 79 | + "id": "81dc1afc", |
80 | 80 | "metadata": {}, |
81 | 81 | "source": [ |
82 | 82 | "or display it, like `show` does:" |
|
85 | 85 | { |
86 | 86 | "cell_type": "code", |
87 | 87 | "execution_count": 3, |
88 | | - "id": "6eba8ccb", |
| 88 | + "id": "6747e60b", |
89 | 89 | "metadata": {}, |
90 | 90 | "outputs": [ |
91 | 91 | { |
92 | 92 | "data": { |
93 | 93 | "text/html": [ |
94 | 94 | "<!--| quarto-html-table-processing: none -->\n", |
95 | | - "<table id=\"itables_0c2491e6_7357_4169_a254_3c84cb4b0da5\"><tbody><tr>\n", |
| 95 | + "<table id=\"itables_48afd65d_fb56_4967_a54c_c93a211550f1\"><tbody><tr>\n", |
96 | 96 | " <td style=\"vertical-align:middle; text-align:left\">\n", |
97 | 97 | " \n", |
98 | 98 | " Loading ITables v2.4.1-dev from the internet...\n", |
|
102 | 102 | "<script type=\"module\">\n", |
103 | 103 | " import { ITable, jQuery as $ } from 'https://www.unpkg.com/[email protected]/dt_bundle.js';\n", |
104 | 104 | "\n", |
105 | | - " document.querySelectorAll(\"#itables_0c2491e6_7357_4169_a254_3c84cb4b0da5:not(.dataTable)\").forEach(table => {\n", |
| 105 | + " document.querySelectorAll(\"#itables_48afd65d_fb56_4967_a54c_c93a211550f1:not(.dataTable)\").forEach(table => {\n", |
106 | 106 | " if (!(table instanceof HTMLTableElement))\n", |
107 | 107 | " return;\n", |
108 | 108 | "\n", |
109 | | - " let dt_args = {\"layout\": {\"topStart\": null, \"topEnd\": null, \"bottomStart\": null, \"bottomEnd\": null}, \"order\": [], \"style\": {\"table-layout\": \"auto\", \"width\": \"auto\", \"margin\": \"auto\", \"caption-side\": \"bottom\"}, \"text_in_header_can_be_selected\": true, \"classes\": [\"display\", \"nowrap\"], \"table_html\": \"<table><thead>\\n <tr style=\\\"text-align: right;\\\">\\n <th></th>\\n <th>region</th>\\n <th>country</th>\\n <th>capital</th>\\n <th>longitude</th>\\n <th>latitude</th>\\n </tr>\\n <tr>\\n <th>code</th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n </tr>\\n </thead></table>\", \"data_json\": \"[[\\\"AW\\\", \\\"Latin America & Caribbean\\\", \\\"Aruba\\\", \\\"Oranjestad\\\", -70.0167, 12.5167], [\\\"AF\\\", \\\"South Asia\\\", \\\"Afghanistan\\\", \\\"Kabul\\\", 69.1761, 34.5228], [\\\"AO\\\", \\\"Sub-Saharan Africa\\\", \\\"Angola\\\", \\\"Luanda\\\", 13.242, -8.81155]]\"};\n", |
| 109 | + " let dt_args = {\"layout\": {\"topStart\": null, \"topEnd\": null, \"bottomStart\": null, \"bottomEnd\": null}, \"style\": {\"table-layout\": \"auto\", \"width\": \"auto\", \"margin\": \"auto\", \"caption-side\": \"bottom\"}, \"text_in_header_can_be_selected\": true, \"order\": [], \"classes\": [\"display\", \"nowrap\"], \"table_html\": \"<table><thead>\\n <tr style=\\\"text-align: right;\\\">\\n <th></th>\\n <th>region</th>\\n <th>country</th>\\n <th>capital</th>\\n <th>longitude</th>\\n <th>latitude</th>\\n </tr>\\n <tr>\\n <th>code</th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n </tr>\\n </thead></table>\", \"data_json\": \"[[\\\"AW\\\", \\\"Latin America & Caribbean\\\", \\\"Aruba\\\", \\\"Oranjestad\\\", -70.0167, 12.5167], [\\\"AF\\\", \\\"South Asia\\\", \\\"Afghanistan\\\", \\\"Kabul\\\", 69.1761, 34.5228], [\\\"AO\\\", \\\"Sub-Saharan Africa\\\", \\\"Angola\\\", \\\"Luanda\\\", 13.242, -8.81155]]\"};\n", |
110 | 110 | " new ITable(table, dt_args);\n", |
111 | 111 | " });\n", |
112 | 112 | "</script>\n" |
|
125 | 125 | }, |
126 | 126 | { |
127 | 127 | "cell_type": "markdown", |
128 | | - "id": "1e40b69c", |
| 128 | + "id": "17f2e136", |
129 | 129 | "metadata": {}, |
130 | 130 | "source": [ |
131 | 131 | "~~~{admonition} The `connected` argument\n", |
|
0 commit comments