-
Notifications
You must be signed in to change notification settings - Fork 0
/
42434-hierarch-in-app.rmd
87 lines (48 loc) · 4.64 KB
/
42434-hierarch-in-app.rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Hierarchical factors in Causal Map{#xhierarchical-coding}
(This section is about implementing hierarchical coding in the Causal Map app. See also the [previous section](#xsimplifying-with-hierarchical) on hierarchical coding in general.)
```{r,echo=F}
knitr::include_url("https://player.vimeo.com/video/683770170")
```
## Creating labels
Factors can optionally be expressed as part of a hierarchy by using semi-colons.
For readability, it is usual to leave a space after the semi-colon, but this makes no difference to the functionality.
## Organising your factors using the Factor Editor
In Causal Map, the process of organising the factors into this kind of hierarchical structure can be conveniently carried out in the [Factor Editor](#xfactor-editor) tab which is a simple text editor where you can edit any labels you have created during coding. It lists the currently visible factor labels, sorted alphabetically.
This editor has many features such as global search and replace, and multiple cursors, which make it easy to rapidly edit many factor labels.
Using this panel you can also combine several factors into one and split one factor into several.
[Here](#xfactor-editor) are a lot more tips for using the Factor Editor.
![image-20220809114233781](_assets/image-20220809114233781.png){width=650}
Here it is easy to “move” an (incorrectly labelled) factor
<u>Health behaviour; understanding of germ theory</u>
to something like
<u>Health knowledge; understanding of germ theory</u>
simply by retyping it: replace "behaviour" with "knowledge".
Or you might want to "move" your factor somewhere else entirely, relabelling it as
<u>Real-world knowledge; health; understanding of germ theory</u>
... without worrying whether the higher-level factor <u>Real-world knowledge</u> even exists elsewhere in your file.
## Additional calculated fields
When you use hierarchies, the app [adds some fields to the factors table](#xcalculated-fields) which help you do searching and filtering with hierarchical ideas.
One such field is `top_level_label` which gives just the top level for each factor.
<!-- example-->
## Additional functionality when creating and editing links
Once you have created at least one hierarchical factor, i.e. one with a “;” in its label, the *influence factor* box and *consequence factor* box have some additional functionality to help you.
- Now, when you start to type, the list of existing factors which you can choose from is extended to include existing factor components, even if they have not (yet) been coded as such. This means it is easier to add new detail to existing or implied higher-level factors.
### Quick tails: quickly adding new "daughters" of an existing "mother"{#xquick-tails}
![image-20211005153410088](_assets/image-20211005153410088.png){width=350}
Suppose you want to create a new factor <u>Health behaviour; wearing a mask</u> and you know there is an existing higher-level factor <u>Health behaviour</u> but there is not yet any factor <u>Health behaviour; wearing a mask</u>.
- You can select <u>Health behaviour</u> from the list and then just add <u>; wearing a mask</u> with a leading semi-colon. These two fragments will be combined into the desired factor label. This is quicker and ensures you don’t end up with different spellings of the higher-level factors.
- This second component can itself have a semi-colon, so you can do this: <u>health behaviour</u> <u>; hand washing; before meals</u>.
- Also you can do this multiple times:
<u>health behaviour</u> <u>; washing hands</u> <u>; washing pots</u> .
This can be useful when you have to code a list of things which are all examples of some higher-level idea.
This example will produce:
<u>health behaviour; washing hands</u>
and
<u>health behaviour; washing pots</u> .
## Additional functionality when searching for and filtering factors
The same principle applies in the Search and Filter Factors box: you can see factors you have already used but also implied higher-level factors (like <u>Health behaviour</u>) and other factor components, beginning with a semi-colon (`;`).
## How can I view just the factors where I have applied hierarchical coding?
Sometimes you only want to use hierarchical coding for a few of your factors. To view just those, you could create a mini map including just the factors which you have hierarchically coded (and one step up or down from them), by searching for `;` in the factor labels, but then zooming the factors out to just see the top level.
![image-20211123171313757](_assets/image-20211123171313757.png)
... which is equivalent to
![image-20211123171257000](_assets/image-20211123171257000.png)