Difference between revisions of "Data Visualization"
SpookySimon (talk | contribs) (adding heading) |
SpookySimon (talk | contribs) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 31: | Line 31: | ||
===Size=== | ===Size=== | ||
| − | |||
==Other== | ==Other== | ||
* shape | * shape | ||
| Line 50: | Line 49: | ||
** Use trendline sparingly, only when r2 or slope is point of the graph | ** Use trendline sparingly, only when r2 or slope is point of the graph | ||
--> | --> | ||
| + | |||
| + | =Tables= | ||
| + | [[File:Color in tables.png|right|middle|thumb|Color in Tables]] Tables are ubiquitous when dealing with data. Often they are dense and very difficult to parse unless the reader is familiar with the format or contents. When presenting data in tables, restrict the quantity of information and highlight the key take-away or data point. Often other forms of data visualization can be more compelling, and easier to understand. Tables are often used to quickly compare options such as choosing between products or design options. | ||
| + | |||
| + | When using a table to convey information, it is recommended to color code the information to enable the reader to see the trend or comparison intended by the information. As described above, color is already associated with meaning so even crude coloration can dramatically improve the presentation. For a good example of a table with no color and lots of data, see the wiki table for [[Fuel#Comparison_of_Line_Types|comparison of fuel line types]]. | ||
| + | {{clear}} | ||
| + | =Distributions= | ||
| + | * Histograms | ||
| + | * Box and Whisker Plot | ||
| + | * Kernel Density Estimate | ||
| + | * Violin Plot | ||
| + | =CAE and CFD= | ||
| + | CAE and CFD are great ways to show information about a design. It is important to include what the pretty colors mean. Because they are so compelling, simulation results can easily lead a team to commit to a decision that is not in their best interest. | ||
| + | =Other= | ||
| + | Qualitative data can be difficult to show on a graph. Often data that drives things like packaging, form factors, and routing are visual. These can be shown with an image of the 3D model. | ||
| + | |||
| + | Many data acquisistion systems will export GPS coordinates or a .KML file that can be used to show location data. This can be used to plot the drive cycle as a map and vehicle data can be plotted in color to visualize how the vehicle behaves at each point on the track. | ||
| + | =Visualization Programs= | ||
==Excel== | ==Excel== | ||
* Easiest to input raw data | * Easiest to input raw data | ||
| Line 67: | Line 84: | ||
* Slightly harder to import data than excel | * Slightly harder to import data than excel | ||
* The standard plotting in Matlab is very familiar to most judges | * The standard plotting in Matlab is very familiar to most judges | ||
| + | ==Python== | ||
| + | There are a large number of great plotting tools in python, the fundamental of which is matplotlib. | ||
| + | * pandas | ||
| + | * seaborn | ||
| + | * plotly | ||
==R== | ==R== | ||
R is a free program used for statistical analysis and can be a great tool. It has a very steep learning curve and is likely more time than it is worth for extracting, processing, and visualizing the kinds of data most teams will be working with. The plotting functions can be extremely powerful and customizable but require the relatively large upfront investment of learning the language. If someone on the team already knows R, there's a good chance they'll know how to make a plot readable. | R is a free program used for statistical analysis and can be a great tool. It has a very steep learning curve and is likely more time than it is worth for extracting, processing, and visualizing the kinds of data most teams will be working with. The plotting functions can be extremely powerful and customizable but require the relatively large upfront investment of learning the language. If someone on the team already knows R, there's a good chance they'll know how to make a plot readable. | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
[[Category:Data Acquisition]] | [[Category:Data Acquisition]] | ||
[[Category:References]] | [[Category:References]] | ||
Latest revision as of 15:23, 11 January 2023
Contents
Basic Points
A good visualization will show the reader what would be difficult to convey in words. This requires the visual be easy to understand, and demonstrate an obvious conclusion to avoid ambiguity. Care must be taken to the medium that the visual is in as physical copies are subject to a variety of factors that cannot be seen on a screen. Physical, printed copies must be designed in accordance with the printer, the size, and the light conditions it should be read in. Print journals are notorious for their use of small, greyscale visuals. For an ironic example, see the copy of The End of the Rainbow? Color Schemes for Improved Data Graphics shown in low resolution black and white at the AGU online library [1]
Graphs
Graphs are the most common form of data visualization. Despite their ubiquity, often graphs fall short of their ability to convey information. The way the graphs are constructed can be as important as the data they are displaying. Graphs can fail in a number of ways: being cluttered, being vague, being complex, being imperceptible, etc.
Common Concerns
Cluttering a graph is often a symptom of not putting enough work into the visualization rather than too much. Default graphing programs will often add superfluous elements. One of the most common and egregious elements in this vein are grid lines. Grid lines should never be added to a chart by default, only if needed, and when added, often with more moderation than a default program will do so. When the purpose of a graph is to demonstrate a relationship between two data sets, and the specific number values are not important, gridlines get in the way of comprehension. Tick marks and color differentiation should be more than enough in most cases to elucidate the point. On the image showing the impact of gridlines, the graph is used to show the relationship of efficiency score to lap time: the highest scoring two cars are faster than average, and the lowest scoring are slower than average. The exact lap times, and the value differences between them are not important to convey this point. It is important to note that the fastest cars are not the most efficient, and that the third most efficient car is in the slowest quartile. This should lead to a conversation about which data to include as relevant, and how to show this discrimination on a graph.
- A paper dedicated to gridline usage published on the blog Perceptual Edge by Stephen Few can be found here
Another chart element that often ends up being confusing is a legend. It takes up room that the actual data could occupy and forces the reader to stop looking at the information itself while trying to understand it, which dramatically impedes comprehension. Instead, it is recommended to use direct labels on the data. There are times and places that a legend is necessary, but similar to gridlines, it should be a when it becomes helpful, not because it is easy or already generated.
Resources for further reading:
- Explanation of accessibility and legibility concerns by Ann Emery can be read here
- Tutorial by Stephanie Evergreen on Excel implementation found on her website
- Explanation of concept and tutorial by Steve Wexler can be found here
Trend lines are less frequently abused than grid lines or legends, but can clutter the graph just as significantly. Trend lines are used when the graph is being used to convey a pattern or trend, or when it being used to forecast.
Further reading:
Additional accessibility gains can be found with characteristics of the plot most notably color and size.
Color
Color is the best way to differentiate between data sets. Not only are we hardwired to pick out color differences before any other differentiator, but we also have built-in associations with colors themselves that allows for us to tell a more complete story in less time and with less effort (eg red is hot, blue is cold).
There has been more written about color by people way smarter than me than I could hope to summarize here, so I will just lay out some of the best resources:
- http://www.kennethmoreland.com/color-maps/ColorMapsExpanded.pdf
- https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html
Size
Other
- shape
- big arrow or circled
Tables
Tables are ubiquitous when dealing with data. Often they are dense and very difficult to parse unless the reader is familiar with the format or contents. When presenting data in tables, restrict the quantity of information and highlight the key take-away or data point. Often other forms of data visualization can be more compelling, and easier to understand. Tables are often used to quickly compare options such as choosing between products or design options.
When using a table to convey information, it is recommended to color code the information to enable the reader to see the trend or comparison intended by the information. As described above, color is already associated with meaning so even crude coloration can dramatically improve the presentation. For a good example of a table with no color and lots of data, see the wiki table for comparison of fuel line types.
Distributions
- Histograms
- Box and Whisker Plot
- Kernel Density Estimate
- Violin Plot
CAE and CFD
CAE and CFD are great ways to show information about a design. It is important to include what the pretty colors mean. Because they are so compelling, simulation results can easily lead a team to commit to a decision that is not in their best interest.
Other
Qualitative data can be difficult to show on a graph. Often data that drives things like packaging, form factors, and routing are visual. These can be shown with an image of the 3D model.
Many data acquisistion systems will export GPS coordinates or a .KML file that can be used to show location data. This can be used to plot the drive cycle as a map and vehicle data can be plotted in color to visualize how the vehicle behaves at each point on the track.
Visualization Programs
Excel
- Easiest to input raw data
- Extremely easy to make it not look like dookie
- Excel likes to make text grey, fine on computer, bad in print
- Default blue can be hard to read in print, also kinda ugly color
- Not good at showing 3d data, forget 4d
- Can be done with some creativity or plug ins
- Google Sheets not as powerful, can look fancier
First steps
- Get rid of grid lines
- Set axes properly
- (Recommended) Change color from default blue to black
Matlab
Matlab is hugely useful for processing the data (although importing it can be tricky depending on the quantity and type of data you have collected, and your patience in optimizing your code) so it makes sense to plot the data in the same program. The native Matlab graphing functions are easily tuned to provide a clean, readable, and easily understood graph. Matlab is very useful for visualizing 3D data in many ways.
- Requires some programming experience
- Slightly harder to import data than excel
- The standard plotting in Matlab is very familiar to most judges
Python
There are a large number of great plotting tools in python, the fundamental of which is matplotlib.
- pandas
- seaborn
- plotly
R
R is a free program used for statistical analysis and can be a great tool. It has a very steep learning curve and is likely more time than it is worth for extracting, processing, and visualizing the kinds of data most teams will be working with. The plotting functions can be extremely powerful and customizable but require the relatively large upfront investment of learning the language. If someone on the team already knows R, there's a good chance they'll know how to make a plot readable.
- ↑ Light, A., Bartlein, P.: The end of the rainbow? Color schemes for improved data graphics. EOS, Transactions, American Geophysical Union 85 (2004) 385, 391.
A color correct version may be viewed at the EOS archive here: https://eos.org/features/the-end-of-the-rainbow-color-schemes-for-improved-data-graphics