This article describes how to go from a pictograph using in-built icons...
...to a pictograph using custom icons:
- A .jpg (jpeg) or .png file accessible on the internet without any password restrictions (e.g., a public URL, or a file saved to your Displayr Cloud Drive (recommended), Google Drive, Dropbox, or other cloud hosting). For instructions on creating these images, and what to consider, see How to Create your Own Custom Icon for Pictograph Visualizations.
- If you intend to display proportions (e.g. partly filled icons), you will need two versions of the icon: a filled version of the icon and an unfilled version of the same icon. Both icons need to be exactly the same size (i.e., both image files should be of the same width and height).
For the example above, we created two images:
It's not possible to change or alter the colors of custom icons. You should create and save them using the color schemes you want to use in your report.
- From the toolbar, go to Visualization > Pictographs > (type of pictograph) and then click onto the page to place the visualization. Alternatively, if you have a table already created on your page, select the table, and from the object inspector, go to Visualization > Pictographs > (type of pictograph).
- From the object inspector, go to Inputs > DATA SOURCE > Data source, select the type of input source you will use to create the pictograph. Note: If you are using an existing table as the input, this will default to Table, and you can skip to Step 3.
- If Table or Use an existing R output is selected as the Data source, you can choose an existing table output in the Input data drop-down.
- If Type or paste data is selected, you can type in the numeric value that you wish to use. It must be formatted as a percentage, eg, 65% or .65.
- If Variable - Average is selected, you can use a numeric variable and take its average.
- If Variable - Sum is selected, you can use a numeric variable and take its sum.
- If Variable - Percentage is selected, you can use a categorical or numeric variable. An option will be provided to select a particular category from the variable. If multiple categories are specified as a comma separated list, then percentages of any of the listed categories occur will be given. If a variable from a Pick Any question is used, then category can be left blank. The percentage of times the variable is true (or Selected) is always used for this type of variable. Note that for numeric variables, the values are matched exactly. That is setting category = 1 will ignore observations with values of 1.1, etc. Instead you may want to set category to '1-2'. The range notation can only be used with numeric variables.
- OPTIONAL: If using a table or an R output as the input to your pictograph, you can specify the row and column to use by either:
- Selecting Typing row names or indices from Select rows to show by and enter the row name or index and selecting Typing column names or indices from Select columns to show by and enter the column name or index, or
- You can have the row and column specified dynamically by instead selecting Choosing from Combo Box or List Box Control.
- Click Calculate.
- Go to Format > ICONS > Icon select (Custom icon).
- Under Format > ICONS > Icon URL paste in the public URL for the filled icon.
- Under Format > ICONS > Base icon URL paste in the public URL for the unfilled icon.
As noted in the Requirements, your custom icon image must be stored on the internet without any password restrictions, i.e., a public URL, a shared drive location set to "anyone with the link can view/edit", etc.
Please see How to Import Data via URL for specific details of how to read in URLs from sites such as Google Drive and Dropbox.