Skip to content

Commit c2a5457

Browse files
committed
Add more example notebooks to JupyterLite install
1 parent d8a5655 commit c2a5457

33 files changed

+570
-68
lines changed

docs/source/conf.py

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,61 @@
77
templates_path = ['_templates']
88

99
jupyterlite_config = "jupyterlite_config.json"
10-
jupyterlite_contents = "../examples"
11-
10+
jupyterlite_contents = [
11+
"../examples/europe_110.geo.json",
12+
"../examples/bars.json",
13+
"../examples/demo.json",
14+
"../examples/US_Unemployment_Oct2012.csv",
15+
"../examples/US_Unemployment_Oct2012_with_NANS.csv",
16+
"../examples/us-states.json",
17+
"../examples/AntPath.ipynb",
18+
"../examples/AwesomeIcons.ipynb",
19+
"../examples/BaseMap.ipynb",
20+
# "../examples/CanvasRenderer.ipynb", # no python wheel for shapely
21+
"../examples/Choropleth.ipynb",
22+
"../examples/Choropleth_with_NANS.ipynb",
23+
# "../examples/CountriesGeoJSON.ipynb", # cannot access ./europe_110.geo.json
24+
"../examples/CustomProjections.ipynb",
25+
"../examples/CustomTMS.ipynb",
26+
# "../examples/CustomTileServer.ipynb", # Some problem with flask: 'DummyMod' object has no attribute 'startswith'
27+
"../examples/DrawControl.ipynb",
28+
"../examples/DropdownControl.ipynb",
29+
"../examples/Fullscreen.ipynb",
30+
# "../examples/GPX.ipynb", # error installing geopandas (missing wheel for pyproj)
31+
# "../examples/GeoData.ipynb", # error installing geopandas (missing wheel for pyproj)
32+
# "../examples/GeoData_on_hover.ipynb", # error installing geopandas (missing wheel for pyproj)
33+
"../examples/GeoJSON.ipynb",
34+
# "../examples/GeoJson_EU_on_hover.ipynb", # cannot load file europe_110.geo.json
35+
"../examples/Heatmap.ipynb",
36+
# "../examples/Image_slider.ipynb", # error installing rasterio
37+
# "../examples/KML.ipynb", # error installing geopandas
38+
"../examples/LayerGroup.ipynb",
39+
"../examples/LegendControl.ipynb",
40+
"../examples/MagnifyingGlass.ipynb",
41+
"../examples/MapContainer.ipynb",
42+
"../examples/MapCursorStyle.ipynb",
43+
"../examples/MapPanes.ipynb", # This works even though it also needs the europe_110.geo.json, so check example above again!
44+
# "../examples/MarkerCluster-GeoJson.ipynb", # error installing geopandas
45+
# "../examples/MarkerCluster.ipynb", #error install geopandas
46+
# "../examples/Max_zoom.ipynb", # test again - not sure if localtileserver package has problems
47+
"../examples/MeasureControl.ipynb",
48+
# "../examples/Numpy.ipynb", # error installing reasterio
49+
"../examples/Primitives.ipynb",
50+
"../examples/Radiation.ipynb",
51+
"../examples/ScaleControl.ipynb",
52+
# "../examples/SearchControl.ipynb", # error installing shapely. Looks like reading a file works if it is readonly (opened with "r")
53+
"../examples/Select-GeoJson.ipynb",
54+
"../examples/SplitMap.ipynb",
55+
"../examples/TileLayer-loading.ipynb",
56+
"../examples/Transform.ipynb",
57+
"../examples/VectorTiles.ipynb",
58+
# "../examples/Velocity.ipynb", # seems like issues with downloading wind-global.nc dataset? Takes a long time
59+
# "../examples/Video.ipynb", # error installing rasterio
60+
# "../examples/WKTLayer.ipynb", #error importing shapely
61+
"../examples/WMSLayer.ipynb",
62+
# "../examples/WealthOfNations.ipynb", # did not install bqplot widget as a federated extension?
63+
"../examples/WidgetControl.ipynb",
64+
]
1265
def setup(app):
1366
app.add_css_file("main_stylesheet.css")
1467

