Skip to main content
Completion requirements

3. Calculate People per Household

The next step is to calculate the number of people per household. This results in a normalized value for the choropleth, so we can easily compare municipalities after styling with a color ramp in the next section.

The dataset is still large, so we'll do the calculation without opening the attribute table.

1. In the Attributes toolbar click the Field Calculator button. In this way we don't need to open the huge attribute table.

2. In the Field Calculator dialog Create a new field with PeoplePerHousehold as Output field name. Change the Output field type to Decimal number (real).

3. Create the following expression (double-click the field names in the middle panel under Fields and values to add them to the expression):

 "aantalInwoners"  /  "aantalHuishoudens" 

This means we're going to divide the number of inhabitants of each municipality by the number of households in each municipality.

4. Click OK to perform the calculation and create the new field.

5. Click to toggle off editing (the Field Calculator automatically turned it on for you) and save the changes.

In the next section we'll style the data as a choropleth map.