improve nb

This commit is contained in:
Pierre Guillod 2024-09-08 01:37:31 +02:00
parent fba7e1167e
commit b2b6b03e35

View file

@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 39,
"id": "529de80c-dd7f-45eb-b3c1-753b33d2bdb7",
"metadata": {
"editable": true,
@ -52,7 +52,23 @@
},
"tags": []
},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "414db3070b5e4673a30c4da2f9e98369",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(VBox(children=(Dropdown(description='Région', options=(('Ville de Genève', 'geneva'), ('Région …"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"places = {\n",
" \"geneva\": {\"shorthand\": \"geneva\", \"friendly\": \"Ville de Genève\", \"label\": \"Geneva, Switzerland\", \"cars\": 44_000, \"node\": 2809410},\n",
@ -225,7 +241,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 38,
"id": "f4440649-731e-421e-b43d-17576bb8ad3f",
"metadata": {
"editable": true,
@ -234,7 +250,23 @@
},
"tags": []
},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "4de6b53f8da74947ad6e78a65dc0a13f",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(VBox(children=(HBox(children=(IntSlider(value=1, description='0 véhic.', max=10, min=1, readout…"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"slider = widgets.IntSlider(\n",
" min=1,\n",
@ -255,6 +287,8 @@
" image.value = read\n",
"\n",
"slider.observe(compute, 'value')\n",
"w_mot.observe(compute, 'value')\n",
"w_place.observe(compute, 'value')\n",
"\n",
"widgets.HBox([widgets.VBox([widgets.HBox([slider], layout=widgets.Layout(justify_content=\"center\")), image], layout=widgets.Layout(max_width=\"700px\"))], layout=widgets.Layout(justify_content=\"center\"))"
]