examples/AntPath.ipynb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"# Set up for JupyterLite\n",
10+
"try:\n",
11+
" import piplite\n",
12+
" await piplite.install('ipyleaflet')\n",
13+
"except ImportError:\n",
14+
" pass"
15+
]
16+
},
317
{
418
"cell_type": "code",
519
"execution_count": null,
@@ -117,7 +131,7 @@
117131
],
118132
"metadata": {
119133
"kernelspec": {
120-
"display_name": "Python 3",
134+
"display_name": "Python 3 (ipykernel)",
121135
"language": "python",
122136
"name": "python3"
123137
},
@@ -131,7 +145,7 @@
131145
"name": "python",
132146
"nbconvert_exporter": "python",
133147
"pygments_lexer": "ipython3",
134-
"version": "3.7.3"
148+
"version": "3.10.5"
135149
}
136150
},
137151
"nbformat": 4,

examples/AwesomeIcons.ipynb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"# Set up for JupyterLite\n",
10+
"try:\n",
11+
" import piplite\n",
12+
" await piplite.install('ipyleaflet')\n",
13+
"except ImportError:\n",
14+
" pass# Set up for JupyterLite"
15+
]
16+
},
317
{
418
"cell_type": "code",
519
"execution_count": null,
@@ -72,7 +86,7 @@
7286
],
7387
"metadata": {
7488
"kernelspec": {
75-
"display_name": "Python 3",
89+
"display_name": "Python 3 (ipykernel)",
7690
"language": "python",
7791
"name": "python3"
7892
},
@@ -86,7 +100,7 @@
86100
"name": "python",
87101
"nbconvert_exporter": "python",
88102
"pygments_lexer": "ipython3",
89-
"version": "3.8.1"
103+
"version": "3.10.5"
90104
}
91105
},
92106
"nbformat": 4,

examples/BaseMap.ipynb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"# Set up for JupyterLite\n",
10+
"try:\n",
11+
" import piplite\n",
12+
" await piplite.install('ipyleaflet')\n",
13+
"except ImportError:\n",
14+
" pass"
15+
]
16+
},
317
{
418
"cell_type": "code",
519
"execution_count": 1,
@@ -151,7 +165,7 @@
151165
"name": "python",
152166
"nbconvert_exporter": "python",
153167
"pygments_lexer": "ipython3",
154-
"version": "3.9.13"
168+
"version": "3.10.5"
155169
}
156170
},
157171
"nbformat": 4,

examples/CanvasRenderer.ipynb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "64f20cfc-a3c8-437a-8c64-a0264afdde0d",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"# Set up for JupyterLite\n",
11+
"try:\n",
12+
" import piplite\n",
13+
" await piplite.install('ipyleaflet')\n",
14+
"except ImportError:\n",
15+
" pass"
16+
]
17+
},
318
{
419
"cell_type": "code",
520
"execution_count": null,
@@ -70,7 +85,7 @@
7085
"name": "python",
7186
"nbconvert_exporter": "python",
7287
"pygments_lexer": "ipython3",
73-
"version": "3.9.6"
88+
"version": "3.10.5"
7489
}
7590
},
7691
"nbformat": 4,

examples/Choropleth.ipynb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"# Set up for JupyterLite\n",
10+
"try:\n",
11+
" import piplite\n",
12+
" await piplite.install(['ipyleaflet', 'branca'])\n",
13+
"except ImportError:\n",
14+
" pass"
15+
]
16+
},
317
{
418
"cell_type": "code",
519
"execution_count": 1,
@@ -191,7 +205,7 @@
191205
"name": "python",
192206
"nbconvert_exporter": "python",
193207
"pygments_lexer": "ipython3",
194-
"version": "3.9.12"
208+
"version": "3.10.5"
195209
}
196210
},
197211
"nbformat": 4,

