Skip to content

Commit

Permalink
tune up slides
Browse files Browse the repository at this point in the history
  • Loading branch information
hrodmn committed Nov 18, 2024
1 parent 0e5e215 commit 9b9a498
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 47 deletions.
90 changes: 43 additions & 47 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ title-slide-attributes:

# STAC-powered applications

## STAC Browser
## STAC Browser {.hide-title}

::: {.r-stretch}
<iframe
Expand Down Expand Up @@ -133,13 +133,7 @@ title-slide-attributes:

# STAC at scale: a journey

## Challenges

- data volume!
- search speed for applications that consume data
- ingestion pipelines

##
## Outline {.hide-title}

### LandsatLook
- user-facing USGS application for visualizaing mosaics of Landsat scenes
Expand All @@ -152,6 +146,12 @@ title-slide-attributes:
- massive catalog of public data
- event-driven STAC metadata generation pipelines

::: {.notes}
- data volume!
- search speed for applications that consume data
- ingestion pipelines
:::

# LandsatLook

- an early STAC-powered application
Expand All @@ -165,7 +165,7 @@ title-slide-attributes:
- Spurred the development of MosaicJSON
:::

## {background-interactive=true background-iframe="https://landsatlook.usgs.gov/explore?date=2024-10-17%7C2024-11-15&sat=LANDSAT_9%7CLANDSAT_8"}
## Explore LandsatLook {.hide-title background-interactive=true background-iframe="https://landsatlook.usgs.gov/explore?date=2024-10-17%7C2024-11-15&sat=LANDSAT_9%7CLANDSAT_8"}

::: footer
<https://landsatlook.usgs.gov/explore>
Expand All @@ -191,12 +191,13 @@ title-slide-attributes:

# Microsoft Planetary Computer

##
:::{.fragment}
- STAC API with many public datasets
- Continuous flow of new data
- Interactive visualization platform powered by STAC metadata
:::

## {background-interactive=true background-iframe="https://planetarycomputer.microsoft.com/catalog"}
## Explore Planetary Computer {.hide-title background-interactive=true background-iframe="https://planetarycomputer.microsoft.com/catalog"}

::: footer
<https://planetarycomputer.microsoft.com/catalog>
Expand All @@ -206,7 +207,7 @@ title-slide-attributes:
- Show how you can filter by date range, show different visualizations, etc.
:::

## Microsoft Planetary Computer
## `pgstac` origin story {.hide-title}

::::{.columns}
:::{.column width="50%"}
Expand Down Expand Up @@ -251,12 +252,13 @@ title-slide-attributes:

# Amazon Sustainability Data Initiative (ASDI)

## ASDI
:::{.fragment}
- sustainability data situated next to a compute platform
- continuously updated
- NODD: partnership with NOAA
:::

## {background-interactive=true background-iframe="https://radiantearth.github.io/stac-browser/#/external/dev.asdi-catalog.org/?.language=en"}
## ASDI Catalog {.hide-title background-interactive=true background-iframe="https://radiantearth.github.io/stac-browser/#/external/dev.asdi-catalog.org/?.language=en"}

::: footer
:::
Expand All @@ -265,7 +267,7 @@ title-slide-attributes:

> The stactools-packages github organization is a home for datasets and tool packages using the SpatioTemporal Asset Catalog (STAC) specification.
## {background-interactive=true background-iframe="https://stactools-packages.github.io/"}
## Browse stacktools-packages {.hide-title background-interactive=true background-iframe="https://stactools-packages.github.io/"}

::: footer
:::
Expand All @@ -275,7 +277,9 @@ title-slide-attributes:

