# Tutorial: Visualizing giraffe population using a point map

Amos Njoroge (opens new window), QA Engineer
Published on February 10, 2022 | 9 min read


# Overview

In this tutorial, we are going to use Dots to create an interactive point map. The point map is interactive so a viewer can zoom in and select a specific point to learn more about each point of the map. Using an open data set from the Kenya Wildlife Service (KWS) on the 2020 Giraffe Population Distribution in Kenya (opens new window), we are going to show how to visualize this data on a point map.

# Requirements

To follow along, you will need the following:

  1. Download the dataset from the Open Africa website (opens new window).

    You can download the dataset directly: download CSV file (opens new window)

  2. Next, log in to the Dots app (opens new window). If you don't have an account, you can sign up (opens new window) for a trial account.

# Dataset

The dataset from the Kenya Wildlife Service is in .csv format. The dataset contains giraffe population count in 2020 across 25 locations in Kenya. Each record contains the following properties:

  • Location
  • Species
  • Latitude
  • Longitude
  • Population

Using the information found in the dataset, we will be able to create a visual representation of the 2020 giraffe population in Kenya.

Here is a preview of the dataset:

Location Species Latitude Longitude Population
Tsavo Maasai 2.9947 38.4613 4,068
Amboseli Maasai -2.652687 37.260565 3,470
Namanga and Magadi Maasai -2.5520935 36.7838976 1,577
Maasai Mara Maasai -1.371912 34.9381095 2,607
Nairobi National Park Maasai -1.336004 36.780429 112
Maanzoni-Malinda and Mwalimu Ranches Maasai -1.506005 37.096764 47
Athi-Kapiti and Machakos Ranches Maasai -1.5176837 37.2634146 303
Naivasha-Nakuru Maasai -0.7171778 36.4310251 529
Shimba Hills Maasai -4.2572222 39.3855891 4
Ruma National Park Rothschild -0.6460521 34.2754988 275
Ruko Community Conservancy Rothschild 0.642077 36.123435 8
Soysambu Wildlife Conservancy Rothschild 0.544821 36.391131 159
Kigio Wildlife Conservancy Rothschild -0.5674233 36.3933582 34
Lake Nakuru National Park Rothschild -0.356166 36.100211 74
Mwea National Reserve Rothschild -0.8233975 37.6173695 51
Mt. Elgon National Park Rothschild 1.0404213 34.7926776 2
Rimoi National Reserve Rothschild 0.654761 35.577409 6
Mandera Reticulated 3.9356389 41.8551162 130
Marsabit Reticulated 2.3354966 37.9943453 342
Wajir Reticulated 1.7488388 40.058633 3,797
Laikipia - Samburu (includes Isiolo) Reticulated 0.3606063 36.7819505 4,019
Meru Reticulated 0.089514 38.190048 876
Nyeri (Aberdare Country Club) Reticulated -0.3254762 36.9302866 30
Garissa (South) Reticulated -0.4532293 39.6460988 4,356
Lamu Reticulated -2.2695575 40.9006408 1,974

# Importing data

Before you can create a map, we will need to import the data into Dots. To import the table, log in to your Dots account (create an account (opens new window) if you don't have one yet). Then go to Data and click Import table and select your import method. For more detailed steps, read on how to Import a table (opens new window).

Once your table is successfully imported, you can preview the data and confirm the data is formatted correctly.

What are Data Types?

Each column of data in your data table will have a defined data type such as a text, number, or location. This can help you understand how each column can be used when creating map layers.

# Creating a map layer

To create a map, you will start by creating a map layer that can be used to overlay on a map. The map layer will be created using the dataset you import into Dots.

Given the dataset has latitude and longitude coordinates, we will create a point map layer. Here are the steps to create a map layer:

# Step 1

After the dataset is imported, view your datasets by clicking on the Data menu. Select the data table you want to use for your map layer and click on the Add Layer button.


# Step 2

The map layer creation will prompt you to give the map layer a name and select the Layer Type you want to create. We'll create a map layer by filling out the fields as:

  • Layer name: Giraffe population distribution
  • Select the Point map layer type
  • Click on the Continue button

# Step 3

The Location step helps to determine the location data that will be used to display your data on a map. The field options available are the column names that contain location data.

In this step, we'll do the following:

  • On the Latitude dropdown select the Latitude column value
  • On the Longitude dropdown select the Longitude column value
  • Click on the Continue button

# Step 4

The Tooltip step is to help you tell the map layer what information is displayed for each data point on the map.

In this step, we'll do the following:

  • On the Details dropdown, select the Location, Species and Population column names.
  • Click on the Continue button

# Step 5

The Summary step is the final step in the layer creation process. It provides a summary of the actions you selected in the map layer creation.

Once you have reviewed your selections, click on the Save button to create the map layer.


Once the map layer is created, you will be redirected to the list of datasets you've imported and by selecting the data table, you will see the newly created map layer on the left panel. When a map layer is created, its visibility on a map is set to active by default, which allows the layer to be viewable in the interactive map. To view the map, click on the Maps menu on the top navigation.


# Administrative boundaries map settings

To help give your map additional context, you can configure your map to load with specific country administrative boundaries. As part of Dots, we provide country administrative boundaries available to each workspace where you can select from administrative levels 0 to 4 (where applicable).

After selecting your administrative boundaries, you can also configure the map's placement and zoom level so that you can set the specific point the map should display when it's loaded.

More detailed steps can be found in the Dots Help Center under the section,Set country administrative levels (opens new window).

For our example, we will configure the map using the following settings:

  • Country: Kenya
  • Admin Level: ADM 1
  • Zoom Level: 5

# Viewing your point map layer

With your map layer created and your map configured, you are now ready to view your map! To view your map,

  1. Click on the Maps menu in the navigation where you will see an interactive map that will navigate to the location of the map you selected with the selected zoom level.
  2. On the left panel, click on the display drawer icon to expand the list of map layers available for viewing.
  1. Click on the table name to see all its map layers and select the map layer that you want to display. You can select multiple map layers including the configured country administrative boundaries, which can be found under the Country labels. In our example, expand the table that contains the Giraffe population distribution layer and select the checkbox to display the map layer.
  1. Click on any of the data points to display the tooltip where you can see more detailed information about that specific point such as the species and population count.

# Summary

In this tutorial, we have learned how to:

  1. Import datasets
  2. Create map layers
  3. Add contextual layers like administrative boundaries
  4. Set map placement and zoom levels

With the creation of a point map layer, we can visually see the distribution of the giraffe population in Kenya. By adding contextual layers like country administrative boundaries, we can see where these data points are in. Finally, by configuring your map with a specific placement and zoom level, you can make it easy to share with others to see and explore the map you created.

To create and explore your own interactive map, sign up (opens new window) for a Dots account.

To learn more about Dots, visit our Help Center (opens new window).