How to draw polygon data in looker from json column

I have a BigQuery table with polygons data:

| id (int)  | polygon_shape (string)     |
+-----------+----------------------------+
| 1 | {"type": "Polygon", "coordinates": [[[-11.6422, 36.6872], [-11.642038, 36.68726], [-11.64215117, 36.6872864]]]} |
| 2 | {"type": "Polygon", "coordinates": [[[-12.6432, 35.6852], [-12.642038, 35.68826], [-12.64215117, 35.6872860]]]} |

And I want to draw this polygon on a map in looker or may be be able to create some kind aggregation based on polygon (I have a working connection and able to create views and models for other tables).

I am trying to understand how can I access this info.

What is the right way to define a dimension for this kind of data? Should I extract the "coordinates" key to a different json field? May be just convert "polygon_shape" column to a json type? Or GeoJson (ST_ASGEOJSON)?

Feeling a bit confused and would really appreciate any help.

0 0 401
0 REPLIES 0
Top Labels in this Space
Top Solution Authors