examples/Choropleth_with_NANS.ipynb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"# Set up for JupyterLite\n",
10+
"try:\n",
11+
" import piplite\n",
12+
" await piplite.install(['ipyleaflet', 'branca'])\n",
13+
"except ImportError:\n",
14+
" pass"
15+
]
16+
},
317
{
418
"cell_type": "code",
519
"execution_count": null,
@@ -90,7 +104,7 @@
90104
"name": "python",
91105
"nbconvert_exporter": "python",
92106
"pygments_lexer": "ipython3",
93-
"version": "3.9.12"
107+
"version": "3.10.5"
94108
}
95109
},
96110
"nbformat": 4,

examples/CustomProjections.ipynb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@
1010
"NASA's Next GenerationBlue Marble 500m for the Arctic and Antarctic regions."
1111
]
1212
},
13+
{
14+
"cell_type": "code",
15+
"execution_count": null,
16+
"metadata": {},
17+
"outputs": [],
18+
"source": [
19+
"# Set up for JupyterLite\n",
20+
"try:\n",
21+
" import piplite\n",
22+
" await piplite.install('ipyleaflet')\n",
23+
"except ImportError:\n",
24+
" pass"
25+
]
26+
},
1327
{
1428
"cell_type": "code",
1529
"execution_count": null,
@@ -100,7 +114,7 @@
100114
],
101115
"metadata": {
102116
"kernelspec": {
103-
"display_name": "Python 3",
117+
"display_name": "Python 3 (ipykernel)",
104118
"language": "python",
105119
"name": "python3"
106120
},
@@ -114,7 +128,7 @@
114128
"name": "python",
115129
"nbconvert_exporter": "python",
116130
"pygments_lexer": "ipython3",
117-
"version": "3.7.4"
131+
"version": "3.10.5"
118132
}
119133
},
120134
"nbformat": 4,

examples/CustomTMS.ipynb

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"# Set up for JupyterLite\n",
10+
"try:\n",
11+
" import piplite\n",
12+
" await piplite.install('ipyleaflet')\n",
13+
"except ImportError:\n",
14+
" pass"
15+
]
16+
},
317
{
418
"cell_type": "code",
519
"execution_count": null,
@@ -65,7 +79,7 @@
6579
],
6680
"metadata": {
6781
"kernelspec": {
68-
"display_name": "Python 3",
82+
"display_name": "Python 3 (ipykernel)",
6983
"language": "python",
7084
"name": "python3"
7185
},
@@ -79,9 +93,9 @@
7993
"name": "python",
8094
"nbconvert_exporter": "python",
8195
"pygments_lexer": "ipython3",
82-
"version": "3.6.3"
96+
"version": "3.10.5"
8397
}
8498
},
8599
"nbformat": 4,
86-
"nbformat_minor": 2
100+
"nbformat_minor": 4
87101
}

examples/DrawControl.ipynb

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"# Set up for JupyterLite\n",
10+
"try:\n",
11+
" import piplite\n",
12+
" await piplite.install('ipyleaflet')\n",
13+
"except ImportError:\n",
14+
" pass"
15+
]
16+
},
317
{
418
"cell_type": "code",
519
"execution_count": null,
@@ -251,7 +265,7 @@
251265
],
252266
"metadata": {
253267
"kernelspec": {
254-
"display_name": "Python 3",
268+
"display_name": "Python 3 (ipykernel)",
255269
"language": "python",
256270
"name": "python3"
257271
},
@@ -265,9 +279,9 @@
265279
"name": "python",
266280
"nbconvert_exporter": "python",
267281
"pygments_lexer": "ipython3",
268-
"version": "3.8.2"
282+
"version": "3.10.5"
269283
}
270284
},
271285
"nbformat": 4,
272-
"nbformat_minor": 1
286+
"nbformat_minor": 4
273287
}

0 commit comments

Comments
 (0)