How to color differentiate cities in a user-defined region on a map from all other cities

August 8 2024

You can define various regions of a country so that the map can be filtered to specific areas defined to include a number of states in the Midwest United States, for example.

First, create a group.

Hold down Control or Command and select the desired states for the group, and then click Group > Name the Group > OK.

Once you create the group, you may edit the group if you want to make changes, such as adding or removing states. Click the drop down arrow on the "group pill" > Edit Group

I encountered a glitch while naming the group, and so you may have to right click the pill, select Edit Group, and rename the group again, as the naming didn’t take the first time.

Rename the Field Name to Part of Country:

We can now add Part of Country as a field and we see the states we grouped as the Midwest "labeled" as such in a listing of states, for example:

We can also use the dimension ("pill") Part of Country as a filter - to filter out cities of the Midwest (the states we defined as the Midwest) - by dragging it onto the Filters shelf:

Select the "Midwest":

As a result, the map displays cities only in the states we defined in the Midwest group:

We can color differentiate cities in the Midwest vs all other cities by grouping the latter as "Other." We do this by editing the group again and check off "Include 'Other.'"

We then drag the Part of Country dimension "pill" onto the Color card:

The result is a map with the cities in the Midwest shown in one color and cities in all other states in another color. Note this is achieved without having to group these other cities outside the Midwest group.

Author:
Alex Briody
124 E 14th Street, Floor 4, New York, NY 10003
Subscribe
to our Newsletter
Get the lastest news about The Information Lab and data industry
Subscribe now
© 2025 The Information Lab