|
| 1 | +--- |
| 2 | +title: "The value of data visualization and interactivity" |
| 3 | +teaching: 10 |
| 4 | +exercises: 0 |
| 5 | +questions: |
| 6 | +- "Why do we need visual repesentation of data to see patterns?" |
| 7 | +- "How will interacting with data change this understanding?" |
| 8 | +objectives: |
| 9 | +- "To understand the difference between static and interactive figures" |
| 10 | +- "To consider which aspects of your data would work with some user interaction" |
| 11 | +keypoints: |
| 12 | +- "Consider the message you want to convey or story you want to tell. Is it clearer with some interactivity?" |
| 13 | +- "Data types are often best suited to certain certain dimensions (for example timeseries as a continuous x-axis, rather than coloured groups)" |
| 14 | +- "A plot or figure should make sense without needing to use the interactivity" |
| 15 | +- "If a plot changes then titles and labels need to change too, or they will be inaccurate or misleading" |
| 16 | +--- |
| 17 | + |
| 18 | +## Why plot? |
| 19 | +The goal of research is to improve our understanding of the world, but that overall increase in knowledge is small if that understanding doesn't spread. |
| 20 | + |
| 21 | +Humans benefit from visual representation of data to see patterns and plotting data has become an essential part of the researcher's toolbox for communication. |
| 22 | + |
| 23 | +> ## Our reliance on the visual? |
| 24 | +> When was the last time you saw a research paper without figures? |
| 25 | +> |
| 26 | +> When reading research do you start with the figures? |
| 27 | +> |
| 28 | +> How would the recent publications you have studied have made sense if you couldn't see the figures? |
| 29 | +{: .discussion} |
| 30 | + |
| 31 | +## Choices in analysis and presentation |
| 32 | +Producing a figure will often depend on the story you want to tell, or the pattern you wish to highlight in your data. |
| 33 | +You have to decide which variables in your data (group, treatment, location, time, amount)to map to the available visual dimensions (x-y-z position / colour / symbols / etc). |
| 34 | + |
| 35 | +Modern sources of data often present additional problems, those of density and complexity, that require further choices relating to aggregation and ommission. All of these aspects require choices and this can force a certain interpretation on your audience, a limit what you can show. |
| 36 | + |
| 37 | +Interactivity gives the reader/user a chance to explore the data in ways a static (non-interactive) plot does not. It can also help you and your collaborators understand your data better. |
| 38 | + |
| 39 | + |
| 40 | +> ## A wealth of choices for making figures in Python |
| 41 | +> This tutorial makes us of Plotly and Streamlit, but a range of options now exist for visualizing data in the Python ecosystem. |
| 42 | +> |
| 43 | +> These are summariazed at [PyViz.org](https://pyviz.org/tools.html). |
| 44 | +> |
| 45 | +> Many of the tools described are developed with specific users in mind, whereas others are intentionally more basic and adaptable. Some are focused on particular issues, such as choices of colour or the aggregation of data. There is a lot here to explore... |
| 46 | +{: .callout} |
| 47 | + |
| 48 | +### The steps for constructing our interactive data visualization |
| 49 | + 1. Building your environment for analysis and plotting (in a way that can be repeated) |
| 50 | + 2. Data processing and cleaning. |
| 51 | + 3. Separating out variables of interest |
| 52 | + 4. Identifying variables you may want to explore (and how best to map these to visual differences/dimensions). |
| 53 | + 5. Visualizing the central data (choosing your plot types) |
| 54 | + 6. Converting addtional choices in the visualization to widgets. |
| 55 | + 7. Hosting a plot as an app (so it can be seen ad explored) |
| 56 | + |
| 57 | +{% include links.md %} |
0 commit comments