You can create a Venn diagram with up to 5 potentially overlapping sets. A Venn diagram illustrates relationships between and among two or more variables using intersecting circles. The diagram is intuitive to interpret but struggles with complicated data sets.
It is important to note that Venn diagrams can only perfectly depict the intersection of three or fewer variables. Any more and the diagram becomes an approximation.
This article describes how to create a Venn Diagram like the one below from a set of at least two binary variables.
At least two variables with data stored in a binary format (1's and 0's).
- Go to Create > Charts > Visualization > Exotic > Venn.
- Under Inputs > DATA SOURCE > Variables in 'Data' select the variables or variable set you want to use for the visualization.
- OPTIONAL: Under Chart, you can make additional modifications, such as adjust the color palette and font.
The input data can come in the following forms:
- Binary indicator variables (Variables or a Question/Variable set) where the variables indicate which cases are included in which sets.
- Table or pasted data of binary indicators (zero or one) with the cases along the rows and sets along the columns.
- R Output that contains nested lists indicating the various set overlaps, as shown in the example below.
- Data label font size The font size of the labels drawn within the circles.
- Show as percentages Computes percentages when the data is provided as binary variables.
- Number Type How the numbers appear when the user hovers their mouse over them (Automatic, Percentages, Number).
- Decimal places. The maximum number of decimal places to show.
- Minimizes sum of squared residuals to find the best overlap. Where no diagram appears, it is likely that there is a problem with the inputs.
- If resizing a Venn diagram, it is necessary to press the Calculate button to have it redraw.
- It is important to note that Venn diagrams can only perfectly depict the intersection of three or fewer variables. Any more and the diagram becomes an approximation.
The Venn diagram is computed using the R package d3vennR by Kenton Russell, which is in turn based on R d3.js by Ben Frederickson.