j1-template 2022.4.2 → 2022.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/assets/themes/j1/core/js/template.min.js.map +1 -1
  3. data/assets/themes/j1/modules/vega/js/vega-lite/README.md +0 -13
  4. data/lib/j1/version.rb +1 -1
  5. data/lib/starter_web/Gemfile +1 -1
  6. data/lib/starter_web/_config.yml +1 -1
  7. data/lib/starter_web/_data/modules/defaults/nbinteract.yml +1 -1
  8. data/lib/starter_web/_data/modules/navigator_menu.yml +60 -73
  9. data/lib/starter_web/_data/modules/nbinteract.yml +291 -314
  10. data/lib/starter_web/_plugins/lunr_index.rb +1 -1
  11. data/lib/starter_web/assets/images/modules/attics/shubham-dhage-2-1920x1280.jpg +0 -0
  12. data/lib/starter_web/package.json +1 -1
  13. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_altair_interactive.html +2216 -0
  14. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_altair_non_interactive.html +1170 -0
  15. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_bokeh_01_basic_plotting.html +1479 -0
  16. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_bokeh_02_styling_and_theming.html +1524 -0
  17. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_bokeh_03_data_sources_and_transformations.html +983 -0
  18. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_bokeh_04_adding_annotations.html +1280 -0
  19. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_bokeh_05_presentation_layouts.html +660 -0
  20. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_bokeh_06_linking_and_interactions.html +1563 -0
  21. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_bokeh_07_bar_and_categorical_data_plots.html +1888 -0
  22. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_bokeh_08_graph_and_network_plots.html +689 -0
  23. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_bokeh_09_geographic_plots.html +767 -0
  24. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_circular_times_table.html +2 -1
  25. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_interactive_widgets.html +21 -0
  26. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  27. data/lib/starter_web/utilsrv/package.json +1 -1
  28. metadata +14 -14
  29. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_examples_central_limit_theorem.html +0 -290
  30. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_examples_correlation.html +0 -818
  31. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_examples_empirical_distributions.html +0 -351
  32. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_examples_linear_regression.html +0 -106
  33. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_examples_probability_distribution_plots.html +0 -228
  34. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_examples_sampling_from_a_population.html +0 -518
  35. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_examples_variability_of_the_sample_mean.html +0 -372
  36. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_recipes_graphing.html +0 -473
  37. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_recipes_interactive_questions.html +0 -242
  38. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_recipes_layout.html +0 -496
  39. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_tutorial_interact.html +0 -329
  40. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_tutorial_monty_hall.html +0 -866
