On This Page

Home / Search/ Visualize/ Charts/ Chart Types/Choropleth Map

Choropleth Map ​

Shade each country or state by a numeric value.


Use a Choropleth map to compare a count or total across regions, such as events by country.

Cribl Search also offers a Bubble map for points and a Geographic heatmap for density.

A choropleth map, a bubble map, and a geographic heatmap all need geographic fields in the results.

Use the ip-lookup operator to read geolocation data from MaxMind databases, or use location fields that are already in your data.

Map Chart
Map Chart

A choropleth map needs a region field, such as a country or state name, and a numeric field.

Region ​

Region: Select the field that names each region.

Value: Select the numeric field that sets the shade.

Display ​

Map source: Select World Map or USA Map. World Map is the default.

Select Sequential or Thresholds to set how low and high values are shaded.

Choropleth map example
Choropleth map example

Legend ​

Position: Select Top, Bottom, Left, or Right.

Hide the legend to remove it from the chart.

Tooltip ​

Additional fields: Select extra result fields for the tooltip.

Hide the tooltip to leave it off the chart.

Run Sample Searches ​

These searches show a choropleth by country and a bubble map by city.

Both use a lookup table named geocity, built from the GeoLite2-City database.

Download a MaxMind .mmdb file and install the file as a lookup table before you run the searches. The steps are in ip-lookup.

The first search counts events by country. After the search runs, select Choropleth map in the Type field.

dataset=$vt_dummy event<100
| extend ip=strcat((10 + rand(205)),'.',rand(255),'.',rand(255),'.',rand(255))
| ip-lookup geocity on ip
| summarize count() by country

The second search returns a city, a latitude, a longitude, and a count. After the search runs, select Bubble map in the Type field.

dataset=$vt_dummy event<1000
| extend src=strcat('172.56.',30+rand(20),'.',5+rand(10))
| summarize theCount=count() by src
| ip-lookup geocity on src
| where isnotnull(lat)
| project city, lat,lon, theCount