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:
http://gmapsplugin.net/shapes/countries/countries.csv
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.
- Open Excel
- From inside of Excel, Click Open
- Set the file type to “ALL Files�
- Open the DBF file (Get an example results from a DBF file for Countries.shp)
- 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.
- Paste the single column of data into a new file. This will be your Data Keys file.
- Modify your date to match your business data.
IMPORTANT NOTE: When pasting your Data Keys, DO NOT delete or re-order the data. The index (data ordering) is very important.