To select a static map (regions) chart, click the ellipses (…) on the Visualization menu bar and select Static Map (Regions).
This page describes the options for editing static map (regions) charts in the visualization menu. This menu can be accessed by clicking the gear menu in the upper right corner of the visualization tab.
Static map (regions) charts are useful for plotting data regionally. To plot individual points, use static map (points) or the interactive map charts.
Static map (regions) charts plot a single dimension and a single measure:
- If you are using the Austin, New York City, San Francisco, or custom map based on zip codes, you’ll need to use a dimension of
type: zipcode
. - If you are using the United States map, you’ll need to use a dimension of
type: string
that contains the names of US states. If you are using the World map, or a custom map based on countries, you’ll need to use a dimension of
type: string
that contains either ISO 3166-1 alpha-3 three-letter country codes or ISO 3166-1 alpha-2 two-letter country codes.If your data uses two-letter country codes, to ensure that Looker recognizes your data as country codes and does not incorrectly interpret them as state codes, ensure that your Looker developer includes the
map_layer_name
parameter in the definition for your country dimension. For example:dimension: country { type: string map_layer_name: countries sql: ${TABLE}.country ;; }
Map Menu Options
Please note that some of the options listed below may be grayed out or hidden in situations where they would conflict with other settings you have chosen.
Map
Map enables you to choose the map that you want to use to display data. The following options are available:
- Austin, Texas (ZIP Codes): Use data grouped by Austin zip codes (for region or point maps) or lat/long locations (for point maps only)
- New York City (ZIP Codes): Use data grouped by NYC zip codes (for region or point maps) or lat/long locations (for point maps only)
- San Francisco Peninsula (ZIP Codes): Use data grouped by San Francisco peninsula zip codes (for region or point maps) or lat/long locations (for point maps only)
- United Kingdom (Postcode Areas): Use data grouped by UK postal codes (for region or point maps) or lat/long locations (for point maps only)
- United States: Use data grouped by US states (for region maps only), zip codes (for point maps only), or lat/long locations (for point maps only)
- World: Use data grouped by country (for region maps only) or lat/long locations (for point maps only)
- Custom: Enables you to define your own map using TopoJSON
You can also use the Map field’s Auto option if your Looker developer has set a map_layer
parameter for the model. If you see a message that the map_layer
isn’t set, choose one of the other Map options to display the chart.
TopoJSON URL
For map charts set to Map Custom, TopoJSON URL sets the location of a TopoJSON file that defines your map boundaries.
TopoJSON Object Key
For map charts set to Map Custom, TopoJSON Object Key selects which map from the TopoJSON file to plot, since TopoJSON can support multiple maps in a single file. Set this parameter to one of the map names defined in the file.
TopoJSON Property Key
For map charts set to Map Custom, TopoJSON Property Key selects which property from the TopoJSON file to plot against. TopoJSON can support arbitrary metadata for each region. If there's a particular metadata property you want to plot against, specify it here. By default, the first matching property is used.
TopoJSON Property Label Key
For map charts set to Map Custom, TopoJSON Property Label Key selects which property from the TopoJSON file to display in the tooltip label. TopoJSON can support arbitrary metadata for each region. If there's a particular metadata property you want to appear in the tooltip, specify it here. By default, the value of TopoJSON Property Key is used.
Projection
For map charts set to Map Custom, Projection enables you to choose which D3 projection will be used to render your map. Examples of the many options are shown on this Github page.
Style Menu Options
Colors
Colors defines the colors that will be used to indicate the magnitude of each map region.
This parameter takes a comma-separated list of one or more color values. The color values can be formatted as RGB hex strings, such as #2ca6cd
, or as CSS color names, such as mediumblue
.
If you like, you can define every valid color that Looker is allowed to use to indicate magnitude. To do so, make sure you turn on Quantize Colors. You can also allow Looker to interpolate shades of colors between those that you define. For this behavior, make sure you turn off Quantize Colors.
Quantize Colors
Quantize Colors determines whether the colors of a map regions chart will be shaded according to the magnitude of each region (turned off), or if only the specific colors you specify in Colors will be used (turned on).
Empty Region Color
Empty Region Color sets the color of any region on the chart which does not show up in the underlying data.
This parameter takes a single color value. The color value can be formatted as a RGB hex string, such as #2ca6cd
, or as a CSS named color string, such as mediumblue
.
Outer Border Color
Outer Border Color sets the color of the overall map border.
This parameter takes a single color value. The color value can be formatted as a RGB hex string, such as #2ca6cd
, or as a CSS named color string, such as mediumblue
.
Inner Border Color
Inner Border Color sets the border color of each map region.
This parameter takes a single color value. The color value can be formatted as a RGB hex string, such as #2ca6cd
, or as a CSS named color string, such as mediumblue
.
Outer Border Width
Outer Border Width sets the width of the overall map border, specified as a number of pixels.
Inner Border Width
Inner Border Width sets the border width of each map region, specified as a number of pixels.
Show Full Field Name in Tooltips
Show Full Field Name in Tooltips toggles whether to show the view name along with the field name when you hover over a map region.