View a running version of this notebook. | Download this project.

Datashading LandSat8 raster satellite imagery

Datashader is fundamentally a rasterizing library, turning data into rasters (image-like arrays), but it is also useful for already-rasterized data like satellite imagery. For raster data, datashader uses the separate xarray library to re-render the data to whatever new bounding box and resolution the user requests, and the rest of the datashader pipeline can then be used to visualize and analyze the data. This demo shows how to work with a set of raster satellite data, generating images as needed and overlaying them on geographic coordinates using HoloViews (version >1.9), GeoViews, and Bokeh.

In [1]:
import numpy as np
import xarray as xr
import holoviews as hv
from holoviews import opts
import geoviews as gv
import datashader as ds
import as ccrs

from holoviews.operation.datashader import regrid, shade
from bokeh.tile_providers import STAMEN_TONER

hv.extension('bokeh', width=80)
BokehDeprecationWarning: STAMEN_TONER was deprecated in Bokeh 1.1.0 and will be removed, use get_provider(Vendors.STAMEN_TONER) instead.