There's really no "standard," I assume, but how do you deal with null values when plotting data? An example of what I'm talking about is listed below: enter image description here

Suppose I'm plotting data on number of toys by color. Nearly half of these toys in my database have null values for color. Do you guys include the toys with null values in your visualization? How do you address that issue? Saying "nearly half of the toys didn't have colors listed" doesn't really add much to the conversation.

  • $\begingroup$ Why do you ask "What is the standard" and then start your question with the assumption that there's really no "standard"? $\endgroup$
    – Spacedman
    Jan 6, 2016 at 12:17
  • $\begingroup$ Saying "nearly half of the toys didn't have colors listed" doesn't really add much to the conversation. It adds an enormous amount to the conversation in my opinion and would be a statement I would expect to be made in the document (if not in a note on the figure itself!) if the nulls were dropped out. $\endgroup$ Jan 7, 2016 at 0:41

1 Answer 1


Imo, It depends on two major factors:

  • What is the purpose of the plot
  • Does the null value indicate incompleteness (one of the values, but unknown which one), or does it indicate a last final option, (like: multiple colors)

Imagine if the purpose of the plot is to compare which toy colors are most popular to a particular person/group.

If null indicates multi-colored toys, it may be important to include the data but rename it to something more meaningful. (Multi-colored)

If null indicates that we just don't know the color data for those toys, it would probably be best to exclude that data from the plot. However, with such a large percentage, it would be good to note that "x%" were excluded from your plot because they had no color information associated with them. Perhaps purple is in such a majority because this person/group really likes purple, or maybe its because purple toys almost never made it into the null category for whatever reason.

The same line of thinking should be applied to whatever the purpose of the plot is. If the null values are relevant to the purpose, include them. If not, don't - and maybe take a note of how much data is excluded if it could influence the results substantially (such as this case)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.