 # GENERATE

### Introduction

The Generate tool allows you to create new columns and variables that are the result of combining two other columns by a mathematical function – allowing you to calculate proportions, sums, products or differences.

### Set Up

For this worked example we will calculate the proportion total dwellings that are separate houses for SA2s across Melbourne

To do this:

• Select Greater Melbourne (gccsa_2016/2GMEL) as your area
• Select the following datasets and variables:
DatasetVariables
SA2-G32 Dwelling Structure-Census 2016SA2 Code 2016
SA2 Name 2016
Occupied private dwellings: Separate house, Dwellings
Occupied private Dwellings:Total Occupied private dwellings, Dwellings

Once you have added these datasets, you are ready to use the Generate tool – click the Inputs tab above to see how to do this

### Inputs

We are now ready to generate a new column: in this instance, we will be working out the  proportion of dwellings that are separate houses in Greater Melbourne. This will be equivalent to:

#### Total Occupied Separate (i.e. detached) Houses / Total Occupied Dwellings

To do this click the Tools button in the Analyse panel, click Data Manipulation and then Generate. Enter your parameters as shown in the image below and click the Add and Run button. These parameters are also explained below

###### Generate tool Parameters • Dataset Input: This is the dataset that contains the columns you would like to include in the calculation. In this example we use SA2-G32 Dwelling Structure-Census 2016
• Operand 1: This represents the ‘left hand side’ of the equation. In this instance we will use the Occupied private dwellings Separate house Dwellings column
• OperatorThis represents the mathematical function that you would like to use to create the new column. In this instance, we are creating a proportion, so we will use the divide function ( ‘/’ )
• Other operators include:
• – subtract
• * multiply
• / divide
• == is equal to
• != is not equal to
• < is less than > is greater than
• <= is less than or equal to
• => is greater than or equal to
• Operand 2This represents the ‘right hand side’ of the equation. In this instance we will use the Total private dwellings Dwellings  column
• New Column NameThis will be the new column in the output table. It is important that you only include letters, numbers and underscores (no spaces or other characters!) in this column. Also, it can only start with a letter – no number at the start! We use Prop_House

### Outputs

Once the tool has run, a pop up box will appear asking you to display your results (shown below). Click Display to open the output table. You will see that there has been an entirely new table created (also shown below), which now has an additional column at the end (Prop_House) which represents the mathematical outcome of dividing one of your original columns by another. You should now rename this datasets to something meaningful and easy to recognise  You can now map this output dataset and column as you normally would using the choropleth visualisation function 