Skip to content

Commit a84e396

Browse files
authored
Add dask powered Xarray example and dask labview (#2)
* Add configs for labview plugin * Add dask config with nbserverproxy link * Default to lab * Add xarray example with dask backend * Rename file * Use v2.0.0 for binder
1 parent 5d4b68c commit a84e396

File tree

9 files changed

+550
-5
lines changed

9 files changed

+550
-5
lines changed

.dask/config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
distributed:
2+
logging:
3+
bokeh: critical
4+
5+
dashboard:
6+
link: /user/{JUPYTERHUB_USER}/proxy/{port}/status
7+
8+
admin:
9+
tick:
10+
limit: 5s

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Python Intro 201804 [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/geomar-tm/python-intro-201804/v1.3.2)
1+
# Python Intro 201804 [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/geomar-tm/python-intro-201804/v2.0.0?urlpath=lab)
22

33
This course was held in April / May 2018.
44

@@ -58,7 +58,7 @@ jupyter lab
5858
```
5959

6060
> _**Note** that if Jupyter fails with a message "could not assign address", you need to explicitly choose the IP address for the jupyter server:_
61-
>
61+
>
6262
> ```bash
6363
> jupyter lab --ip=127.0.0.1
6464
> ```

Welcome.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
Welcome To The Python Intro
3+
===========================

binder/apt.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
graphviz

binder/environment.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,38 @@ channels:
33
- conda-forge
44
dependencies:
55
- python=3
6-
- basemap
6+
- basemap
7+
- bokeh=1.1.0
78
- cartopy
89
- cf_units
910
- cmocean
10-
- dask
11+
- dask-image=0.2.0
12+
- dask-ml=0.13.0
13+
- dask=1.2
1114
- gsw
1215
- haversine
1316
- hdf5
1417
- matplotlib<3
18+
- nbserverproxy
1519
- netCDF4
20+
- nodejs=8.9
21+
- nomkl
22+
- notebook<5.7.5
23+
- numba
1624
- numpy
1725
- pandas
18-
- seaborn
26+
- pip
27+
- py-xgboost
28+
- pyarrow==0.12.0
29+
- python-graphviz
30+
- requests
1931
- scipy
32+
- seaborn
2033
- seawater
34+
- tornado=5
2135
- xarray
36+
- pip:
37+
- dask_xgboost
38+
- mimesis
39+
- jupyterlab==1.0.0a8
40+
- dask-labextension==0.4.0a1

binder/jupyterlab-workspace.json

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"data": {
3+
"file-browser-filebrowser:cwd": {
4+
"path": ""
5+
},
6+
"dask-dashboard-launcher:individual-progress": {
7+
"data": {
8+
"route": "individual-progress",
9+
"label": "Progress"
10+
}
11+
},
12+
"dask-dashboard-launcher:individual-task-stream": {
13+
"data": {
14+
"route": "individual-task-stream",
15+
"label": "Task Stream"
16+
}
17+
},
18+
"layout-restorer:data": {
19+
"main": {
20+
"dock": {
21+
"type": "split-area",
22+
"orientation": "horizontal",
23+
"sizes": [
24+
0.5,
25+
0.5
26+
],
27+
"children": [
28+
{
29+
"type": "tab-area",
30+
"currentIndex": 0,
31+
"widgets": [
32+
"markdownviewer-widget:Welcome.md"
33+
]
34+
},
35+
{
36+
"type": "split-area",
37+
"orientation": "vertical",
38+
"sizes": [
39+
0.67,
40+
0.33
41+
],
42+
"children": [
43+
{
44+
"type": "tab-area",
45+
"currentIndex": 0,
46+
"widgets": [
47+
"dask-dashboard-launcher:individual-task-stream"
48+
]
49+
},
50+
{
51+
"type": "tab-area",
52+
"currentIndex": 0,
53+
"widgets": [
54+
"dask-dashboard-launcher:individual-progress"
55+
]
56+
}
57+
]
58+
}
59+
]
60+
},
61+
"mode": "multiple-document",
62+
"current": "markdownviewer-widget:Welcome.md"
63+
},
64+
"left": {
65+
"collapsed": false,
66+
"current": "filebrowser",
67+
"widgets": [
68+
"filebrowser",
69+
"running-sessions",
70+
"dask-dashboard-launcher",
71+
"command-palette",
72+
"tab-manager"
73+
]
74+
},
75+
"right": {
76+
"collapsed": true,
77+
"widgets": []
78+
}
79+
},
80+
"markdownviewer-widget:Welcome.md": {
81+
"data": {
82+
"path": "Welcome.md",
83+
"factory": "Markdown Preview"
84+
}
85+
},
86+
"dask-dashboard-launcher": {
87+
"url": "DASK_DASHBOARD_URL",
88+
"cluster": ""
89+
}
90+
},
91+
"metadata": {
92+
"id": "/lab"
93+
}
94+
}

binder/postBuild

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
# Install the JupyterLab dask-labextension
4+
jupyter labextension install [email protected]

binder/start

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
# Replace DASK_DASHBOARD_URL with the proxy location
4+
sed -i -e "s|DASK_DASHBOARD_URL|/user/${JUPYTERHUB_USER}/proxy/8787|g" binder/jupyterlab-workspace.json
5+
6+
# Temporary workspace workaround
7+
cp binder/jupyterlab-workspace.json /home/jovyan/.jupyter/lab/workspaces/lab-a511.jupyterlab-workspace
8+
9+
exec "$@"

session-02_part-05_dask-powered_read_and_plot_baltic_hydrography_xarray.ipynb

Lines changed: 405 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)