Skip to content

Commit

Permalink
updated notebooks
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 committed May 28, 2021
1 parent 343e87d commit 2e4824e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 76 deletions.
16 changes: 3 additions & 13 deletions docs/notebooks/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"\n",
"from xyzspaces.apis import HubApi\n",
"from xyzspaces.datasets import get_countries_data\n",
"import xyzspaces\n",
"from xyzspaces.config.default import XYZConfig"
"import xyzspaces"
]
},
{
Expand Down Expand Up @@ -69,16 +68,7 @@
"metadata": {},
"outputs": [],
"source": [
"xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
"config = {\n",
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
" \"http_headers\": {\n",
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
" \"Content-Type\": \"application/geo+json\",\n",
" },\n",
" \"url\": \"https://xyz.api.here.com\",\n",
"}\n",
"xyz = xyzspaces.XYZ(config=XYZConfig(**config))"
"xyz = xyzspaces.XYZ()"
]
},
{
Expand Down Expand Up @@ -249,7 +239,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
31 changes: 4 additions & 27 deletions docs/notebooks/spaces_class_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"import os\n",
"import warnings\n",
"from xyzspaces.datasets import get_countries_data\n",
"import xyzspaces\n",
"from xyzspaces.config.default import XYZConfig"
"import xyzspaces"
]
},
{
Expand All @@ -31,7 +30,7 @@
"metadata": {},
"outputs": [],
"source": [
"os.environ[\"XYZ_TOKEN\"] = \"MY-XYZ-TOKEN\" # Replace your token here."
"os.environ[\"XYZ_TOKEN\"] = \"APt3TrqqSAaKXgzQ_D8cMwA\" # Replace your token here."
]
},
{
Expand All @@ -40,16 +39,7 @@
"metadata": {},
"outputs": [],
"source": [
"xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
"config = {\n",
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
" \"http_headers\": {\n",
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
" \"Content-Type\": \"application/geo+json\",\n",
" },\n",
" \"url\": \"https://xyz.api.here.com\",\n",
"}\n",
"xyz = xyzspaces.XYZ(config=XYZConfig(**config))"
"xyz = xyzspaces.XYZ()"
]
},
{
Expand All @@ -58,19 +48,6 @@
"metadata": {},
"outputs": [],
"source": [
"os.environ[\"XYZ_TOKEN\"] = \"MY-XYZ-TOKEN\" # Replace your token here.\n",
"\n",
"xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
"config = {\n",
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
" \"http_headers\": {\n",
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
" \"Content-Type\": \"application/geo+json\",\n",
" },\n",
" \"url\": \"https://xyz.api.here.com\",\n",
"}\n",
"xyz = xyzspaces.XYZ(config=XYZConfig(**config))# Create a new space\n",
"\n",
"title = \"Testing xyzspaces\"\n",
"description = \"Temporary space containing countries data.\"\n",
"\n",
Expand Down Expand Up @@ -366,7 +343,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
11 changes: 1 addition & 10 deletions docs/notebooks/talk_pyml_geopython_2020.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,7 @@
"metadata": {},
"outputs": [],
"source": [
"xyz_token = os.getenv(\"XYZ_TOKEN\")\n",
"config = {\n",
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
" \"http_headers\": {\n",
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
" \"Content-Type\": \"application/geo+json\",\n",
" },\n",
" \"url\": \"https://xyz.api.here.com\",\n",
"}\n",
"xyz = XYZ(config=XYZConfig(**config))"
"xyz = XYZ()"
]
},
{
Expand Down
16 changes: 3 additions & 13 deletions docs/notebooks/visual_clipping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"from xyzspaces.datasets import get_countries_data\n",
"from xyzspaces.tools import subset_geojson\n",
"from xyzspaces.utils import feature_to_bbox\n",
"import xyzspaces\n",
"from xyzspaces.config.default import XYZConfig"
"import xyzspaces"
]
},
{
Expand Down Expand Up @@ -57,16 +56,7 @@
"metadata": {},
"outputs": [],
"source": [
"xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
"config = {\n",
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
" \"http_headers\": {\n",
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
" \"Content-Type\": \"application/geo+json\",\n",
" },\n",
" \"url\": \"https://xyz.api.here.com\",\n",
"}\n",
"xyz = xyzspaces.XYZ(config=XYZConfig(**config))"
"xyz = xyzspaces.XYZ()"
]
},
{
Expand Down Expand Up @@ -230,7 +220,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
16 changes: 3 additions & 13 deletions docs/notebooks/xyz_pro_features_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
"\n",
"from xyzspaces.datasets import get_chicago_parks_data, get_countries_data\n",
"from xyzspaces.exceptions import ApiError\n",
"import xyzspaces\n",
"from xyzspaces.config.default import XYZConfig"
"import xyzspaces"
]
},
{
Expand Down Expand Up @@ -70,16 +69,7 @@
"metadata": {},
"outputs": [],
"source": [
"xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
"config = {\n",
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
" \"http_headers\": {\n",
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
" \"Content-Type\": \"application/geo+json\",\n",
" },\n",
" \"url\": \"https://xyz.api.here.com\",\n",
"}\n",
"xyz = xyzspaces.XYZ(config=XYZConfig(**config))"
"xyz = xyzspaces.XYZ()"
]
},
{
Expand Down Expand Up @@ -561,7 +551,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 2e4824e

Please sign in to comment.