cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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
Databricks Employee
Databricks Employee

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!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group