How to create a Filled Map?
What is a Filled Map?
Filled Maps are maps that have polygon shapes defined by the geographical borders (i.e. country’s border, state’s border), and each shape will contain a different color based on the value it carries.
Follow the example below to learn how to set up a Filled map.
- For demonstration purposes, we will try to visualize the number of COVID-19 cases in the US by states. We will use real data from The New York Times’ article.
- How to download sample data: Visit The New York Times’ Github and download the ZIP file.
* Import data from the file
us-states.csv into Holistics. For more information, see How to import data. * Our sample data will look like this in tabular format:
Creating a Filled Map
To create a Filled Map, select the filled map icon from the visualizations pane.
In the Viz settings, drag and drop your location field into Location.
Your location data should be in the form of full-text country names, abbreviations, or zip code. For more information, see Supported location formats.
If you click on Get results, you will see that all the locations are colored light yellow by default.
If you want to change the global color or set another color to each location, go to Styles, select your location field, click on the square colored box beside each location to change it.
Depending on what you do next, you will be able to generate two different types of maps:
- If you put a value into Value field, you’ll generate a choropleth map.
- If you put a dimension into Legend field, you’ll generate a distribution map.
Choropleth Map (Beta)
Choropleth Maps are Filled maps but the regions are colored based on a numerical value, most typically ratio data like per-capita income or population density.
To generate a Choropleth Map, you need to input your location data into the Location field, then a value into the Value field. Then click Get results.
By default, Holistics will auto-detect the min and max value and set the color scale as blue.
If you want to change the color scale (make it smooth, change min-max values, change the number of steps), navigate to Styles, select Color formatting, and configure here.
Color formatting options
Set color by…: Select a field to color your map. After you have selected a field, the following options will appear.
- Style: Choose Smooth to generate a color gradient for both the map and the scale. Choosing Steps to explicitly divide the color scale into color blocks, each of which will contain a range of values. For example, if our data ranges from 0-100, and we set 5 steps, there will be 5 corresponding blocks of color: 0-20, 20-40…
Min - Mid - Max: by default, these fields’ values will be set to Auto. However, you can select from the drop-down list to the left of the input field to change to Number or Percent. Then, you can type your own data and the changes will be applied immediately to the color scale in Style.
- Note: If your input data is out of range, Holistics will display all location in gray color. Example: Your dataset value range is 100-1000 (green-red). In the min value, you input 10000 (which is even greater than the real max value). This is an invalid case, so Holistics will display all locations in gray.
- However, if you input mid value = 10000, and set color to blue, Holistics will consider mid value as a new max value. Now the color scale will be green-blue.
- Color Formatting Tip: If the map smooth style makes it difficult for business users to pinpoint trends, consider choosing Steps style and reduce the number of Steps.
Distribution Map (Coming soon)
Distribution Maps are Filled maps but the regions are colored based on a string value, most typically a subject such as an animal, religion or political parties.
Improving map precision
Sometimes, Holistics will not recognize one or more of the location names in your data.
When this happens we will display a small notice modal on the lower right of the preview window. Clicking on this will help you understand which location names we failed to recognize.
This may happen if there is a location or abbreviation that Holistics does not recognize, mostly because of typos, wrong formats, or the fact that such location exists in 2 different places (i.e. “Paris” is both the city of France and the city of Texas, USA)
To improve the map precision, see How to improve map precision in Holistics.