@@ -1,329 +0,0 @@
1
- <div class="cell text_cell">
2
- <button class="js-nbinteract-widget">
3
- Loading widgets...
4
- </button>
5
- </div>
6
-
7
-
8
-
9
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
10
- <div class="text_cell_render border-box-sizing rendered_html">
11
- <h3 id="A-Simple-Webpage">A Simple Webpage<a class="anchor-link" href="#A-Simple-Webpage">&#182;</a></h3><p>In this section, you will create and publish a simple interactive webpage!</p>
12
- <p>In Jupyter, create a notebook and name it <code>tutorial.ipynb</code>. Type or paste in the code from this tutorial into the notebook.</p>
13
-
14
- </div>
15
- </div>
16
- </div>
17
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
18
- <div class="text_cell_render border-box-sizing rendered_html">
19
- <h4 id="Using-Interact">Using Interact<a class="anchor-link" href="#Using-Interact">&#182;</a></h4>
20
- </div>
21
- </div>
22
- </div>
23
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
24
- <div class="text_cell_render border-box-sizing rendered_html">
25
- <p>The <code>ipywidgets</code> library provides the simplest way to get started writing interactive documents. Although the library itself has its own documentation, we will provide a quick overview to let you get started as quickly as possible.</p>
26
- <p>We start by importing the <code>interact</code> function:</p>
27
-
28
- </div>
29
- </div>
30
- </div>
31
-
32
-
33
-
34
- <div class="
35
- cell border-box-sizing code_cell rendered">
36
- <div class="input">
37
-
38
- <div class="inner_cell">
39
- <div class="input_area">
40
- <div class=" highlight hl-ipython3"><pre><span></span><span class="kn">from</span> <span class="nn">ipywidgets</span> <span class="kn">import</span> <span class="n">interact</span>
41
- </pre></div>
42
-
43
- </div>
44
- </div>
45
- </div>
46
-
47
- </div>
48
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
49
- <div class="text_cell_render border-box-sizing rendered_html">
50
- <p>The <code>interact</code> function takes in a function and produces an interface to call the function with different parameters.</p>
51
-
52
- </div>
53
- </div>
54
- </div>
55
-
56
-
57
-
58
- <div class="
59
- cell border-box-sizing code_cell rendered">
60
- <div class="input">
61
-
62
- <div class="inner_cell">
63
- <div class="input_area">
64
- <div class=" highlight hl-ipython3"><pre><span></span><span class="k">def</span> <span class="nf">square</span><span class="p">(</span><span class="n">x</span><span class="p">):</span>
65
- <span class="k">return</span> <span class="n">x</span> <span class="o">*</span> <span class="n">x</span>
66
- </pre></div>
67
-
68
- </div>
69
- </div>
70
- </div>
71
-
72
- </div>
73
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
74
- <div class="text_cell_render border-box-sizing rendered_html">
75
- <p>Pass the <code>square</code> function into <code>interact</code> and specify <code>square</code>'s arguments as keyword arguments:</p>
76
-
77
- </div>
78
- </div>
79
- </div>
80
-
81
-
82
-
83
- <div class="
84
- cell border-box-sizing code_cell rendered">
85
- <div class="input">
86
-
87
- <div class="inner_cell">
88
- <div class="input_area">
89
- <div class=" highlight hl-ipython3"><pre><span></span><span class="n">interact</span><span class="p">(</span><span class="n">square</span><span class="p">,</span> <span class="n">x</span><span class="o">=</span><span class="mi">10</span><span class="p">);</span>
90
- </pre></div>
91
-
92
- </div>
93
- </div>
94
- </div>
95
-
96
- <div class="output_wrapper">
97
- <div class="output">
98
-
99
-
100
- <div class="output_area">
101
-
102
-
103
-
104
-
105
-
106
- <div class="output_subarea output_widget_view ">
107
- <button class="js-nbinteract-widget">
108
- Loading widgets...
109
- </button>
110
- </div>
111
-
112
- </div>
113
-
114
- </div>
115
- </div>
116
-
117
- </div>
118
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
119
- <div class="text_cell_render border-box-sizing rendered_html">
120
- <p>To control the range of values <code>x</code> can take, you can pass in a tuple of the same format as Python's <code>range</code> function:</p>
121
-
122
- </div>
123
- </div>
124
- </div>
125
-
126
-
127
-
128
- <div class="
129
- cell border-box-sizing code_cell rendered">
130
- <div class="input">
131
-
132
- <div class="inner_cell">
133
- <div class="input_area">
134
- <div class=" highlight hl-ipython3"><pre><span></span><span class="n">interact</span><span class="p">(</span><span class="n">square</span><span class="p">,</span> <span class="n">x</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">,</span> <span class="mi">10</span><span class="p">));</span>
135
- </pre></div>
136
-
137
- </div>
138
- </div>
139
- </div>
140
-
141
- <div class="output_wrapper">
142
- <div class="output">
143
-
144
-
145
- <div class="output_area">
146
-
147
-
148
-
149
-
150
-
151
- <div class="output_subarea output_widget_view ">
152
- <button class="js-nbinteract-widget">
153
- Loading widgets...
154
- </button>
155
- </div>
156
-
157
- </div>
158
-
159
- </div>
160
- </div>
161
-
162
- </div>
163
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
164
- <div class="text_cell_render border-box-sizing rendered_html">
165
- <p>Notice how dragging the slider changes the input to the <code>square</code> function and automatically updates the output. This is a powerful idea that we will build on for the rest of this tutorial.</p>
166
- <p>By using <code>interact</code>, you can build complex widget-based interfaces in a notebook. These widgets will appear in your resulting webpage, giving your page interactivity.</p>
167
-
168
- </div>
169
- </div>
170
- </div>
171
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
172
- <div class="text_cell_render border-box-sizing rendered_html">
173
- <h4 id="Widget-Types">Widget Types<a class="anchor-link" href="#Widget-Types">&#182;</a></h4>
174
- </div>
175
- </div>
176
- </div>
177
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
178
- <div class="text_cell_render border-box-sizing rendered_html">
179
- <p>Notice that <code>interact</code> automatically generates a slider because the argument is numeric. Other types of arguments will generate different types of interfaces. For example, a string will generate a textbox.</p>
180
-
181
- </div>
182
- </div>
183
- </div>
184
-
185
-
186
-
187
- <div class="
188
- cell border-box-sizing code_cell rendered">
189
- <div class="input">
190
-
191
- <div class="inner_cell">
192
- <div class="input_area">
193
- <div class=" highlight hl-ipython3"><pre><span></span><span class="k">def</span> <span class="nf">friends</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">number</span><span class="p">):</span>
194
- <span class="k">return</span> <span class="s1">&#39;</span><span class="si">{}</span><span class="s1"> has </span><span class="si">{}</span><span class="s1"> friends!&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">number</span><span class="p">)</span>
195
- </pre></div>
196
-
197
- </div>
198
- </div>
199
- </div>
200
-
201
- </div>
202
-
203
-
204
-
205
- <div class="
206
- cell border-box-sizing code_cell rendered">
207
- <div class="input">
208
-
209
- <div class="inner_cell">
210
- <div class="input_area">
211
- <div class=" highlight hl-ipython3"><pre><span></span><span class="n">interact</span><span class="p">(</span><span class="n">friends</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">&#39;Sam&#39;</span><span class="p">,</span> <span class="n">number</span><span class="o">=</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">10</span><span class="p">));</span>
212
- </pre></div>
213
-
214
- </div>
215
- </div>
216
- </div>
217
-
218
- <div class="output_wrapper">
219
- <div class="output">
220
-
221
-
222
- <div class="output_area">
223
-
224
-
225
-
226
-
227
-
228
- <div class="output_subarea output_widget_view ">
229
- <button class="js-nbinteract-widget">
230
- Loading widgets...
231
- </button>
232
- </div>
233
-
234
- </div>
235
-
236
- </div>
237
- </div>
238
-
239
- </div>
240
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
241
- <div class="text_cell_render border-box-sizing rendered_html">
242
- <p>And a dictionary will generate a dropdown menu:</p>
243
-
244
- </div>
245
- </div>
246
- </div>
247
-
248
-
249
-
250
- <div class="
251
- cell border-box-sizing code_cell rendered">
252
- <div class="input">
253
-
254
- <div class="inner_cell">
255
- <div class="input_area">
256
- <div class=" highlight hl-ipython3"><pre><span></span><span class="n">interact</span><span class="p">(</span><span class="n">friends</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">&#39;Sam&#39;</span><span class="p">,</span> <span class="n">number</span><span class="o">=</span><span class="p">{</span><span class="s1">&#39;One&#39;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">&#39;Five&#39;</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> <span class="s1">&#39;Ten&#39;</span><span class="p">:</span> <span class="mi">10</span><span class="p">});</span>
257
- </pre></div>
258
-
259
- </div>
260
- </div>
261
- </div>
262
-
263
- <div class="output_wrapper">
264
- <div class="output">
265
-
266
-
267
- <div class="output_area">
268
-
269
-
270
-
271
-
272
-
273
- <div class="output_subarea output_widget_view ">
274
- <button class="js-nbinteract-widget">
275
- Loading widgets...
276
- </button>
277
- </div>
278
-
279
- </div>
280
-
281
- </div>
282
- </div>
283
-
284
- </div>
285
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
286
- <div class="text_cell_render border-box-sizing rendered_html">
287
- <p>Here's the complete list of each argument type and the widget it generates:</p>
288
- <table>
289
- <thead><tr>
290
- <th>Keyword argument</th>
291
- <th>Widget</th>
292
- </tr>
293
- </thead>
294
- <tbody>
295
- <tr>
296
- <td><code>True</code> or <code>False</code></td>
297
- <td>Checkbox</td>
298
- </tr>
299
- <tr>
300
- <td><code>'Hi there'</code></td>
301
- <td>Text</td>
302
- </tr>
303
- <tr>
304
- <td>value or (min,max) or (min,max,step) if integers are passed</td>
305
- <td>IntSlider</td>
306
- </tr>
307
- <tr>
308
- <td>value or (min,max) or (min,max,step) if floats are passed</td>
309
- <td>FloatSlider</td>
310
- </tr>
311
- <tr>
312
- <td><code>['orange','apple']</code> or <code>{'one':1,'two':2}</code></td>
313
- <td>Dropdown</td>
314
- </tr>
315
- </tbody>
316
- </table>
317
-
318
- </div>
319
- </div>
320
- </div>
321
- <div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
322
- <div class="text_cell_render border-box-sizing rendered_html">
323
- <p>You may also use the widget classes in <code>ipywidgets</code> in the calls to <code>interact</code> to have more fine-grained control over the interface. For more details on using <code>interact</code>, see the <a href="http://ipywidgets.readthedocs.io/en/stable/examples/Using%20Interact.html">official <code>ipywidgets</code> documentation</a>.</p>
324
- <p>You are now ready to publish your webpage! Proceed to the next page of the tutorial.</p>
325
-
326
- </div>
327
- </div>
328
- </div>
329
-