community
cancel
Showing results for 
Search instead for 
Did you mean: 

Location Data Knowledge Base

Data methodologies, and Release schedules.

Create Custom Demographic Variables in Allocate

Alteryx
Alteryx
Created on

Do you pull in demographic variables from the Allocate toolset and then use a formula tool for some basic math functions on those variables? Summing them together for example? Instead of having to pull these variables and process them in a formula tool in each of your workflows, you can create custom variables for your use that already have these basic mathematic functions so all you will have to do is select that variable in the Allocate tools.

 

To do this you will have to set up your custom variable in one of Alteryx’s older software platform’s that is still installed with the designer. The Allocate platform is what you will use and most of its functionality has been adopted into the Designer.

 

The easiest way to find the Allocate program is to search “Allocate” in your start menu’s search bar:

 

1.png

 

In Allocate, you will want to make sure your Workspace is set to the correct database for the variables you want to have access to in order to create your custom variable. If you do not have any dataset available, you can download and install the 2010 Census data for free here - http://downloads.alteryx.com/data.html.

 

Capture.JPG

 

Once your desired dataset is selected, you will then go to the Variables tab click file and select Add Virtual Variable.


Capture.JPG

 

The next window that pops up will be the Create Formula window. This is where you can make your variable selection and mathematic function to be performed on the selected variables.  This example is going to be using just a basic addition function to get the sum of two variables, but you can see all of the options available to you under the Operators and Functions tabs of the Create Formula window.

 

Capture.JPG

 

For this example I am just going to add Total Female population to Total Male population. Those variables can be found under the Population folder and then in the US Census (2010) folder. Once you have selected the variables and created your mathematic function your expression should look like the following: [P0120026]+[P0120002]. [P0120026] is the variable name for Total Female population and [P0120002] is the variable name for Total Male population. Once your function is complete you can click Next.

 

Capture.JPG

 

The Variable Properties window will be the next thing you see and here is where you can start the naming of your custom variable. The Name text box is where you can populate the variable name that you will see when your variable is output from either Allocate or tools in the Designer. Description is where you can put information on how the custom variable was calculated; by default it will bring your function over from the previous window. Keep in mind that this is also the naming convention you will see when looking at the variable tree structure in Allocate or the Designer. Based on your function you can also choose the type of unit you would like your variable to be displayed.

 

Capture.JPG

 

Lastly on this menu you will have to choose a save location. This is also not required, but if you do opt to save a variable, a Virtual Variable File (.vvf) will be added permanently and may be shared amongst other users. In the Save Variables box, Click the New button and choose a name for your .vvf (file name and internal). The file name will be the one you would look for to send to someone else, or to remove. The internal name should be recognizable so that you can add additional variables to this file if you want to. You can then hit OK to save and Next on the Variable Properties window.

 

Capture.JPG

 

The next window you will see is the Variable Hierarchy and this is where you choose where your variable will reside in the tree hierarchy of existing variables. For my example I have created a New Category called CustomVariables, within that new category I made a New Vintage of CustomVariablesQ1 2016, and within that new vintage I created a new Subcategory of CustomPopulationVariables. The custom variable that you are created will be loaded into the new Caterogy/Vintage/Subcategory that you have highlighted when you click Finish.

 

Capture.JPG

 

Once finished, you now have your new custom variable available for use in Allocate and the Designer!

 

Capture.JPG

Attachments
Comments

I don't think this is possible since the demographic analysis tools use data at a block group level, but I have been trying to get a final answer to this question: Can you create a custom variable (in the way you described above) such that you can get a population count of individuals that fit into multiple categories? For example, I know I can get a count of individuals that are aged 18 - 24 and I can get a count of individuals that have household income $100k+, but can I get a count of individuals that are both aged 18 - 24 AND have household income $100k+?

Alteryx
Alteryx

@andrew_mcginnis No unfortunately you cannot do that as those two variables are just counts for a specific block group.

Labels