Skip to content

Commit 72c9664

Browse files
authored
Merge pull request planetlabs#51 from planetlabs/scipy
Add workshop exercise materials & related keys
2 parents 2a8fc99 + d8220f8 commit 72c9664

17 files changed

+2751
-137
lines changed

jupyter-notebooks/data-api-tutorials/search_and_download_quickstart.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"source": [
153153
"Planet's products are categorized as **items** and **assets**: an item is a single picture taken by a satellite at a certain time. Items have multiple asset types including the image in different formats, along with supporting metadata files.\n",
154154
"\n",
155-
"For this demonstration, let's get a satellite image that is best suited for visual applications; e.g., basemaps or visual analysis. Since we're not doing any spectral analysis outside of the visual range, we only need a 3-band (RGB) image. To get the image we want, we will specify an item type of `PSScene3Band`, and asset type `visual`.\n",
155+
"For this demonstration, let's get a satellite image that is best suited for analytic applications; i.e., a 4-band image with spectral data for Red, Green, Blue and Near-infrared values. To get the image we want, we will specify an item type of `PSScene4Band`, and asset type `analytic`.\n",
156156
"\n",
157157
"You can learn more about item & asset types in Planet's Data API [here](https://planet.com/docs/reference/data-api/items-assets/).\n",
158158
"\n",
@@ -173,7 +173,7 @@
173173
"# API Key stored as an env variable\n",
174174
"PLANET_API_KEY = os.getenv('PL_API_KEY')\n",
175175
"\n",
176-
"item_type = \"PSScene3Band\"\n",
176+
"item_type = \"PSScene4Band\"\n",
177177
"\n",
178178
"# API request object\n",
179179
"search_request = {\n",
@@ -246,7 +246,7 @@
246246
" \n",
247247
"The Data API does not pre-generate assets, so they are not always immediately availiable to download. In order to download an asset, we first have to **activate** it.\n",
248248
"\n",
249-
"Remember, earlier we decided we wanted a color-corrected image best suited for *visual* applications. We can check the status of the visual asset we want to download like so:\n",
249+
"Remember, earlier we decided we wanted a color-corrected image best suited for *analytic* applications. We can check the status of the analytic asset we want to download like so:\n",
250250
" "
251251
]
252252
},
@@ -256,8 +256,8 @@
256256
"metadata": {},
257257
"outputs": [],
258258
"source": [
259-
"# This is \"inactive\" if the \"visual\" asset has not yet been activated; otherwise 'active'\n",
260-
"print(result.json()['visual']['status'])"
259+
"# This is \"inactive\" if the \"analytic\" asset has not yet been activated; otherwise 'active'\n",
260+
"print(result.json()['analytic']['status'])"
261261
]
262262
},
263263
{
@@ -274,11 +274,11 @@
274274
"outputs": [],
275275
"source": [
276276
"# Parse out useful links\n",
277-
"links = result.json()[u\"visual\"][\"_links\"]\n",
277+
"links = result.json()[u\"analytic\"][\"_links\"]\n",
278278
"self_link = links[\"_self\"]\n",
279279
"activation_link = links[\"activate\"]\n",
280280
"\n",
281-
"# Request activation of the 'visual' asset:\n",
281+
"# Request activation of the 'analytic' asset:\n",
282282
"activate_result = \\\n",
283283
" requests.get(\n",
284284
" activation_link,\n",

0 commit comments

Comments
 (0)