How to find configs for each layer and filter in KeplerGL

12 views Asked by At

I am new to kepler.gl and I want to learn basics of it. For example, I added 2 filters and I found what type and name i should add by chance. Also i tried to add a heatmap layer, however it is not seen on frontend, (only points are seen) because probably my code is wrong. I could not find a proper document on web. Can someone help me how to use it?

const sampleConfig = {
visState: {
filters: [
  {
    id: "me",
    dataId: "test_trip_data",
    name: "tpep_pickup_datetime",
    type: "timeRange",
    enlarged: true,
  },
  {
    id: "me2",
    dataId: "test_trip_data",
    name: "count",
    type: "int",
    enlarged: false,
  },
],
layers: [
  {
    id: "heatmap-layer",
    type: "heatmap",
    config: {
      dataId: "test_trip_data",
      label: "Heatmap",
      color: [218, 112, 191],
      columns: {
        lat: "latitude",
        lng: "longitude",
      },
      isVisible: true,
      visConfig: {
        opacity: 0.8,
        colorRange: {
          name: "Global Warming",
          type: "sequential",
          category: "Uber",
          colors: [
            "#5A1846",
            "#900C3F",
            "#C70039",
            "#E3611C",
            "#F1920E",
            "#FFC300",
          ],
        },
        radius: 40,
        density: 0.5,
      },
      textLabel: [
        {
          field: null,
          color: [255, 255, 255],
          size: 18,
          offset: [0, 0],
          anchor: "start",
          alignment: "center",
        },
      ],
    },
  },
],
},
};
0

There are 0 answers