# Map regions

> Create a CHOROPLETH map — a real-world map where whole geographic AREAS (countries, states, provinces, continents, world regions) are FILLED with color to encode a value or category.

Source: https://mockflow.com/developers/reference/item-types/map-regions

Send `"type": "map_regions"`.

Create a CHOROPLETH map — a real-world map where whole geographic AREAS (countries, states, provinces, continents, world regions) are FILLED with color to encode a value or category.

Also available as the MCP tool `render_mapregions`. The same payload works through either surface.

### Fields

- `title` (string): Short descriptive title (e.g. "Population by Country", "US States by Time Zone")
- `level` (enum<string>): The single geographic level used for every region. "state" has boundary coverage only for USA, India, China, Brazil, Russia, Canada, Australia, Indonesia, South Africa — prefer "country" for other nations. One of `continent`, `region`, `country` or `state`.
- `colorMode` (enum<string>): "gradient" for a value scale (use paletteColor + value), "categorical" for discrete groups (use per-region color). One of `categorical` or `gradient`.
- `paletteColor` (string): For gradient/value maps only: a named color scheme (Blues, Greens, Reds, Oranges, Purples, Greys, YlOrRd, YlGnBu, Viridis, RdBu) or a hex color. Omit for categorical maps.
- `regions` (object[], required): Array of region objects to color
    - `name` (string, required): Region's common English name
  - `iso` (string): ISO code — alpha-3 for country level, ISO 3166-2 for state level; omit for continent/region levels
  - `color` (string): Hex fill color "#RRGGBB" (categorical maps)
  - `value` (number): Underlying metric (gradient maps)
  - `category` (string): Discrete group label (categorical maps)
  - `description` (string): Optional short note (<= 80 chars)
- `legend` (object[]): Key explaining the colors
    - `label` (string)
  - `color` (string): Hex "#RRGGBB"

## Example

```json
{
  "type": "map_regions",
  "data": {
    "title": "Q4 Launch Planning",
    "level": "continent",
    "colorMode": "categorical",
    "paletteColor": "string",
    "regions": [
      {
        "name": "Q4 Launch Planning",
        "iso": "string",
        "color": "string",
        "value": 0,
        "category": "string",
        "description": "string"
      }
    ],
    "legend": [
      {
        "label": "string",
        "color": "string"
      }
    ]
  }
}
```
