odc.geo.xr.ODCExtension.explore
- ODCExtension.explore(map: Any | None = None, *, bands: Tuple[str, str, str] | None = None, vmin: float | None = None, vmax: float | None = None, cmap: Any | None = None, robust: bool = False, tiles: Any = 'OpenStreetMap', attr: str | None = None, layer_control: bool = True, resampling: str = 'nearest', map_kwds: Dict[str, Any] | None = None, **kwargs: Any) Any
Plot xarray data on an interactive
foliumleaflet map for rapid data exploration.xarray.Datasetinputs are automatically converted to multi-band RGB plots, while single-bandxarray.DataArrayinputs can be plotted using matplotlib colormaps (needs matplotlib installed).- Parameters:
map (
Optional[Any]) – An optional existingfoliummap object to plot into. By default, a new map object will be created.bands (
Optional[Tuple[str,str,str]]) – Bands used for RGB colours when converting from aDataset(order should be red, green, blue). By default, the function will attempt to guess bands automatically. Ignored forDataArrayinputs.vmin (
Optional[float]) – Lower value used for the color stretch.vmax (
Optional[float]) – Upper value used for the color stretch.cmap (
Optional[Any]) – The colormap used to colorise single-band arrays. If not provided, this will default to ‘viridis’. Ignored for multi-band inputs.robust (
bool) – IfTrue(andvminandvmaxare absent), the colormap range will be computed based on 2nd and 98th percentiles, minimising the influence of extreme values. Used for single-band arrays only; ignored for multi-band inputs.tiles (
Any) – Map tileset to use for the map basemap. Supports any option supported byfolium, including “OpenStreetMap”, “CartoDB positron”, “CartoDB dark_matter” or a custom XYZ URL.attr (
Optional[str]) – Map tile attribution; only required if passing custom tile URL.layer_control (
bool) – Whether to add a control to the map to show or hide map layers. If a layer control already exists, this will be skipped.resampling (
str) – Custom resampling method to use when reprojectingxxto the map CRS; defaults to “nearest”.map_kwds (
Optional[Dict[str,Any]]) – Additional keyword arguments to pass tofolium.Map.kwargs (
Any) – Additional keyword arguments to pass to.odc.add_to().
- Return type:
- Returns:
A
foliummap containing the plotted xarray data.