Contents

Plot a map
Map types
      Map - Region
      Map - Point (Lat/Long)
      Map - Geography
Related resources

Plot a map 

Maps are visualizations and can be created via the PAGE ELEMENTS section of your workbook's editor panel or directly from an existing data element

Visualized data will not display on the page canvas until all required plot fields are defined.

Add columns to open fields using either the field's + menu or dragging and dropping the column.

Map types

Workbooks support three distinct map types: Region, Point and Geography.

You should choose your map type based on your available data and the results you wish to see. For example, if you want to map a text column [State] with cell values like "Colorado" and "California", you should choose a Region map type.

Map - Region

Region maps require a single text column on the map's REGION field. Rows in this column should match one of the following region types:

  • Countries(e.g. China, Kenya, US, ZA, GBR, 076)
    We support 193 countries recognized by the United Nations. They may be represented as:
    • Administrative/formal names (“United States of America”)
    • Names (“United States”)
    • Opinionated acronyms (“U.S.A.”)
    • ISO 3166-1 Alpha-2 (“US”)
    • ISO 3166-1 Alpha-3 (“USA”)
    • ISO 3166-1 N3 (“840”)
  • US States (Name)(e.g. Colorado, California, Massachusetts, Oklahoma)
  • US States (Shortcode)(e.g. CO, CA, MA, OK)
  • US Counties (Name, State) (e.g. "Alemeda, California")
    Note: The words "County" or "Parish" must be omitted from the county name.
  • US Counties (FIPS code) — (e.g. 09001, 56045)
  • US Zip Codes — (e.g. 94105, 06905)
  • CA Provinces (Name) —(e.g. Ontario, Alberta, British Columbia)
  • CA Provinces (Shortcode) — (e.g. BC, AB, SK)

Map - Point

Point maps require a number column on both the map's LATITUDE and LONGITUDE fields.

Map - Geography

WKT and JSON formats allow the storage of more complex geographical data than simple numeric lat/long columns.

Sigma's Map - Geography visualization requires a geography or variant data column on the map's Geography field. If your WKT or GeoJSON data is stored as a text column (abc), you can convert it using the Geography or Variant function.

GeoJSON data must also have "coordinates" nested within a "geometry" key in order to be plotted. In GeoJSON and our Geography type, the coordinate order is always longitude, latitude.

Example:

{ "geometry": {"coordinates": [-94.042964, 33.019219] } } 

Below is a non-working example, even though it is valid GeoJSON, as it lacks the "geometry" key:

{
    "coordinates": [
        [30, 10], [10, 30], [40, 40]
    ]
}
This is a working example:
{
  "geometry": {
    "coordinates": [
      [30, 10], [10, 30], [40, 40]
    ]
  }
}
If your GeoJSON is structured like the non-working example, you can use Sigma's CallVariant passthrough function to be able to prepend the "geometry" key.
This example invokes Snowflake's "object_construct" function to perform this:
CallVariant("object_construct", "geometry", Json([Column with GeoJSON text]))

Related resources

 

 


Was this page helpful?
Yes No