Maps

Maps plot data as points, regions, or text on a geographic base map. Count uses OpenStreetMap for the base layer.

There are two ways to map data:

  • Points — when each row has its own latitude and longitude.
  • Regions — when each row corresponds to an area (a country, a US state, a UK local authority, a custom polygon, …).

You can see sample data and Map visuals in this canvas.

Creating a map

To add a map to the canvas, either:

  • In the control bar at the bottom of the canvas, open the Visual group, choose Map, then click on the canvas to place it.
  • Press G, then click anywhere on the canvas to place it.

Point template

When each row of your data has a coordinate, use the Point template.

FieldDescriptionExample
LongitudeNumeric measure for east–west position.136.90190270
LatitudeNumeric measure for north–south position.34.992687270
SizeMeasure controlling point size.population
ColorDimension or measure to colour points by.category
OpacityDimension or measure for opacity.weight
DetailExtra fields to surface on hover.name

Region template

When each row of your data corresponds to an area, use the Region template. Region marks have a Source setting that controls where the shape comes from:

  • Official boundaries — Count looks up the shape for you from a built-in dataset (e.g. UK Local Authorities, US Counties). You only need to provide the boundary's name or code.
  • Custom geometry — you provide the shape yourself as a GeoJSON or WKT string in your data.
FieldDescription
RegionThe column identifying the region. For Official boundaries this is a name or code (e.g. California, CA, 06). For Custom geometry this is a GeoJSON or WKT string.
ColorDimension or measure to colour regions by.
OpacityDimension or measure for opacity.
DetailExtra fields to surface on hover.

Official boundaries

Official boundaries let you draw regions on the map without having to ship geometry in your data. Count keeps an up-to-date library of administrative boundaries published by official sources — Natural Earth, the US Census Bureau, Eurostat GISCO, the UK ONS, and more — and resolves them at render time from a name or code in your column.

This is usually what you want when your data already has a familiar identifier like a country name, a US state code, a ZIP code, or a UK local authority code.

Getting started

  1. Add a Geo mark to your map layer.
  2. In the right-hand panel, set Source to Official boundaries.
  3. Pick a Dataset (e.g. Countries, US Counties, UK Local Authorities).
  4. Drag the column that identifies each region onto the Region field.

That's it — Count fetches the matching shapes and draws them. Rows whose value doesn't match any boundary in the dataset are skipped silently, so you can keep working without cleaning the data first.

Matching rules

Count tries to be forgiving about how your identifiers are spelled. Each dataset uses one of two matching modes:

  • Aliases — matches against the boundary's canonical code as well as a curated list of common names and aliases, and is tolerant of differences in case, punctuation, and accents. So Côte d'Ivoire, Cote d'Ivoire, and the ISO code CIV all resolve to the same country.
  • Canonical only — matches against the boundary's official code only. Used for datasets where there is no meaningful "common name" (e.g. census tracts, output areas).

The mode is fixed per dataset — see the table below.

Examples

DatasetValue in your dataMatches
CountriesUnited Kingdom, UK, GBR, GBUnited Kingdom
US StatesCalifornia, CA, 06California
US ZIP Code Tabulation Areas94110ZCTA 94110
UK Local AuthoritiesCamden, E09000007London Borough of Camden
EU NUTS 2Île-de-France, Ile-de-France, FR10Île-de-France
US Census Tracts06073000100Tract 6073000100 (canonical only)

Available datasets

Global

DatasetMatchingSource
CountriesAliasesNatural Earth

United States

All US datasets use the US Census Bureau's TIGER/Line files and key off the GEOID.

DatasetMatchingNotes
StatesAliasesAccepts state name, two-letter postal code, or two-digit FIPS.
CountiesAliasesAccepts county name (e.g. Cook County) or the five-digit FIPS.
County SubdivisionsAliases
PlacesAliasesCities, towns, and CDPs.
Core Based Statistical AreasAliases
Combined Statistical AreasAliases
Congressional DistrictsAliases119th Congress.
ZIP Code Tabulation AreasAliasesUse five-digit ZIPs.
Census TractsCanonical only11-digit GEOID.
Block GroupsCanonical only12-digit GEOID.
Census BlocksCanonical only15-digit GEOID.

Europe

Sourced from Eurostat GISCO.

DatasetMatchingNotes
CountriesAliasesTwo-letter country code (e.g. DE, FR).
NUTS 0 / 1 / 2 / 3AliasesNUTS codes (e.g. FR, FR1, FR10, FR101).
Local Administrative UnitsCanonical onlyGISCO LAU ID.

United Kingdom

UK datasets are sourced from the Office for National Statistics Open Geography, Scottish Government Open Data, and NISRA Open Data.

DatasetMatchingNotes
CountriesAliasesEngland, Scotland, Wales, Northern Ireland.
International Territorial Levels 1 / 2 / 3AliasesITL codes (replacement for NUTS).
Local AuthoritiesAliasesAccepts local-authority name or ONS code.
Westminster Parliamentary ConstituenciesAliases
Electoral Wards and Electoral DivisionsAliases
Output AreasCanonical onlyOA21 codes.
Lower layer Super Output AreasCanonical onlyLSOA21 codes.
Middle layer Super Output AreasCanonical onlyMSOA21 codes.
Data ZonesCanonical onlyScotland.
Intermediate ZonesCanonical onlyScotland.
Small AreasCanonical onlyNorthern Ireland.
Northern Ireland Super Output AreasCanonical only

Custom geometry

If your data already contains polygon definitions — or if you need a boundary that isn't covered by the official datasets — set Source to Custom geometry and drop a column of GeoJSON or WKT onto Region.

POLYGON((-0.13 51.50, -0.13 51.52, -0.10 51.52, -0.10 51.50, -0.13 51.50))
{ "type": "Polygon", "coordinates": [[[-0.13, 51.50], [-0.13, 51.52], [-0.10, 51.52], [-0.10, 51.50], [-0.13, 51.50]]] }