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 in the Region property. Column values must match one of the following region types:

📘

Region values are not case sensitive. For example, the value for the state of California can be California, california, CA, Ca, ca, etc.

Region typeSupported identifiers
Canadian provinces
  • Name (e.g., Ontario, Alberta, British Columbia)
  • Abbreviation (e.g., ON, AB, BC)
Countries
  • Name (e.g., United States, United States of America, Australia, United Kingdom)
  • Initialism (e.g., U.S.A., AUS, U.K.)
  • ISO 3166-1 alpha-2 code (e.g., US, AU, GB)
  • ISO 3166-1 alpha-3 code (e.g.,USA, AUS, GBR)
  • ISO 3166-1 numeric-3 code (e.g., 840, 826, 036)
US CBSA/MSA
  • CBSA/MSA code (e.g., San Francisco-Oakland-Hayward, CA, New York-Newark-Jersey City, NY-NJ-PA, Denver-Aurora-Lakewood, CO)
US counties
  • County name, state name (e.g., Alameda, California, Kings, New York, Denver, Colorado)
  • FIPS code (e.g., 06001, 36047, 08031)

County names must not include the words "County" or "Parish."

US postal places
(cities)
  • City name, state abbreviation (e.g., Oakland, CA, Brooklyn, NY, Denver, CO)
US states
  • Name (e.g., California, New York, Colorado)
  • Abbreviation (e.g., CA, NY, CO)
US zip codes
  • Zip code (e.g., 94601, 11226, 80219)

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.

Examples

For example, given the following GeoJSON data:

{ "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 prepend the "geometry" key.

This example invokes Snowflake's "object_construct" function to perform this:

CallVariant("object_construct", "geometry", Json([Column with GeoJSON text]))