How to prepare your data to build a Allocate Virtual Geography File (VGF)
Because of Allocate's BlockCentroid- based analysis methods, Allocate is capable of supporting custom built geographies exactly like standard geographies. However, VGFs are polygons and they have a different relationship to the dataset than standard geographies. Standard geographies have the numbers "built-in" for each geography but VGFs analyze the BlockCentroids that fall within the boundaries of the polygon and calculate the returned value by that data. It is normal to get two different numbers if one runs the population of a ZIP code against the standard geography versus a VGF of that geography.
Custom geographies can be stand-alone or can be the "children" of another geography (whether standard or custom). Polygon files can be loaded into the VGF format from a TAB, SHP, or MID/MIF polygon files. Two internal fields in the polygon file are required:
-
Name - The label that will appear in the Allocate GUI for that polygon.
-
Key - Every geography has a key. If the VGF is a "child" it's key must be longer than the parents key and begin with the parents key.
In addition to these columns internal to the polygon file there are several fields that Allocate will prompt you to select manually during the build process.
-
Long Name - The label of these geographies. For example, if this polygon file is a collection of Trade Areas that title may be appropriate.
-
Short Name - This is strictly internal and must be unique among all the VGFs and standard geographies used in a Allocate dataset. The shorter the better.
-
Parent Geography - If your custom geography naturally inherits from another geography it's easy to place it "beneath" in the selection hierarchy (counties from states, for example). See the documentation on Keys in the Allocate section for more detailed information.
Allocate has a "Settings" dialog where most information about the data set can be obtained. The bottom dialog box is for VGF management, listed below are the four buttons:
- Info - Info gives general information about the VGF such as the Long and Short names, the parent, and the source file are provided.
- Register - This button is to install a new VGF into the dataset.
- Unregister - Remove an unwanted VGF from the dataset.
- New VGF - Create a new VGF file from a polygon file.
After selecting "New VGF" we are prompted for a polygon file of TAB, SHP, or MID/MIF format, point the browser to the correct file and click "Open". Next select which columns in our polygon file will be used as "Name" and "Key". This table shows the Trade Areas for Intergalactic Widgets, INC.:
|
TradeArea_Key |
TradeArea_Name |
| 1111 |
IW Store #1111 (Sacramento) |
| 1112 |
IW Store #1112 (Las Vegas) |
| 1113 |
IW Store #1113 (Denver) |
| 1114 |
IW Store #1114 (Santa Fe) |
| 1115 |
IW Store #1115 (Miami) |
| 1116 |
IW Store #1116 (Boston) |
| 1117 |
IW Store #1117 (Newark) |
Remember, the Long Name will be the title of the geography in the Allocate hierarchy but the Name column selected here will be title of the individual polygons. The next decision is parenting, where our geography is meant to fit in the TProDA selection tree. We can build this file into a VGF without any alterations since it is so small. However, if we have more than twenty polygons we should give lots of thought to parenting. Since our example polygons exist across the US and each fits within state lines, perhaps they should inherit from the state level. Selection would look like this:
Intergalactic Widgets Trade Areas (VGF Long Name) --> California --> IW Store #1111 (Sacramento)
To make States the parent of IW's Trade Areas we must select States as the Parent in the last dialog. More important is that the TradeArea_Keys must change to reflect the parenting, they must have the Allocate state keys prepended to them. The new file would look like:
| TradeArea_Key |
State_FIPS |
Old_TradeArea_Key |
TradeArea_Name |
| 061111 |
06 |
1111 |
IW Store #1111 (Sacramento) |
| 321112 |
32 |
1112 |
IW Store #1112 (Las Vegas) |
| 081113 |
08 |
1113 |
IW Store #1113 (Denver) |
| 351114 |
35 |
1114 |
IW Store #1114 (Santa Fe) |
| 121115 |
12 |
1115 |
IW Store #1115 (Miami) |
| 251116 |
25 |
1116 |
IW Store #1116 (Boston) |
| 341117 |
34 |
1117 |
IW Store #1117 (Newark) |
However, suppose we had more Trade Areas in the Northeastern part of the United States where states are denser. If we were reporting on Trade Areas that fell into different states we may need to descend the selection tree three or four times to select all the TAs we are reporting on. To avoid these frustrations it's always important to analyze the uses these VGF files will serve and perhaps change the above States to DMA. It's possible that the VGF you want will not cleanly inherit from an existing geography, in this case it is best to define your own "parent". Your polygons parent will most likely be made from merged groups of your current polygons. Use PPCRM or other product to merge your existing stores into three groups or "Sales Areas", for example:
|
SalesArea_Key |
SalesArea_Name |
| 11 |
IW Western Sales Area |
| 12 |
IW Central Sales Area |
| 13 |
IW Eastern Sales Area |
This new polygon file is built into a VGF and installed into Allocate. You will now see your Sales Areas as geographies. Now we must give our Trade Area polygon file the correct keys to inherit from our custom Sales Areas. The table would now resemble:
| TradeArea_Key |
SalesArea_Key |
Old_TradeArea_Key |
TradeArea_Name |
| 111111 |
11 |
1111 |
IW Store #1111 (Sacramento) |
| 111112 |
11 |
1112 |
IW Store #1112 (Las Vegas) |
| 121113 |
12 |
1113 |
IW Store #1113 (Denver) |
| 121114 |
12 |
1114 |
IW Store #1114 (Santa Fe) |
| 131115 |
13 |
1115 |
IW Store #1115 (Miami) |
| 131116 |
13 |
1116 |
IW Store #1116 (Boston) |
| 131117 |
13 |
1117 |
IW Store #1117 (Newark) |
When you build this file you will need to select the Short Name for the Sales Areas VGF from the Parent drop-box. After the Trade Area VGF is installed the selection for IW Store #1111 is:
Intergalactic Widgets Trade Areas (VGF Long Name) --> IW Western SalesArea--> IW Store #1111 (Sacramento)