1

i am trying to visualize a very large data points on the map for that i am using datashade, I am trying to work on chicago crime dataset: https://www.kaggle.com/currie32/crimes-in-chicago . I am following the guidselines given in this tutorial- (https://towardsdatascience.com/large-scale-visualizations-and-mapping-with-datashader-d465f5c47fb5) Here's a look at my dataset: enter image description here (easting and northing are the projected values of latitude and longitude)

The below code is supposed to give me the map visualisation of all my points, But i am not getting any output not even a single line of plain text

 # Map of all businesses colored by category.
from colorcet import bmw
url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{Z}/{Y}/{X}.png"
geomap = gv.WMTS(url)
points = hv.Points(gv.Dataset(dask_df, kdims=['easting', 'northing'], vdims=['IUCR']))
biz_cat = dynspread(datashade(points, color_key=bmw, element_type=gv.Image, aggregator=ds.count()))
geomap*biz_cat
megh_sat
  • 374
  • 2
  • 12
  • Are you trying to visualize biz_cat? So far you've created it but not actually done anything with it. E.g. if you are in Jupyter you can put `biz_cat` as the last line in a cell, to view that object; these plots work the same as for integers, strings, etc., in that they are displayed only if they are the result of that cell. – James A. Bednar Jun 09 '20 at 19:26
  • Hi, James, I couldn't understand the solution you mentioned do you mean I have to remove "geomap "biz_cat" and keep only "biz_cat" in the last line and yes I am using jupyter notebooks – megh_sat Jun 10 '20 at 16:02
  • Oh, I think I misread your code as it was formatted by SO; `geomap * biz_cat` should work fine if it's on a line by itself. Did you call `hv.extension('bokeh')` to load the JavaScript needed first? – James A. Bednar Jun 12 '20 at 02:05

0 Answers0