Maps
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 and be consistent within the column.
Region values are not case sensitive. For example, the value for the state of California can be
California
,california
,CA
,Ca
, orca
. However, all values in the column should use the same supported identifier and capitalization for data consistency.
Region type | Supported identifiers |
---|---|
Canadian provinces |
|
Countries |
|
US CBSA/MSA |
|
US counties |
County names must not include the words "County" or "Parish." |
US postal places (cities) |
|
US states |
|
US zip codes |
|
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]))
Updated about 2 months ago