quick custom topojson shape on a map

Hi, I struggled to find an easy explanation on how I can easily display my own shapes on a map and then match data with it and display them on a looker viz. So to remember how I did it, I amgoing to document it here. This is detailing the 2 posts from here and here to create the shape and here about how to put it in looker. I am just putting them together to explain more in details.

  1. First thing is to create the shape on the map. For this, I used this tool http://geojson.io/
    just draw the shapes or dots you need on a map:
    5a7bf489-b13b-4dc4-bb23-0d441e08ebd4.png
  2. then the important step is to attach a unique code to each shape so that you can link each shape to a value in Looker’s dimensions. For this, just click on your shape and then add the name of dimension you will be using and then the value that is the one you would get in your database:
    af9e0d18-9c0f-40f4-ab0f-d1fd34a13194.png

    if I click on another shape, I will also put “id” but with a different value:

    1921cde3-a174-44d0-bd4b-ae0e0c577a17.png
  3. once you have created all your shapes, jsut download them as topojson:
05dff3a5-3a0e-4171-99c1-ba3326b9bf2f.png
  1. next, you upload the file in Looker:
29deccbf-e1a6-495c-ad5e-48baa01a99e8.png
  1. you define the map_layer in your model file and tell looker the name of the field where you stored the shape value in your topojson, in our case is is “id”
    d543ea27-1994-467c-b8cc-ac399dc57caa.png
    1. then in my view file wheere I store the lifts id, I just need to tell looker this is where I have a dimension where I store the id to match each shape with a value in each shape:
      8dfd86e8-885c-4b42-957e-7933ad74d2eb.png
    2. then In my explore, I jsut select my lift dimension and choose the map viz to display it on a map!
0 0 557
0 REPLIES 0
Top Labels in this Space
Top Solution Authors