Skip to content

Solution --> Error importing/running colab notebook stac-load-e84-aws.ipynb #96

@leila-ayad

Description

@leila-ayad

Please add these import statements and change to make this colab notebook run again.

# added a number of dependencies

import dask.distributed
import folium
import folium.plugins
import geopandas as gpd
import yaml
!pip install odc.ui
!pip install shapely
!pip install pystac_client
!pip install folium matplotlib mapclassify
!pip install osmnx
!pip install odc.stac

from odc.ui import mk_data_uri, to_jpeg_data
from odc.stac import configure_rio, stac_load
from branca.element import Figure
from IPython.display import HTML, display
from pystac_client import Client
from odc.algo import to_rgba


# slight change from tutorial code here, ref mk_data_uri + to_jpeg_data directly after importing from odc.ui

img_zoomed_in = mk_data_uri(
    to_jpeg_data(im_small.isel(time=0).data, quality=80), "image/jpeg"
)
print(f"Image url: {img_zoomed_in[:64]}...")

Here is my notebook for reference: https://colab.research.google.com/drive/1tGpq8-faChC2NqwLrN3eWzButOR1R4OI#scrollTo=i1OoTMZGQlmG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions