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")

    πŸ“˜

    To ensure Sigma correctly interprets the county values, check that the data meets the following criteria:

    • The words "County" and "Parish" are omitted from the county name.
    • The county name and state name are separated by a comma followed by a space.
  • 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.

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\]))