kepler.gl: [Bug][Jupyter Widget] Hexbin fails with EnhancedColumnLayer TypeError

Describe the bug Kepler fails to load an hexbin map widget with error:

deck: error during initialisation of EnhancedColumnLayer({id: 'lifibkk-hexagon-cell'}) TypeError: Class constructor o cannot be invoked without 'new'

To Reproduce Steps to reproduce the behavior:

  1. load kepler
  2. Add data: GeoDataFrame with hex_id column containing H3 hashes at resolution 5,6
  3. Try to load map

Expected behavior

An interactive map widget should be displayed. It works at resolution 5, but fails for hashes at resolution 6.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Python version: 3.7.7
  • keplergl Widget version: 0.3.2

Additional context I tried loading the same data on the demo website and it works.

Within Jupyter, I also converted the hashes to lat/lon points and they are correctly loaded in the expected location

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 6
  • Comments: 20

Most upvoted comments

Can anybody help here?

Any update on this issue? It is really strange nobody is bothered about this issue? And, i could only find this thread for this specific issue; however, I believe it should be a very common issue.

Pls support to provide a solution for this issue. I cannot upload the data due to it’s criticality , neither can i use kepler.gl website as it also requires me to upload the data

It seems to be a problem with some hexagons, and not related to the mapbox key.

Here is an example to reproduce the bug:

    import pandas as pd  # 1.5.1
    from keplergl import KeplerGl  # 0.3.2

    # This fake dataset does not work, and provide a white screen.
    df_fake = pd.DataFrame({"hex_id": ["8bbe08421b1afff", "8bbe08424320fff"], "num": [2,4]})  
    
    # This fake dataset works correctly (comment it out to try the faulty one):
    df_fake = pd.DataFrame({"hex_id": ["85111153fffffff", "8510a49bfffffff"], "num": [2,4]}) 

    map_1 = KeplerGl(
        data={
            "hex_id": df_fake.copy()
        }, 
    )
    map_1

Hope this help reproducing the problem.

Thanks a lot @Sandbird ! That actually helped!