cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to render widget to display map within Jupyter notebook output cell

kll
New Contributor III

I am attempting to render a map within jupyter notebook and keep bumping into output limit. Below is my code:

import pydeck as pdk
 
import pandas as pd
 
 
 
COLOR_BREWER_BLUE_SCALE = [
 
  [240, 249, 232],
 
  [204, 235, 197],
 
  [168, 221, 181],
 
  [123, 204, 196],
 
  [67, 162, 202],
 
  [8, 104, 172],
 
]
 
 
 
 
 
view_state = pdk.data_utils.compute_view(df[["lng", "lat"]])
 
view_state.zoom = 6
 
 
 
 
 
# Define a layer to display on a map
 
layer = pdk.Layer(
 
          'HexagonLayer',
 
          df,
 
          get_position=['lng', 'lat'],
 
          auto_highlight=True,
 
          elevation_scale=50,
 
          pickable=True,
 
          elevation_range=[0, 3000],
 
          extruded=True,         
 
          coverage=1
 
         )
 
 
 
# Render
 
r = pdk.Deck(layers=[layer], initial_view_state=view_state)
 
r.show()

In the output cell, I get:

Loading the widget is taking longer than expected. We suggest the following…

  • Make sure that your cluster runs on DBR 11.0 (DBR 11.1 for GCP user) or higher.
  • Try to run the cell again.
  • Keep waiting if the widget is large or your internet is slow.
  • Reach out to your Databricks support.

The cluster is running on DBR: `12.2 LTS (includes Apache Spark 3.3.2, Scala 2.12)`

2 REPLIES 2

Debayan
Esteemed Contributor III
Esteemed Contributor III

Hi, If you could raise a support case, we will verify the code and suggest if any change is needed.

Also refer: https://docs.databricks.com/notebooks/widgets.html

Also, please tag @Debayan​ with your next response which will notify me. Thank you!

Anonymous
Not applicable

Hi @Keval Shah​ 

Thank you for your question! To assist you better, please take a moment to review the answer and let me know if it best fits your needs.

Please help us select the best solution by clicking on "Select As Best" if it does.

Your feedback will help us ensure that we are providing the best possible service to you. Thank you!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.