layers – Regions – Basics – Data Keys URL

Data Keys URL

In addition to a Shapefile, a data keys file is required to define each region name inside of the Shapefile. The file format is a CSV file which CMaps Analytics uses to match business data with Shapefiles.

The Data Keys URL must be a server accessed via HTTP(s), and support cross-origin resource sharing (contact your server admin for more info).

Example data keys URL / file:

data keys

How Data Keys Work

When defining a custom Shapefile as a layer type, you will use your business data control the color and visibility of each region.  To do this, the CMaps Analytics view needs to map business data to the regions drawn on the map. The DBF file will contain the meta data (definitions) that identify each region in your shpefile. The Data Keys file will map your business data to the shapefile.

For example, though the Shapefile’s DBF file has “United States of America”, your data warehouse or enterprise app may supply “United States”. Ultimately the goal is to ensure that your business data can drive your visualization. The Data Keys file provides the mapping so when your business data feeds “United States,” CMaps Analytics view can feed the data to the correct country.

Where to Find Data Keys: DBF Files

If you want to use your own Shapefiles with CMaps Analytics, you will need to define Data keys alongside your Shapefile.

The following instructions will illustrate how to extract the unique country names within an existing Shapefile, so those values can be utilized as Shapefile keys.

  1. Open Excel
  2. From inside of Excel, Click Open
  3. Set the file type to “ALL Files�
  4. Open the DBF file (Get an example results from a DBF file for Countries.shp)
  5. Copy 1 (one) column of data from the file that you will use as unique identifiers (Data Keys). Many times the filed will be an “ID� or “Name� which will identify each shape within the shape file.
  6. Paste the single column of data into a new file. This will be your Data Keys file.
  7. Modify your date to match your business data.
    data keys

IMPORTANT NOTE: When pasting your Data Keys, DO NOT delete or re-order the data. The index (data ordering) is very important.