# Holoviews stream for a hvplot rasterized quadmesh

**URL:** <https://discourse.holoviz.org/t/holoviews-stream-for-a-hvplot-rasterized-quadmesh/4816>\
**Category:** HoloViews\
**Tags:** geoviews, bokeh, panel, datashader, hvplot\
**Created:** [January 11, 2023, 12:43pm UTC](https://discourse.holoviz.org/t/holoviews-stream-for-a-hvplot-rasterized-quadmesh/4816 "2023-01-11T12:43:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![StuckDuckF](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/stuckduckf/32/4347_2.png) [@StuckDuckF](https://discourse.holoviz.org/u/StuckDuckF)\
**Post date:** [January 11, 2023, 12:43pm UTC](https://discourse.holoviz.org/t/holoviews-stream-for-a-hvplot-rasterized-quadmesh/4816/1 "2023-01-11T12:43:03Z")

</div>

Here is some [Example Data](https://drive.google.com/drive/folders/1oMXWtsWNhQRTxGTY_X_w9wPsxF82P676?usp=share_link) that can be loaded by  
`ds = fstd2nc.Buffer(fst_file_list).to_xarray()`  
for the none NetCDF files. Once loaded, the Xarray should look like this (but with a lot less timesteps).

 ![image](https://discourse.holoviz.org/uploads/default/original/2X/9/9fe7ca43031f287894a069528529d4031f2a8bdb.png)

I am trying to implement the Holoviews Streams example [further developed in this question](https://discourse.holoviz.org/t/simple-panel-example-of-map-time-series-interaction-for-data-cube/1485/7) and I have been succesful to at least replicate the example with some compromises using :

```python
image = ds.TT.hvplot.quadmesh(
                                'rlon',
                                'rlat',
                                cmap='jet',
                                rasterize=True,
                                data_aspect=1,
                                frame_height=500,
                                geo=True,
                            )
stream = hv.streams.Tap(source=image, x=0, y=0)
timeseries = ds.TT.interactive.sel(
                                    rlon=stream.param.x, 
                                    rlat=stream.param.y, 
                                    level1=1.0,
                                    method="nearest"
                                    ).hvplot('time')

```

that results in something that looks like

 ![image](https://discourse.holoviz.org/uploads/default/original/2X/d/d667d39969576b1da89da33276bdcfb44afad7e3.jpeg)

but I would love to have a basemap, coastline and reproject to PlateCarree. I have another app that does this one file at a time with :

```python
gridded_dataset_single_file.TT.hvplot(
                                        cmap='jet', 
                                        kind="quadmesh",
                                        rasterize=True,
                                        data_aspect=1,
                                        frame_height=500,
                                        crs=ccrs.PlateCarree(),
                                        projection=ccrs.PlateCarree(),
                                        project=True,
                                        geo=True,
                                        coastline=True,
                                        widget_location='bottom'
                                    )

```

That results in something that looks like

 ![image](https://discourse.holoviz.org/uploads/default/original/2X/6/68a5540202eab70f7aed9092701dd140ce5e2c52.jpeg)

My ideal would be the `streams.Tap` to actually work with the reprojected `lon/lat` and for the image to be in PlateCarree instead of being forced (by I am not sure what) to keep the original `rlon/rlat` coordinates. Can someone explain to me how to take the final steps please?

Full code for most recent solution :

```python
import panel as pn
import panel.widgets as pnw
import xarray as xr
import hvplot.xarray
import fstd2nc
import cartopy.crs as ccrs
import warnings
import collections
import glob
import holoviews as hv

pn.extension( loading_spinner='arcs' , loading_color='#3ef211' , sizing_mode = 'stretch_width' , template='material' )
pn.state.template.param.update(site="Panel", title="Streams Demo")

warnings.simplefilter(action='ignore', category=FutureWarning)
collections.Callable = collections.abc.Callable
BASE_PATH = '/fst/'
fst_file_list = sorted(glob.glob(f'{BASE_PATH}2022*'))
ds = fstd2nc.Buffer(fst_file_list).to_xarray()
image = ds.TT.hvplot.quadmesh(
                                'rlon',
                                'rlat',
                                cmap='jet',
                                rasterize=True,
                                data_aspect=1,
                                frame_height=500,
                                geo=True,
                            )
stream = hv.streams.Tap(source=image, x=0, y=0)
timeseries = ds.TT.interactive.sel(
                                    rlon=stream.param.x, 
                                    rlat=stream.param.y, 
                                    level1=1.0,
                                    method="nearest"
                                    ).hvplot('time')
pn.Column(image, timeseries.dmap()).servable('main')

```
