Skip to content

Commit

Permalink
Added launch binder badge in README
Browse files Browse the repository at this point in the history
Signed-off-by: Kharude, Sachin <sachin.kharude@here.com>
  • Loading branch information
Kharude, Sachin authored and omanges committed Jul 31, 2020
1 parent 7a5dcb3 commit 573efc7
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 24 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Documentation Status](https://readthedocs.org/projects/docs/badge/?version=latest)](https://xyz-spaces-python.readthedocs.io/en/latest/)
[![PyPI - License](https://img.shields.io/pypi/l/xyzspaces)](https://pypi.org/project/xyzspaces/)
[![GitHub contributors](https://img.shields.io/github/contributors/heremaps/xyz-spaces-python)](https://github.com/heremaps/xyz-spaces-python/graphs/contributors)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/heremaps/xyz-spaces-python/master)


This package allows you to use your [XYZ Hub](https://github.com/heremaps/xyz-hub) server or [HERE Data Hub](https://developer.here.com/products/data-hub) from Python.
Expand Down
22 changes: 16 additions & 6 deletions docs/notebooks/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"import os\n",
"\n",
"import requests\n",
"import warnings\n",
"from sidecar import Sidecar\n",
"from ipyleaflet import Map, GeoJSON, FullScreenControl\n",
"\n",
Expand All @@ -42,6 +43,16 @@
"import xyzspaces"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"<b>Warning:</b> Before running below cells please make sure you have XYZ Token to interact with xyzspaces. \n",
" Please see README.md in notebooks folder for more info on XYZ_TOKEN\n",
"</div>"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -53,12 +64,11 @@
" xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
"except KeyError:\n",
" xyz_token = \"MY-FANCY-XYZ-TOKEN\"\n",
" raise ValueError(\n",
" \"Please either set XYZ_TOKEN to env variable or \"\n",
" \"just replace your actual token value instead of MY-FANCY-XYZ-TOKEN above. \"\n",
" \"Please see README.md in notebooks folder for more info on XYZ_TOKEN\"\n",
" \n",
" )\n",
" if xyz_token == \"MY-FANCY-XYZ-TOKEN\":\n",
" warnings.warn(\n",
" \"Please either set XYZ_TOKEN to env variable or \"\n",
" \"just assign value of your actual token to variable xyz_token above.\"\n",
" )\n",
"xyz = xyzspaces.XYZ(credentials=xyz_token)"
]
},
Expand Down
23 changes: 17 additions & 6 deletions docs/notebooks/spaces_class_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,21 @@
"source": [
"# Make necessary import\n",
"import os\n",
"import warnings\n",
"from xyzspaces.datasets import get_countries_data\n",
"import xyzspaces"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"<b>Warning:</b> Before running below cells please make sure you have XYZ Token to interact with xyzspaces. \n",
" Please see README.md in notebooks folder for more info on XYZ_TOKEN\n",
"</div>"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -23,12 +34,12 @@
" xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
"except KeyError:\n",
" xyz_token = \"MY-FANCY-XYZ-TOKEN\"\n",
" raise ValueError(\n",
" \"Please either set XYZ_TOKEN to env variable or \"\n",
" \"just replace your actual token value instead of MY-FANCY-XYZ-TOKEN above. \"\n",
" \"Please see README.md in notebooks folder for more info on XYZ_TOKEN\"\n",
" \n",
" )\n",
" if xyz_token == \"MY-FANCY-XYZ-TOKEN\":\n",
" warnings.warn(\n",
" \"Please either set your actual token to env variable XYZ_TOKEN or \"\n",
" \"just assign value of your actual token to variable xyz_token above.\"\n",
"\n",
" )\n",
"xyz = xyzspaces.XYZ(credentials=xyz_token)"
]
},
Expand Down
22 changes: 16 additions & 6 deletions docs/notebooks/visual_clipping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"\n",
"import geojson\n",
"import requests\n",
"import warnings\n",
"from ipywidgets import Textarea, VBox, Layout\n",
"from ipyleaflet import Map, GeoJSON, \\\n",
" DrawControl, LayersControl, FullScreenControl, WidgetControl\n",
Expand All @@ -30,6 +31,16 @@
"import xyzspaces"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"<b>Warning:</b> Before running below cells please make sure you have XYZ Token to interact with xyzspaces. \n",
" Please see README.md in notebooks folder for more info on XYZ_TOKEN\n",
"</div>"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -41,12 +52,11 @@
" xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
"except KeyError:\n",
" xyz_token = \"MY-FANCY-XYZ-TOKEN\"\n",
" raise ValueError(\n",
" \"Please either set XYZ_TOKEN to env variable or \"\n",
" \"just replace your actual token value instead of MY-FANCY-XYZ-TOKEN above. \"\n",
" \"Please see README.md in notebooks folder for more info on XYZ_TOKEN\"\n",
" \n",
" )\n",
" if xyz_token == \"MY-FANCY-XYZ-TOKEN\":\n",
" warnings.warn(\n",
" \"Please either set your actual token to env variable XYZ_TOKEN or \"\n",
" \"just assign value of your actual token to variable xyz_token above.\"\n",
" )\n",
"xyz = xyzspaces.XYZ(credentials=xyz_token)"
]
},
Expand Down
22 changes: 16 additions & 6 deletions docs/notebooks/xyz_pro_features_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,23 @@
"# Make necessary imports.\n",
"import os\n",
"import json\n",
"import warnings\n",
"\n",
"from xyzspaces.datasets import get_chicago_parks_data, get_countries_data\n",
"from xyzspaces.exceptions import ApiError\n",
"import xyzspaces"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-warning\">\n",
"<b>Warning:</b> Before running below cells please make sure you have XYZ Token to interact with xyzspaces. \n",
" Please see README.md in notebooks folder for more info on XYZ_TOKEN\n",
"</div>"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -54,12 +65,11 @@
" xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
"except KeyError:\n",
" xyz_token = \"MY-FANCY-XYZ-TOKEN\"\n",
" raise ValueError(\n",
" \"Please either set XYZ_TOKEN to env variable or \"\n",
" \"just replace your actual token value instead of MY-FANCY-XYZ-TOKEN above. \"\n",
" \"Please see README.md in notebooks folder for more info on XYZ_TOKEN\"\n",
" \n",
" )\n",
" if xyz_token == \"MY-FANCY-XYZ-TOKEN\":\n",
" warnings.warn(\n",
" \"Please either set your actual token to env variable XYZ_TOKEN or \"\n",
" \"just assign value of your actual token to variable xyz_token above.\"\n",
" )\n",
"xyz = xyzspaces.XYZ(credentials=xyz_token)"
]
},
Expand Down

0 comments on commit 573efc7

Please sign in to comment.