Skip to content

Commit

Permalink
fix up tutorial links
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyhq committed Aug 24, 2020
1 parent 0fcde70 commit a43a0cf
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions docs/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ Catalog:

.. ipython:: python
catalog = intake.open_stac_catalog(
'https://storage.googleapis.com/pdd-stac/disasters/catalog.json',
name='planet-disaster-data'
)
url = 'https://raw.githubusercontent.com/cholmes/sample-stac/master/stac/catalog.json'
catalog = intake.open_stac_catalog(url)
list(catalog)
You can also point to STAC Collections or Items. Each constructor returns a
Expand All @@ -41,17 +39,15 @@ initialization:
.. ipython:: python
:verbatim:
root_url = 'https://raw.githubusercontent.com/sat-utils/sat-stac/master/test/catalog'
stac_cat = intake.open_stac_catalog(
'https://landsat-stac.s3.amazonaws.com/catalog.json',
name='landsat-stac'
f'{root_url}/catalog.json',
)
collection_cat = intake.open_stac_collection(
'https://landsat-stac.s3.amazonaws.com/landsat-8-l1/catalog.json',
name='landsat-8'
f'{root_url}/eo/landsat-8-l1/catalog.json',
)
items_cat = intake.open_stac_item(
'https://landsat-stac.s3.amazonaws.com/landsat-8-l1/111/111/2018-11-30/LC81111112018334LGN00.json',
name='LC81111112018334LGN00'
f'{root_url}/eo/landsat-8-l1/item.json'
)
Intake-Stac uses `sat-stac <https://github.com/sat-utils/sat-stac>`_ to parse
Expand All @@ -63,10 +59,8 @@ STAC objects. You can also pass ``satstac`` objects (e.g.
import satstac
col = satstac.Collection.open(
'https://landsat-stac.s3.amazonaws.com/landsat-8-l1/catalog.json'
)
collection_cat = open_stac_collection(col, name='landsat-8')
col = satstac.Collection.open(f'{root_url}/catalog.json')
collection_cat = intake.open_stac_collection(url)
Using the catalog
-----------------
Expand All @@ -76,6 +70,7 @@ contents:

.. ipython:: python
catalog = catalog['hurricane-harvey']['hurricane-harvey-0831']
for id, entry in catalog.items():
display(entry)
Expand Down

0 comments on commit a43a0cf

Please sign in to comment.