Hierarchical data structure is ideal for creating a nested, multi-level project for complex surveys.
Sometimes, you might want to collect data about both groups and individuals that belong to those groups. For example, you could need to gather data about individual healthcare workers at different hospitals, but also need information about their practice groups (such as size, specialty, or average level of education) as well as the hospitals themselves (such as where they’re located or their sources of funding).
This is called hierarchical data collection, and with Dharma, you’ll gather this data with a hierarchical project. These projects are divided into levels, descending from the largest entity about which you are collecting data to the smallest.
In this example, we'll be building a form titled Household Survey, where the first level will be households and the second level will be individuals within a household. (You can also build a hierarchy of more than 2 levels.)
Setting the Proper Parameters for Hierarchical Data Collection
To make sure our form is properly built for hierarchical data collection, there are a few changes we need to make to the project parameters. Beginning from the Project Home, we’ll click Settings >> Parameters to arrive at the parameter settings page.
Click on Hierarchical and a warning message pops up. After reading the message, click on PROCEED.
We can then see two tiered lines displayed, representing the different levels of hierarchy.
The first, or top, level will automatically contain the project name (Household Survey). However, you can also edit the name by selecting the pencil icon.
The second level will serve as the smaller unit that fits within the first level. We’ll write Individuals for the second level. Then we’ll select the check icon to confirm and select Save.
If we select the + icon, we can continue adding additional levels (up to 8 levels) to the hierarchical structure.
Once you have specified a hierarchical structure, you can make additional changes in the parameters to track your data over time. We’ll do so in this example by enabling the toggle button for Track Data Over Time.
Next, we can select how often we would like to collect data: daily, weekly, or monthly.
However, in this form we'll keep it simply hierarchical and leave it with the following parameters, so we'll disable the toggle button for Track Data Over Time. Note that Dharma does not currently support hierarchical data collection for longitudinal projects.
Building a Hierarchical Form
Once we've set the proper parameters for a hierarchical form, we can move onto Form Builder and get started.
Let's create a category called Household Information and add our first question asking, "What is the address of this place of residence?"
Now let’s add two more questions. Again, these are questions about the whole household - not questions specific to the individual people who live there. (Those will come in a moment.)
Once we're done adding questions at the household level, we can click the Form Toggle icon to the left. A small box will appear listing all of the hierarchical levels that were previously created in the Parameters section. We're currently on the Household level, but we’ll select Individuals to add questions for each person who lives in the household.
Let's create a category called Individual Demographics for basic information regarding each individual that lives in a specific household.
Once we are done, we can Save Form and Push to Mobile.
You can also read the article titled Mobile Data Collection: Hierarchical to see how to collect data for a hierarchical form.
Did this answer your question?