Skip to content

Commit 94a26c5

Browse files
committed
Finalized 00_welcome and 01_getting_started
1 parent 96a2cb1 commit 94a26c5

File tree

5 files changed

+60
-26
lines changed

5 files changed

+60
-26
lines changed

00_welcome.ipynb

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,28 @@
8484
"6. publishing: use Binder and Voila to publish your application\n",
8585
"7. layouts: styling and arranging widgets\n",
8686
"8. dashboard_02 (code only)\n",
87-
"9. review\n",
88-
"10. web_application"
87+
"9. review"
88+
]
89+
},
90+
{
91+
"cell_type": "markdown",
92+
"id": "23d4a1bc-b7c5-4966-a567-374d55d3c8fb",
93+
"metadata": {},
94+
"source": [
95+
"## Preview of the Final Product"
8996
]
9097
},
9198
{
9299
"cell_type": "code",
93100
"execution_count": null,
94-
"id": "487de2c6-4f7d-4f48-960c-fab45de78b13",
101+
"id": "2df63040-7a12-44f2-a3d1-2db16e249bc7",
95102
"metadata": {},
96103
"outputs": [],
97-
"source": []
104+
"source": [
105+
"%%bash\n",
106+
"\n",
107+
"voila dashboard_02.ipynb"
108+
]
98109
}
99110
],
100111
"metadata": {

01_getting_started.ipynb

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"%xmode Minimal"
18+
"import dashboard"
1919
]
2020
},
2121
{
@@ -204,6 +204,8 @@
204204
"metadata": {},
205205
"outputs": [],
206206
"source": [
207+
"%%exception\n",
208+
"\n",
207209
"slider.value = 'hi'"
208210
]
209211
},
@@ -349,12 +351,30 @@
349351
"execution_count": null,
350352
"id": "84f1e291-c060-4802-91a0-a96a7b0659f8",
351353
"metadata": {},
354+
"outputs": [
355+
{
356+
"name": "stdout",
357+
"output_type": "stream",
358+
"text": [
359+
"exported to key/01/01.py\n"
360+
]
361+
}
362+
],
363+
"source": [
364+
"# %answer key/01/01.py\n",
365+
"\n",
366+
"# update this print statement to be more informative \n",
367+
"# something is missing here"
368+
]
369+
},
370+
{
371+
"cell_type": "code",
372+
"execution_count": null,
373+
"id": "c982be50-d870-4b55-a296-2ba03b2680b7",
374+
"metadata": {},
352375
"outputs": [],
353376
"source": [
354-
"def on_value_change(change):\n",
355-
" print(change) # update this print statement to be more informative \n",
356-
"\n",
357-
"slider.observe(on_value_change) # something is missing here"
377+
"slider.value = 20"
358378
]
359379
},
360380
{
@@ -392,7 +412,7 @@
392412
"metadata": {},
393413
"outputs": [],
394414
"source": [
395-
"slider"
415+
"slider.value = 30"
396416
]
397417
},
398418
{
@@ -408,8 +428,18 @@
408428
"execution_count": null,
409429
"id": "b6d43a64-3bdd-4673-8bdf-bffac68f6b95",
410430
"metadata": {},
411-
"outputs": [],
412-
"source": [
431+
"outputs": [
432+
{
433+
"name": "stdout",
434+
"output_type": "stream",
435+
"text": [
436+
"exported to key/01/02.py\n"
437+
]
438+
}
439+
],
440+
"source": [
441+
"# %answer key/01/02.py\n",
442+
"\n",
413443
"# Call on_value_change every time value changes"
414444
]
415445
},
@@ -441,18 +471,6 @@
441471
"Great job! We made it to the end of our introduction. Next we will take a look at an actual scientific workflow, and then we will start using what we learned about ipywidgets to create a data dashboard. But first, let's preview the end product!"
442472
]
443473
},
444-
{
445-
"cell_type": "code",
446-
"execution_count": null,
447-
"id": "9321648b-b998-4d57-9d04-d4eb76dfbaa0",
448-
"metadata": {},
449-
"outputs": [],
450-
"source": [
451-
"%%bash\n",
452-
"\n",
453-
"voila dashboard_02.ipynb"
454-
]
455-
},
456474
{
457475
"cell_type": "code",
458476
"execution_count": null,

03/01.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

key/01/01.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
def on_value_change(change):
3+
print(f"Value was {change['old']} but is now {change['new']}") # update this print statement to be more informative
4+
5+
slider.observe(on_value_change, 'value') # something is missing here

key/01/02.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
slider.observe(on_value_change, 'value') # Call on_value_change every time value changes

0 commit comments

Comments
 (0)