Skip to content

Commit 2e4824e

Browse files
author
Kharude, Sachin
committed
updated notebooks
Signed-off-by: Kharude, Sachin <[email protected]>
1 parent 343e87d commit 2e4824e

File tree

5 files changed

+14
-76
lines changed

5 files changed

+14
-76
lines changed

docs/notebooks/demo.ipynb

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
"\n",
4141
"from xyzspaces.apis import HubApi\n",
4242
"from xyzspaces.datasets import get_countries_data\n",
43-
"import xyzspaces\n",
44-
"from xyzspaces.config.default import XYZConfig"
43+
"import xyzspaces"
4544
]
4645
},
4746
{
@@ -69,16 +68,7 @@
6968
"metadata": {},
7069
"outputs": [],
7170
"source": [
72-
"xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
73-
"config = {\n",
74-
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
75-
" \"http_headers\": {\n",
76-
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
77-
" \"Content-Type\": \"application/geo+json\",\n",
78-
" },\n",
79-
" \"url\": \"https://xyz.api.here.com\",\n",
80-
"}\n",
81-
"xyz = xyzspaces.XYZ(config=XYZConfig(**config))"
71+
"xyz = xyzspaces.XYZ()"
8272
]
8373
},
8474
{
@@ -249,7 +239,7 @@
249239
"name": "python",
250240
"nbconvert_exporter": "python",
251241
"pygments_lexer": "ipython3",
252-
"version": "3.7.7"
242+
"version": "3.8.5"
253243
}
254244
},
255245
"nbformat": 4,

docs/notebooks/spaces_class_example.ipynb

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"import os\n",
1212
"import warnings\n",
1313
"from xyzspaces.datasets import get_countries_data\n",
14-
"import xyzspaces\n",
15-
"from xyzspaces.config.default import XYZConfig"
14+
"import xyzspaces"
1615
]
1716
},
1817
{
@@ -31,7 +30,7 @@
3130
"metadata": {},
3231
"outputs": [],
3332
"source": [
34-
"os.environ[\"XYZ_TOKEN\"] = \"MY-XYZ-TOKEN\" # Replace your token here."
33+
"os.environ[\"XYZ_TOKEN\"] = \"APt3TrqqSAaKXgzQ_D8cMwA\" # Replace your token here."
3534
]
3635
},
3736
{
@@ -40,16 +39,7 @@
4039
"metadata": {},
4140
"outputs": [],
4241
"source": [
43-
"xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
44-
"config = {\n",
45-
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
46-
" \"http_headers\": {\n",
47-
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
48-
" \"Content-Type\": \"application/geo+json\",\n",
49-
" },\n",
50-
" \"url\": \"https://xyz.api.here.com\",\n",
51-
"}\n",
52-
"xyz = xyzspaces.XYZ(config=XYZConfig(**config))"
42+
"xyz = xyzspaces.XYZ()"
5343
]
5444
},
5545
{
@@ -58,19 +48,6 @@
5848
"metadata": {},
5949
"outputs": [],
6050
"source": [
61-
"os.environ[\"XYZ_TOKEN\"] = \"MY-XYZ-TOKEN\" # Replace your token here.\n",
62-
"\n",
63-
"xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
64-
"config = {\n",
65-
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
66-
" \"http_headers\": {\n",
67-
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
68-
" \"Content-Type\": \"application/geo+json\",\n",
69-
" },\n",
70-
" \"url\": \"https://xyz.api.here.com\",\n",
71-
"}\n",
72-
"xyz = xyzspaces.XYZ(config=XYZConfig(**config))# Create a new space\n",
73-
"\n",
7451
"title = \"Testing xyzspaces\"\n",
7552
"description = \"Temporary space containing countries data.\"\n",
7653
"\n",
@@ -366,7 +343,7 @@
366343
"name": "python",
367344
"nbconvert_exporter": "python",
368345
"pygments_lexer": "ipython3",
369-
"version": "3.8.3"
346+
"version": "3.8.5"
370347
}
371348
},
372349
"nbformat": 4,

docs/notebooks/talk_pyml_geopython_2020.ipynb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,7 @@
105105
"metadata": {},
106106
"outputs": [],
107107
"source": [
108-
"xyz_token = os.getenv(\"XYZ_TOKEN\")\n",
109-
"config = {\n",
110-
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
111-
" \"http_headers\": {\n",
112-
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
113-
" \"Content-Type\": \"application/geo+json\",\n",
114-
" },\n",
115-
" \"url\": \"https://xyz.api.here.com\",\n",
116-
"}\n",
117-
"xyz = XYZ(config=XYZConfig(**config))"
108+
"xyz = XYZ()"
118109
]
119110
},
120111
{

docs/notebooks/visual_clipping.ipynb

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"from xyzspaces.datasets import get_countries_data\n",
2929
"from xyzspaces.tools import subset_geojson\n",
3030
"from xyzspaces.utils import feature_to_bbox\n",
31-
"import xyzspaces\n",
32-
"from xyzspaces.config.default import XYZConfig"
31+
"import xyzspaces"
3332
]
3433
},
3534
{
@@ -57,16 +56,7 @@
5756
"metadata": {},
5857
"outputs": [],
5958
"source": [
60-
"xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
61-
"config = {\n",
62-
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
63-
" \"http_headers\": {\n",
64-
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
65-
" \"Content-Type\": \"application/geo+json\",\n",
66-
" },\n",
67-
" \"url\": \"https://xyz.api.here.com\",\n",
68-
"}\n",
69-
"xyz = xyzspaces.XYZ(config=XYZConfig(**config))"
59+
"xyz = xyzspaces.XYZ()"
7060
]
7161
},
7262
{
@@ -230,7 +220,7 @@
230220
"name": "python",
231221
"nbconvert_exporter": "python",
232222
"pygments_lexer": "ipython3",
233-
"version": "3.7.7"
223+
"version": "3.8.5"
234224
}
235225
},
236226
"nbformat": 4,

docs/notebooks/xyz_pro_features_examples.ipynb

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
"\n",
4242
"from xyzspaces.datasets import get_chicago_parks_data, get_countries_data\n",
4343
"from xyzspaces.exceptions import ApiError\n",
44-
"import xyzspaces\n",
45-
"from xyzspaces.config.default import XYZConfig"
44+
"import xyzspaces"
4645
]
4746
},
4847
{
@@ -70,16 +69,7 @@
7069
"metadata": {},
7170
"outputs": [],
7271
"source": [
73-
"xyz_token = os.environ[\"XYZ_TOKEN\"]\n",
74-
"config = {\n",
75-
" \"credentials\": {\"XYZ_TOKEN\": xyz_token},\n",
76-
" \"http_headers\": {\n",
77-
" \"Authorization\": f\"Bearer {xyz_token}\",\n",
78-
" \"Content-Type\": \"application/geo+json\",\n",
79-
" },\n",
80-
" \"url\": \"https://xyz.api.here.com\",\n",
81-
"}\n",
82-
"xyz = xyzspaces.XYZ(config=XYZConfig(**config))"
72+
"xyz = xyzspaces.XYZ()"
8373
]
8474
},
8575
{
@@ -561,7 +551,7 @@
561551
"name": "python",
562552
"nbconvert_exporter": "python",
563553
"pygments_lexer": "ipython3",
564-
"version": "3.8.3"
554+
"version": "3.8.5"
565555
}
566556
},
567557
"nbformat": 4,

0 commit comments

Comments
 (0)