diff --git a/README.md b/README.md index 7d250b7..b4db17c 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,30 @@ We take care of reading the metadata from the `*_MTL.txt` files provided by EarthExplorer and organizing the bands into a single data structure for easier manipulation, processing, and visualization. +## Example + +Here's a quick example of loading this [Landsat 8 scene from the Brumadinho +tailings dam disaster in Brazil](https://doi.org/10.6084/m9.figshare.21665630.v1): + +```python +import xlandsat as xls +import pooch # for downloading the sample scene + +# Download the scene as a tar archive +path = pooch.retrieve( + "doi:10.6084/m9.figshare.21665630.v1/cropped-after.tar.gz", + known_hash="md5:4ae61a2d7a8b853c727c0c433680cece", +) +# Load the scene directly from the archive (no need to unpack it) +scene = xls.load_scene(path) +# Make an RGB composite and add it to the scene Dataset +scene = scene.assign(rgb=xls.composite(scene, rescale_to=[0, 0.2])) +# Plot the composite +scene.rgb.plot.imshow() +``` + +![RGB map showing the flooded plain after the dam collapse as light brown.]( https://raw.githubusercontent.com/compgeolab/xlandsat/main/doc/_static/readme-example.jpg) + ## Project goals * Loading single scenes in the EarthExplorer format. diff --git a/doc/_static/readme-example.jpg b/doc/_static/readme-example.jpg new file mode 100644 index 0000000..a52122e Binary files /dev/null and b/doc/_static/readme-example.jpg differ