Skip to content

[BUG] Added xarray to dependecies #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -5,3 +5,5 @@ notebooks/__pycache__
.cache
.pytest_cache
__pycache__
# data file downloaded in notebooks/07.01-ipyleaflet.ipynb
wind-global.nc
1 change: 1 addition & 0 deletions binder/environment.yml
Original file line number Diff line number Diff line change
@@ -25,5 +25,6 @@ dependencies:
- voila-vuetify
- jupyterlab=2
- ipyvolume=0.6.0a6
- xarray
- pip:
- netcdf4
3 changes: 3 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -27,3 +27,6 @@ dependencies:
- jupyterlab=2
- ipyvolume=0.6.0a6
- nodejs=13
- xarray
- pip:
- netcdf4
31 changes: 13 additions & 18 deletions notebooks/07.01-ipyleaflet.ipynb
Original file line number Diff line number Diff line change
@@ -451,28 +451,22 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Advanced example 1: Velocity\n",
"\n",
"*It is ok to skip this for now -- running it requires downloading a ~1MB data file.*\n",
"\n",
"This example needs an extra dependency that is not in the installation instructions and a dataset.\n",
"\n",
"You can install it with this:\n",
"\n",
"```bash\n",
"pip install netcdf4\n",
"```\n",
"\n",
"To download the data, copy and paste the code below into a new cell and run it.\n",
"\n",
"```python\n",
"## Advanced example 1: Velocity"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Download the data\n",
"import requests\n",
"\n",
"wind_data = requests.get('https://github.com/benbovy/xvelmap/raw/master/notebooks/wind-global.nc') \n",
"\n",
"with open('wind-global.nc', 'wb') as f: \n",
" f.write(wind_data.content)\n",
"```\n"
" f.write(wind_data.content)"
]
},
{
@@ -522,7 +516,8 @@
" velocity_scale=0.01,\n",
" max_velocity=20,\n",
" display_options=display_options)\n",
"m2.add_layer(wind)"
"m2.add_layer(wind)\n",
"m2"
]
},
{
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -20,4 +20,6 @@ jupyterlab>=2
ipyvuetify
voila-vuetify
sidecar
ipyvolume==0.6.0-a.6
ipyvolume==0.6.0-a.6
xarray
netcdf4