Skip to content

Commit 7591520

Browse files
replace krangl with dataframe in the example notebooks (#192)
1 parent f3eca50 commit 7591520

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+19833
-3531
lines changed

docs/examples/jupyter-notebooks/colors_viridis.ipynb

+444-63
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/complete_themes.ipynb

+418-34
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/coord_flip.ipynb

+422-38
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/correlation_plot.ipynb

+1,084-235
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-3.3.0/panel_border.ipynb

+409-25
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.2.0/annotations_for_pie.ipynb

+451-66
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.2.0/geom_pie.ipynb

+261-62
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.2.0/residual_plot.ipynb

+506-94
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.2.0/ridgeline_plot.ipynb

+628-55
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.2.0/stat_count_2d.ipynb

+440-49
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.2.0/violin_show_half.ipynb

+418-37
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.2.0/violin_tails_cutoff.ipynb

+418-36
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.3.0/axis_position.ipynb

+418-40
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.3.0/axis_text_angle.ipynb

+457-51
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.3.0/joint_plot.ipynb

+432-54
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.3.0/position_stack.ipynb

+472-87
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.3.0/quantile_parameters.ipynb

+443-58
Large diffs are not rendered by default.

docs/examples/jupyter-notebooks/f-4.3.0/scale_functions.ipynb

+228-29
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
{
4141
"data": {
4242
"text/html": [
43-
" <div id=\"DzDtQ1\"></div>\n",
43+
" <div id=\"dHJWSo\"></div>\n",
4444
" <script type=\"text/javascript\" data-lets-plot-script=\"library\">\n",
4545
" if(!window.letsPlotCallQueue) {\n",
4646
" window.letsPlotCallQueue = [];\n",
@@ -51,7 +51,7 @@
5151
" (function() {\n",
5252
" var script = document.createElement(\"script\");\n",
5353
" script.type = \"text/javascript\";\n",
54-
" script.src = \"https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v3.1.0/js-package/distr/lets-plot.min.js\";\n",
54+
" script.src = \"https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v3.2.0/js-package/distr/lets-plot.min.js\";\n",
5555
" script.onload = function() {\n",
5656
" window.letsPlotCall = function(f) {f();};\n",
5757
" window.letsPlotCallQueue.forEach(function(f) {f();});\n",
@@ -65,21 +65,230 @@
6565
" var div = document.createElement(\"div\");\n",
6666
" div.style.color = 'darkred';\n",
6767
" div.textContent = 'Error loading Lets-Plot JS';\n",
68-
" document.getElementById(\"DzDtQ1\").appendChild(div);\n",
68+
" document.getElementById(\"dHJWSo\").appendChild(div);\n",
6969
" };\n",
70-
" var e = document.getElementById(\"DzDtQ1\");\n",
70+
" var e = document.getElementById(\"dHJWSo\");\n",
7171
" e.appendChild(script);\n",
7272
" })();\n",
7373
" </script>"
7474
]
7575
},
7676
"metadata": {},
7777
"output_type": "display_data"
78+
},
79+
{
80+
"data": {
81+
"text/html": [
82+
" <div id=\"kotlin_out_0\"></div>\n",
83+
" <script type=\"text/javascript\">\n",
84+
" if(!window.kotlinQueues) {\n",
85+
" window.kotlinQueues = {};\n",
86+
" }\n",
87+
" if(!window.kotlinQueues[\"DataFrame\"]) {\n",
88+
" var resQueue = [];\n",
89+
" window.kotlinQueues[\"DataFrame\"] = resQueue;\n",
90+
" window[\"call_DataFrame\"] = function(f) {\n",
91+
" resQueue.push(f);\n",
92+
" }\n",
93+
" }\n",
94+
" (function (){\n",
95+
" var modifiers = [(function(script) {\n",
96+
" script.src = \"https://cdn.jsdelivr.net/gh/Kotlin/dataframe@3db46ccccaa1291c0627307d64133317f545e6ae/core/src/main/resources/init.js\"\n",
97+
" script.type = \"text/javascript\";\n",
98+
"})];\n",
99+
" var e = document.getElementById(\"kotlin_out_0\");\n",
100+
" modifiers.forEach(function (gen) {\n",
101+
" var script = document.createElement(\"script\");\n",
102+
" gen(script)\n",
103+
" script.addEventListener(\"load\", function() {\n",
104+
" window[\"call_DataFrame\"] = function(f) {f();};\n",
105+
" window.kotlinQueues[\"DataFrame\"].forEach(function(f) {f();});\n",
106+
" window.kotlinQueues[\"DataFrame\"] = [];\n",
107+
" }, false);\n",
108+
" script.addEventListener(\"error\", function() {\n",
109+
" window[\"call_DataFrame\"] = function(f) {};\n",
110+
" window.kotlinQueues[\"DataFrame\"] = [];\n",
111+
" var div = document.createElement(\"div\");\n",
112+
" div.style.color = 'darkred';\n",
113+
" div.textContent = 'Error loading resource DataFrame';\n",
114+
" document.getElementById(\"kotlin_out_0\").appendChild(div);\n",
115+
" }, false);\n",
116+
" \n",
117+
" e.appendChild(script);\n",
118+
" });\n",
119+
" })();\n",
120+
" </script>"
121+
]
122+
},
123+
"metadata": {},
124+
"output_type": "display_data"
125+
},
126+
{
127+
"data": {
128+
"text/html": [
129+
" <style>\n",
130+
" :root {\n",
131+
" --background: #fff;\n",
132+
" --background-odd: #f5f5f5;\n",
133+
" --background-hover: #d9edfd;\n",
134+
" --header-text-color: #474747;\n",
135+
" --text-color: #848484;\n",
136+
" --text-color-dark: #000;\n",
137+
" --text-color-medium: #737373;\n",
138+
" --text-color-pale: #b3b3b3;\n",
139+
" --inner-border-color: #aaa;\n",
140+
" --bold-border-color: #000;\n",
141+
" --link-color: #296eaa;\n",
142+
" --link-color-pale: #296eaa;\n",
143+
" --link-hover: #1a466c;\n",
144+
"}\n",
145+
"\n",
146+
":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n",
147+
" --background: #303030;\n",
148+
" --background-odd: #3c3c3c;\n",
149+
" --background-hover: #464646;\n",
150+
" --header-text-color: #dddddd;\n",
151+
" --text-color: #b3b3b3;\n",
152+
" --text-color-dark: #dddddd;\n",
153+
" --text-color-medium: #b2b2b2;\n",
154+
" --text-color-pale: #737373;\n",
155+
" --inner-border-color: #707070;\n",
156+
" --bold-border-color: #777777;\n",
157+
" --link-color: #008dc0;\n",
158+
" --link-color-pale: #97e1fb;\n",
159+
" --link-hover: #00688e;\n",
160+
"}\n",
161+
"\n",
162+
"p.dataframe_description {\n",
163+
" color: var(--text-color-dark);\n",
164+
"}\n",
165+
"\n",
166+
"table.dataframe {\n",
167+
" font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n",
168+
" font-size: 12px;\n",
169+
" background-color: var(--background);\n",
170+
" color: var(--text-color-dark);\n",
171+
" border: none;\n",
172+
" border-collapse: collapse;\n",
173+
"}\n",
174+
"\n",
175+
"table.dataframe th, td {\n",
176+
" padding: 6px;\n",
177+
" border: 1px solid transparent;\n",
178+
" text-align: left;\n",
179+
"}\n",
180+
"\n",
181+
"table.dataframe th {\n",
182+
" background-color: var(--background);\n",
183+
" color: var(--header-text-color);\n",
184+
"}\n",
185+
"\n",
186+
"table.dataframe td {\n",
187+
" vertical-align: top;\n",
188+
"}\n",
189+
"\n",
190+
"table.dataframe th.bottomBorder {\n",
191+
" border-bottom-color: var(--bold-border-color);\n",
192+
"}\n",
193+
"\n",
194+
"table.dataframe tbody > tr:nth-child(odd) {\n",
195+
" background: var(--background-odd);\n",
196+
"}\n",
197+
"\n",
198+
"table.dataframe tbody > tr:nth-child(even) {\n",
199+
" background: var(--background);\n",
200+
"}\n",
201+
"\n",
202+
"table.dataframe tbody > tr:hover {\n",
203+
" background: var(--background-hover);\n",
204+
"}\n",
205+
"\n",
206+
"table.dataframe a {\n",
207+
" cursor: pointer;\n",
208+
" color: var(--link-color);\n",
209+
" text-decoration: none;\n",
210+
"}\n",
211+
"\n",
212+
"table.dataframe tr:hover > td a {\n",
213+
" color: var(--link-color-pale);\n",
214+
"}\n",
215+
"\n",
216+
"table.dataframe a:hover {\n",
217+
" color: var(--link-hover);\n",
218+
" text-decoration: underline;\n",
219+
"}\n",
220+
"\n",
221+
"table.dataframe img {\n",
222+
" max-width: fit-content;\n",
223+
"}\n",
224+
"\n",
225+
"table.dataframe th.complex {\n",
226+
" background-color: var(--background);\n",
227+
" border: 1px solid var(--background);\n",
228+
"}\n",
229+
"\n",
230+
"table.dataframe .leftBorder {\n",
231+
" border-left-color: var(--inner-border-color);\n",
232+
"}\n",
233+
"\n",
234+
"table.dataframe .rightBorder {\n",
235+
" border-right-color: var(--inner-border-color);\n",
236+
"}\n",
237+
"\n",
238+
"table.dataframe .rightAlign {\n",
239+
" text-align: right;\n",
240+
"}\n",
241+
"\n",
242+
"table.dataframe .expanderSvg {\n",
243+
" width: 8px;\n",
244+
" height: 8px;\n",
245+
" margin-right: 3px;\n",
246+
"}\n",
247+
"\n",
248+
"table.dataframe .expander {\n",
249+
" display: flex;\n",
250+
" align-items: center;\n",
251+
"}\n",
252+
"\n",
253+
"/* formatting */\n",
254+
"\n",
255+
"table.dataframe .null {\n",
256+
" color: var(--text-color-pale);\n",
257+
"}\n",
258+
"\n",
259+
"table.dataframe .structural {\n",
260+
" color: var(--text-color-medium);\n",
261+
" font-weight: bold;\n",
262+
"}\n",
263+
"\n",
264+
"table.dataframe .dataFrameCaption {\n",
265+
" font-weight: bold;\n",
266+
"}\n",
267+
"\n",
268+
"table.dataframe .numbers {\n",
269+
" color: var(--text-color-dark);\n",
270+
"}\n",
271+
"\n",
272+
"table.dataframe td:hover .formatted .structural, .null {\n",
273+
" color: var(--text-color-dark);\n",
274+
"}\n",
275+
"\n",
276+
"table.dataframe tr:hover .formatted .structural, .null {\n",
277+
" color: var(--text-color-dark);\n",
278+
"}\n",
279+
"\n",
280+
"\n",
281+
" </style>"
282+
]
283+
},
284+
"metadata": {},
285+
"output_type": "display_data"
78286
}
79287
],
80288
"source": [
81289
"%useLatestDescriptors\n",
82-
"%use lets-plot"
290+
"%use lets-plot\n",
291+
"%use dataframe"
83292
]
84293
},
85294
{
@@ -91,7 +300,7 @@
91300
{
92301
"data": {
93302
"text/plain": [
94-
"Lets-Plot Kotlin API v.4.3.0. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.3.1.0."
303+
"Lets-Plot Kotlin API v.4.4.1. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.3.2.0."
95304
]
96305
},
97306
"execution_count": 2,
@@ -106,16 +315,6 @@
106315
{
107316
"cell_type": "code",
108317
"execution_count": 3,
109-
"id": "18678ebe",
110-
"metadata": {},
111-
"outputs": [],
112-
"source": [
113-
"%use krangl"
114-
]
115-
},
116-
{
117-
"cell_type": "code",
118-
"execution_count": 4,
119318
"id": "6c918b67",
120319
"metadata": {},
121320
"outputs": [],
@@ -133,14 +332,14 @@
133332
},
134333
{
135334
"cell_type": "code",
136-
"execution_count": 5,
335+
"execution_count": 4,
137336
"id": "a43d751a",
138337
"metadata": {},
139338
"outputs": [
140339
{
141340
"data": {
142341
"text/html": [
143-
" <div id=\"VehneV\"></div>\n",
342+
" <div id=\"KsmWGO\"></div>\n",
144343
" <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
145344
" (function() {\n",
146345
" var plotSpec={\n",
@@ -181,15 +380,15 @@
181380
"}\n",
182381
"}]\n",
183382
"};\n",
184-
" var plotContainer = document.getElementById(\"VehneV\");\n",
383+
" var plotContainer = document.getElementById(\"KsmWGO\");\n",
185384
" window.letsPlotCall(function() {{\n",
186385
" LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
187386
" }});\n",
188387
" })(); \n",
189388
" </script>"
190389
]
191390
},
192-
"execution_count": 5,
391+
"execution_count": 4,
193392
"metadata": {},
194393
"output_type": "execute_result"
195394
}
@@ -223,14 +422,14 @@
223422
},
224423
{
225424
"cell_type": "code",
226-
"execution_count": 6,
425+
"execution_count": 5,
227426
"id": "827cf9da",
228427
"metadata": {},
229428
"outputs": [
230429
{
231430
"data": {
232431
"text/html": [
233-
" <div id=\"SOqZYN\"></div>\n",
432+
" <div id=\"8IJTNR\"></div>\n",
234433
" <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
235434
" (function() {\n",
236435
" var plotSpec={\n",
@@ -279,15 +478,15 @@
279478
"}\n",
280479
"}]\n",
281480
"};\n",
282-
" var plotContainer = document.getElementById(\"SOqZYN\");\n",
481+
" var plotContainer = document.getElementById(\"8IJTNR\");\n",
283482
" window.letsPlotCall(function() {{\n",
284483
" LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
285484
" }});\n",
286485
" })(); \n",
287486
" </script>"
288487
]
289488
},
290-
"execution_count": 6,
489+
"execution_count": 5,
291490
"metadata": {},
292491
"output_type": "execute_result"
293492
}
@@ -306,14 +505,14 @@
306505
},
307506
{
308507
"cell_type": "code",
309-
"execution_count": 7,
508+
"execution_count": 6,
310509
"id": "aa77766a",
311510
"metadata": {},
312511
"outputs": [
313512
{
314513
"data": {
315514
"text/html": [
316-
" <div id=\"7oJ2OK\"></div>\n",
515+
" <div id=\"H5EN1O\"></div>\n",
317516
" <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
318517
" (function() {\n",
319518
" var plotSpec={\n",
@@ -362,15 +561,15 @@
362561
"}\n",
363562
"}]\n",
364563
"};\n",
365-
" var plotContainer = document.getElementById(\"7oJ2OK\");\n",
564+
" var plotContainer = document.getElementById(\"H5EN1O\");\n",
366565
" window.letsPlotCall(function() {{\n",
367566
" LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
368567
" }});\n",
369568
" })(); \n",
370569
" </script>"
371570
]
372571
},
373-
"execution_count": 7,
572+
"execution_count": 6,
374573
"metadata": {},
375574
"output_type": "execute_result"
376575
}
@@ -393,7 +592,7 @@
393592
"name": "kotlin",
394593
"nbconvert_exporter": "",
395594
"pygments_lexer": "kotlin",
396-
"version": "1.7.20-dev-1299"
595+
"version": "1.8.20"
397596
}
398597
},
399598
"nbformat": 4,

0 commit comments

Comments
 (0)