generated from rstudio/bookdown-demo
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path10-visualization.Rmd
33 lines (17 loc) · 2.66 KB
/
10-visualization.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
# Visualization {#viz}
## Essential Visualization Principals
1. All visualizations must, at all times, have a title. No visualization should be without a title.
2. Histograms are not bar charts and bar charts are not histograms. Histograms are for continuous variables and bar charts are for categorical variables and discrete variables.
__Useful actionable tip 1:__ By the way, everyone should Google and understand what continuous variable, categorical variables, and discrete variables are. Especially, the last two are very important understand well.
## Writing Visualization Titles
How to write a title for a visualization?
The title of a visualization should be such that when you little sister or brother reads the title he understands the visualization, or what the visualization is trying to represent. For example, for a bar chart the title could be "Bar Chart for Contractor Type". Bad title. But if you say, "The number of counts of the different types of Contractors." your younger brother or sister should be able to understand what the visualization is showing.
The title should not have the variable name which was stored in the dataset. For example instead of saying "Count of ContractorType" it should say "Count of Different Types of Contractors." As can be seen from this example. Title, should describe what is shown rather than simply containing the data variable name which some times are very dense and hard to understand.
## Bar Chart tips
1. Do not use grey to colour the coloumns. It just does not look really well. Better to use company theme, or just blue or some soothing actual colour.
2. In the axis, especially y-axis the numbers should not be displayed as 3e+05. They should be in the format what we call "pretty numbers".
3. In bar charts, the value of the bars should always be displayed either inside or just on top of the bars.
4. If the bar chart has a lot of categories to display such as more than 25 and it is not reasonable to display so many categories of bar in one chart then, choose the top 6 or 10 categories in the variable to be displayed in the bar chart.
5. For the bar charts I would not recommend using light colours. For example, I would not recommend using light blue, but rather simply blue.
6. I would also recommend using high contrast colours. This makes visualizations look very good and appealing, in general (though there are exceptions).
7. The values of the categories of the variable in a bar chart should always be displayed. By default, they should always go above the bars since if the bars do not have enough height the values will not fit in them and if your data is changing, and is not a static report then it is better to be safe.