In DataPicta, you can create choropleth maps to visualize data aggregated by geographic regions. A choropleth map uses different shades or colors to represent the values of a variable across predefined areas, such as countries, states, or counties. In this tutorial, we will create a choropleth map to visualize the unemployment rates across different states in the United States.
The data
The data looks like this:
| State | Unemployment Rate |
|---|---|
| South Dakota | 1.9 |
| North Dakota | 2.5 |
| Vermont | 2.5 |
| ... | ... |
You can download the data as a CSV file from here: unemployment-rates-2025.csv.
Import the data
- Open DataPicta and start with a blank canvas.
- Click on the plus icon next to 'Data'.
- Upload the CSV file you downloaded earlier.
- Click on 'Add data' to import the data into DataPicta.
- You should now see the data in the data table.
Load the geographic map
- Click on the plus icon next to 'Data'.
- Click on 'Add geo data'.
- In the dialog that appears select the preset 'countries' and then search for 'United States'
Multiple maps will appear in the search results. Choose a map that looks like the 'United States' and is small in size. A map that is small in size will load faster and the details are still sufficient.
- Click on the map preview to add it to your canvas.
Remove Hawaii and Alaska
For this choropleth map, we will only focus on the contiguous United States, so we will remove Hawaii and Alaska from the map.
- Open the geographic data panel.
- Search for 'Hawaii' in the search bar.
- Click on the trash icon next to 'Hawaii' to remove it from the map.
- Repeat the same steps for 'Alaska'.
Remove the state names
When you add a geographic data to DataPicta, it also automatically adds a map canvas with some default settings. We dont need the state names for this choropleth map, so we will remove them.
- Click on the map canvas to open it.
- Click on the 'checkbox' for 'label' to disable the labels.
Currently, you can zoom in and out of the map using the mouse wheel and drag the map using the mouse. If you want to disable this functionality, you can do so by setting 'Roaming' to 'None' in the map canvas settings.
Create the Choropleth
- Click on the plus icon next to 'Picta'.
- Choose 'Choropleth' from the list of available Pictas.
The choropleth Picta will be added to your canvas, using the first column of your data to match the geographic regions (states) and the second column to determine the color shading based on the unemployment rates. So the order of the columns in your data is important. If you are using the provided CSV file, the order is already correct. If not you can can change the order of the columns in the data table by clicking on the 'Order fields' button.
Currently, nothing is changed on the map because we need to configure the choropleth Picta with a 'Visual Axis'.
- Click on the plus icon next to 'Canvas'.
- Choose 'Visual axis' from the list of available canvas elements.
A new panel will open, allowing you to configure the visual axis. If you would look in the data table you would see that the lowest unemployment rate is 1.9% (South Dakota) and the highest unemployment rate is 6% (District of Columbia). We will use these two numbers to set the minimum and maximum values for the visual axis.
- Set the 'min' value to 1.9 and the 'max' value to 6.
Interactive legend
Lets customize the legend for the visual axis to make it more informative.
- In the visual axis panel, set 'Mapping type' to 'Segmented'.
This will divide the legend into discrete segments. Now hover over the legend to see the unemployment rate range for each color segment.
We can position the legend on the map canvas.
- Set 'Vertical location' to 'Bottom'.
- Set 'Horizontal location' to 'Center'.
- Set 'Orientation' to 'Horizontal'.
Enable tooltips for the states
By default, geographic maps in DataPicta show the region name when hovering over a region (in this case states). Try it, hover over the map. We can add a tooltip to show the unemployment rate for each state.
- Click the plus icon next to 'Canvas'.
- Choose 'Tooltip' from the list of available canvas elements.
- In the tooltip panel, set the 'Formatter' to:
item.data[0] || '<br />' || 'Unemployment rate: ' || '<strong>' || item.data[1] || '</strong>'
Let's break down this formatter:
item.data[0]retrieves the name of the state.'<br />'adds a line break.'Unemployment rate: 'is a static text label.'<strong>' || item.data[1] || '%</strong>'retrieves the unemployment rate and wraps it in<strong>tags to make it bold.
Add a link to the data source
To give credit to the data source, we can add a title and a subtitle that is a link to the source.
- Click the plus icon next to 'Canvas'.
- Choose 'Title' from the list of available canvas elements.
- In the title panel, set the 'Title' to 'Unemployment Rates by State (2025)'.
- Set the 'Subtitle' to 'Source: U.S. Bureau of Labor Statistics'.
- Set the 'link' to 'https://www.bls.gov/'.