![](https://github.com/developmentseed/stactools-pipelines/blob/main/docs/aws_asdi_cog.png?raw=true){.r-stretch}

TODO: link to blog post
::: {.aside}
<https://developmentseed.org/blog/2023-10-20-asdi/>
:::

::: footer
[developmentseed/stactools-pipelines](https://github.com/developmentseed/stactools-pipelines)
Expand All @@ -289,17 +293,6 @@ TODO: link to blog post

# Data conusumer experience

## Cloud-native geospatial
- work entirely on the cloud (jupyter hub)
- work locally on files stored in the cloud

::: {.notes}
- several flavors of cloud-native geospatial, each with specific advantages
- working locally is so convenient!
- working on compute in the cloud is faster once you have an environment set up
-
:::

## the STAC API advantage
- don't need to learn file path schema for a new dataset
- can rely on tools like [`pystac_client`](https://pystac-client.readthedocs.io/en/latest/) for API operations and [`odc_stac`](https://odc-stac.readthedocs.io/en/latest/) for file i/o
Expand All @@ -311,7 +304,7 @@ TODO: link to blog post
- thanks to the STAC spec we only need a few libraries to interact with data from any collection!

```{python}
#| code-line-numbers: "|1|3|4|"
#| code-line-numbers: "|1|3|5|"
import odc.stac
import pyproj
import pystac_client
Expand All @@ -321,7 +314,7 @@ from shapely.geometry import box
from shapely.ops import transform
```

##
## Define AOI {.hide-title}

- set up an AOI

Expand All @@ -344,7 +337,7 @@ bbox_4326 = transform(transformer_4326.transform, aoi).bounds
print(bbox_4326)
```

##
## Collection search {.hide-title}
- find DEM collections in a STAC API

```{python}
Expand All @@ -363,14 +356,12 @@ for collection_id, collection in search_results.items():
print(f"{collection_id}: {collection.description}\n")
```

## {.smaller}
## Item search {.smaller}

- query STAC items

```{python}
#| output-location: column
#| class-output: scrollable-output
#| scrollable: true
stac_items = client.search(
collections="cop-dem-glo-30",
bbox=bbox_4326,
Expand All @@ -379,7 +370,7 @@ stac_items = client.search(
stac_items
```

##
## `odc.stac.load` {.hide-title}
- load into an `xarray.Dataset` with `odc.stac.load`
- don't read any data yet, though (just metadata!)

Expand All @@ -397,15 +388,16 @@ dem_ds = odc.stac.load(
print(dem_ds)
```

##
## `xarray` API {.hide-title}

- access to the `xarray` API for visualization and analysis
- read data from cloud storage "just-in-time"
```{python}
with rasterio.Env(aws_no_sign_request=True):
dem_ds["data"].squeeze().plot.imshow()
```

##
## New source, same tools
- read another dataset from a different source
```{python}
client = pystac_client.Client.open(
Expand All @@ -424,15 +416,7 @@ stac_items = client.search(
).item_collection()
```

## {.smaller}
```{python}
#| class-output: scrollable-output
#| scrollable: true
#| echo: false
display(stac_items)
```

##
## Load land cover {.hide-title}

```{python}
#| output-location: fragment
Expand All @@ -449,7 +433,7 @@ landcover_ds = odc.stac.load(
print(landcover_ds)
```

##
## Merge datasets {.hide-title}

- combine the two Datasets into a single `xarray.Dataset`
```{python}
Expand All @@ -465,7 +449,7 @@ merged = xr.merge(
print(merged)
```

## {.smaller}
## Analyze disparate datasets {.hide-title .smaller}

- calculate mean elevation by land cover class

Expand All @@ -489,3 +473,15 @@ display(stats.drop_vars(["spatial_ref", "time"]).to_dataframe().reset_index().as
```
:::
::::

# Conclusion
:::: columns
::: column
- STAC is working on a very large scale already
- evolving fast (but not too fast)
:::
::::

## Thank you!

<[email protected]>
5 changes: 5 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,8 @@
overflow-y: auto;
overflow-x: auto;
}

/* make it possible to hide a slide title */
.hide-title h2 {
display: none;
}

0 comments on commit 9b9a498

Please sign in to comment.