# Create map layers
Map layers are visualizations that are made from data tables that are imported into Dots.
# Supported map layers
Dots currently supports the follow map layers that can be visualized on a map.
- Point: If you have GPS coordinates, you can place these points on a map layer.
- Choropleth: If you have location information such as the administrative boundary names, you can map them to official admin boundaries Data service.
- Polygon: If you have a series of GPS coordinates, you can create a polygon layer.
- Bubble: If you have GPS coordinates and would like to weight each point based on a given value from your data you can use the bubble map.
- Heat (coming soon): If you have GPS coordinates and would like to weight each point based on a given value from your data you can use the heat map.
# Creating a map layer
Now that you have imported a data table, you are ready to create a map layer. To create a map layer, select a data table and click on the Add new layer
button at the bottom of the Layers
panel.
Next, the process will walk you through the following steps to:
- Select a map layer that you want to create.
- Select a location column from the data table that will set location points or areas of your map layer.
- Select a value column will determine the data you would like to visualize and help to color the map layer.
- Select columns to display in a tooltip. When viewing the map layer, the columns you select will display when you hover over any data points on your map layer.
# Location
The location step of the map layer is the most important yet complex step in the process to create a map layer. This step will define what column(s) of data are used to position your data points on the map.
Based on which map layer was selected, the location step will prompted you to select column of data that contains the location information used to visualize data on the map. Using the location column, Dots will place markers on the map layer.
# Point, bubble, and heat maps
When selecting point maps
, bubble maps
, or heat maps
, the map layer will use latitude
and longitude
or a single column consisting of GPS coordinates
to place data on a map layer.
Latitude and Longitude
When using latitude
and longitude
, select the column of data for each. Both latitude
and longitude
must be expressed in decimal degrees (opens new window).
GPS Coordinates
When using GPS coordinates
, the latitude
and longitude
values should be space separated
. The format for GPS coordinates
can look like:
[latitude] [longitude] [altitude] [accuracy]
If you are using a mobile data collection tool such as KoBoToolbox, it will automatically capture and save GPS coordinates in the appropriate format. In many instances GPS coordinates
come with additional information such as altitude
or accuracy
since it follows ISO 6709 (opens new window). For the purposes of creating the map layer in Dots, these fields will be ignored.
Capturing GPS Coordinates
For more information on capturing GPS coordinates
with mobile data collection tools, read more on the geopoint question type (opens new window).
# Polygon maps
For Polygon maps
, Dots uses the polygon
or multipolygon
type in .geojson
format to define a polygon on a map layer. According to RFC document (opens new window), a polygon should be an array of GPS coordinates
with each separated by a semi-colon.
The following is an example of how the column of data should be formatted and appear in a spreadsheet. For polygons, you will notice that the first and last GPS coordinates
are the same denoting when the lines of a polygon are closed.
35 10; 45 45; 15 40; 10 20; 35 10
To learn more about the GeoJSON format
The .geojson
format is used to visualize map layers, see this blog post (opens new window) for an introduction into GeoJSON. Here is a snippet of .geojson
for point and polygon maps.
Point map
{ "type": "MultiPoint",
"coordinates": [
[10, 40], [40, 30], [20, 20], [30, 10]
]
}
Polygon map
{ "type": "MultiPolygon",
"coordinates": [
[
[[30, 20], [45, 40], [10, 40], [30, 20]]
],
[
[[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]
]
]
}
# Choropleth maps
For Choropleth maps
, Dots will use available administrative boundary data to determine location that the map layer will use. In the location step, you are provided with the left source
and right source
. For the left source
, select the country and administrative boundary that you want use. Next, under the left field
, you can select the column that you would like to match to your data table in order to link your data with the location data. For the right source
, this is your data table that you selected to create a map layer from. The right field
is used to match the column of data in your data table with the one provided under the left field
.
Preparing your data
Creating choropleth maps requires you to prepare your data tables with a column of data that can be matched with a country administrative boundary found in Dots. See Country Administrative Bouundaries (opens new window) for a complete list supported by Dots. In the repository, click on the Data
folder and search by the 3-digit ISO 3166 code. Once you find your country of interest, select the country folder and click one of the available administrative boundaries (e.g. ADM0-ADM4). When you navigate to the administrative boundary of interest, click on the file ending in .geojson
.
EXAMPLE: Exploring available country administrative boundaries
For example, Afghanistan's Administrative Boundary Level 1 can be found here (opens new window) and navigating through the file path as such: /data/AFG/ADM1/AFG-ADM1.geojson
.
# Value
The value step helps you apply a value or weight to each data point or area that is visualized in the map layer.
For Bubble maps and Heat maps, the value
column you select will determine size of the data point shown on the map layer.
For Choropleth maps, the value
column will be used to style the map layer using a color gradient with darker areas associated to a larger value and lighter areas with a smaller value.
EXAMPLE: Choropleth map with values
This example examines the average income level by district in Yemen. The use of color gradients in styling the Choropleth map shows that the dark green areas represent a larger income value compared to the light green areas that have a smaller income value.
# Tooltip
Tooltips in Dots are used to display key information when viewing a specific data point or area on a map layer. When a user is viewing a map layer and finds a data point or area that is of interest, they can click on the data point or area to have the tooltip display more related information. By default, the tooltip will display source of data for the location and value columns.
The tooltip step is used to select columns of data that you want to be displayed in a tooltip description. By selecting the columns of data to include in the tooltip, it can provide your map viewers with more detailed information about each data point or area.
EXAMPLE: Tooltip description
This example depicts a tooltip description with the default location (b_location/gps
) and value (c_registration/hh_age
) alongside two additional fields: household age (c_registration/hh_age
) and region (b_location/region
).