kepler python save kepler but not show in jupyter

178 Views Asked by At

I want to show a data frame on Kepler based on the hexagons. I have df and config like below. data is loaded in Kepler properly and I can see the data loaded there. but I can not see the map, I can just see a wight page. Is there anything wrong with the config or code? can anyone help me to find the problem ?

here is the config:

config = {'version': 'v1',

          'config': {
              'visState': {
                  'layers': [

                    {
                        'id': 'jdys7lp',
                        'type': 'hexagonId',

                        'visualChannels': {
                            'colorField': {'type': 'real', 'name': 'avg_time_arrived'},
                            'colorScale': 'quantile',
                            'sizeField': None,
                            'sizeScale': 'linear',
                            'coverageField': None,
                            'coverageScale': 'linear',


                        },
                        'config': {
                            'dataId': 'data_1',
                            'color': [250, 116, 0],
                            'textLabel': {'color': [255, 255, 255],
                                          'field': None,
                                          'size': 50,
                                          'anchor': 'middle',
                                          'offset': [0, 0]},
                            'label': 'H3 Hexagon',
                            'isVisible': True,
                            'visConfig':
                            {
                                'colorRange': {
                                    "name": "Custom Palette",
                                    "type": "custom",
                                    "category": "Custom",
                                    "colors": [
                                        "#fff5f0",
                                        "#fee0d2",
                                        "#fcbba1",
                                        "#fc9272",
                                        "#fb6a4a",
                                        "#ef3b2c",
                                        "#8f1b1e",
                                        "#58040b"
                                    ]
                                },
                                'opacity': 0.8,
                                'elevationScale': 5,
                                'hi-precision': False,
                                'coverage': 1,
                                'enable3d': False,
                                'sizeRange': [0, 500],
                            },
                            'columns': {
                                'hex_id': 'hexagon_id'
                            },
                        },
                    }],
                  'interactionConfig': {'brush': {'enabled': False, 'size': 0.5},
                                        'tooltip': {
                      'fieldsToShow': {
                          'data_1': [

                              {
                                  'name': 'hexagon_id',
                                  'format': None
                              },
                              {
                                  'name': 'avg_time_arrived',
                                  'format': None
                              }
                          ]
                      },
                      'enabled': True}},
                  'splitMaps': [],
                  'layerBlending': 'normal',
                  'filters': []},
              'mapState': {
                  'latitude': latitude,
                  'longitude': longitude,
                  'bearing': 2.6192893401015205,
                  'dragRotate': True,
                  'zoom': 10,
                  'isSplit': False,
                  'pitch': 0,
              },
              'mapStyle': {'mapStyles': {},
                           'topLayerGroups': {},
                           'styleType': 'dark',
                           'visibleLayerGroups': {'building': True,
                                                  'land': True,
                                                  '3d building': False,
                                                  'label': True,
                                                  'water': True,
                                                  'border': False,
                                                  'road': True}}}}

The data frame is like below:

enter image description here

and the code is like below :

    from keplergl import KeplerGl
map_1 = KeplerGl(height=800, data={"data_1": time_arrived_vs_hexagon},name='data_1', config=config)
map_1
0

There are 0 best solutions below