Hi, I have a holoviews map and I'm trying to display it on my website. When I run my program on my local host it works, but now that I deploy it on pythonanywhere I can't display it.
Below is the Output I'm trying to display (Scanner is the name of my dataframe):
proyectos_gv_points = gv.Points(scanner, ['longitud', 'latitud'],
['codigo_proyecto', 'status', 'incidencia_ufm2',
'precio_estimado', 'velocidad_de_ventas', 'unidades','color'], labels = 'codigo_proyecto')
tooltips = [('Proyecto', '@codigo_proyecto'),
('Status', '@status'),
('Incidencia UF/m2', '@incidencia_ufm2{0.0}'),
('Precio Estimado', '@precio_estimado{0.0}'),
('Velocidad de Ventas', '@velocidad_de_ventas{0.0}'),
('Unidades', '@unidades'),
]
hover = HoverTool(tooltips=tooltips)
proyectos_plot = (gvts.StamenToner * proyectos_gv_points).opts(
opts.Points(width=800, height=500, alpha=0.7,
hover_line_color='black',
color = dim('color'),line_color='black', xaxis=None, yaxis=None,
tools=[hover],size=30,
hover_fill_color='#ff0000', hover_fill_alpha=0.7))*gv.Labels(proyectos_gv_points).options(text_font_size='7.5pt', text_color='white')
Then in my views.py file I use:
return JsonResponse({'status':status,'scanner_data': return_data})
Where return_data is my map from above (proyectos_plot).
On my scanner_demo.html. template I added the script to bokeh:
<script src="http://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
<link href="http://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.css" rel="stylesheet" type="text/css">
<script src="http://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
<link href="http://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.css" rel="stylesheet" type="text/css">
I have tried everything and it doesn't work. The page keeps loading when I use the filters and never displays the map. Can someone help me?