Hello,
I am trying to plot temperature dataset from copernicusmarine. When I run script in jupyter notebook it works fine and I mean when I move de slider the plot update de picture smothly. But when I try to deploy locally with
panel serve panel_app.py --autoreload
when I move the slider it tooks several seconds to update the plot, is very slow.
Here is my simple code:
import panel as pn
import copernicusmarine
@pn.cache
def get_data():
DS = copernicusmarine.open_dataset(
dataset_id="cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m",
variables=["thetao"],
minimum_longitude=-74,
maximum_longitude=-70,
minimum_latitude=-26,
maximum_latitude=-18,
start_datetime="2023-01-01",
end_datetime="2023-01-31",
minimum_depth=0,
maximum_depth=1,
)
return DS
DS = get_data()
plot = DS.thetao.hvplot(
x='longitude',
y = 'latitude',
)
pn.extension()
pn.template.MaterialTemplate(
site="Panel",
title="Getting Started App",
main=[plot],
).servable();
output