diff --git a/05.uncertainity/2016.jpg b/05.uncertainity/2016.jpg new file mode 100644 index 0000000..050b25a Binary files /dev/null and b/05.uncertainity/2016.jpg differ diff --git a/05.uncertainity/2d-bars.png b/05.uncertainity/2d-bars.png new file mode 100644 index 0000000..b164953 Binary files /dev/null and b/05.uncertainity/2d-bars.png differ diff --git a/05.uncertainity/altair-errorband.png b/05.uncertainity/altair-errorband.png new file mode 100644 index 0000000..90ca24c Binary files /dev/null and b/05.uncertainity/altair-errorband.png differ diff --git a/05.uncertainity/biden-trump.webp b/05.uncertainity/biden-trump.webp new file mode 100644 index 0000000..f3d198c Binary files /dev/null and b/05.uncertainity/biden-trump.webp differ diff --git a/05.uncertainity/ci-2.png b/05.uncertainity/ci-2.png new file mode 100644 index 0000000..d190fbb Binary files /dev/null and b/05.uncertainity/ci-2.png differ diff --git a/05.uncertainity/ci-3.png b/05.uncertainity/ci-3.png new file mode 100644 index 0000000..14dc42b Binary files /dev/null and b/05.uncertainity/ci-3.png differ diff --git a/05.uncertainity/climate1.png b/05.uncertainity/climate1.png new file mode 100644 index 0000000..6858ed7 Binary files /dev/null and b/05.uncertainity/climate1.png differ diff --git a/05.uncertainity/climate2.png b/05.uncertainity/climate2.png new file mode 100644 index 0000000..5f7fe3c Binary files /dev/null and b/05.uncertainity/climate2.png differ diff --git a/05.uncertainity/clinton-trump.jpg b/05.uncertainity/clinton-trump.jpg new file mode 100644 index 0000000..eee387d Binary files /dev/null and b/05.uncertainity/clinton-trump.jpg differ diff --git a/05.uncertainity/clock.mov b/05.uncertainity/clock.mov new file mode 100644 index 0000000..2f7f22a Binary files /dev/null and b/05.uncertainity/clock.mov differ diff --git a/05.uncertainity/clock.png b/05.uncertainity/clock.png new file mode 100644 index 0000000..9b27a58 Binary files /dev/null and b/05.uncertainity/clock.png differ diff --git a/05.uncertainity/data-ci.png b/05.uncertainity/data-ci.png new file mode 100644 index 0000000..ebd4f50 Binary files /dev/null and b/05.uncertainity/data-ci.png differ diff --git a/05.uncertainity/election-prediction.png b/05.uncertainity/election-prediction.png new file mode 100644 index 0000000..c42588b Binary files /dev/null and b/05.uncertainity/election-prediction.png differ diff --git a/05.uncertainity/election-quantile.png b/05.uncertainity/election-quantile.png new file mode 100644 index 0000000..dd7ff1a Binary files /dev/null and b/05.uncertainity/election-quantile.png differ diff --git a/05.uncertainity/hurricane1.png b/05.uncertainity/hurricane1.png new file mode 100644 index 0000000..d84a7b2 Binary files /dev/null and b/05.uncertainity/hurricane1.png differ diff --git a/05.uncertainity/hurricane2.png b/05.uncertainity/hurricane2.png new file mode 100644 index 0000000..2dfc6fb Binary files /dev/null and b/05.uncertainity/hurricane2.png differ diff --git a/05.uncertainity/map-uncertainity.png b/05.uncertainity/map-uncertainity.png new file mode 100644 index 0000000..ad6e858 Binary files /dev/null and b/05.uncertainity/map-uncertainity.png differ diff --git a/05.uncertainity/matplotlib.png b/05.uncertainity/matplotlib.png new file mode 100644 index 0000000..c088930 Binary files /dev/null and b/05.uncertainity/matplotlib.png differ diff --git a/05.uncertainity/multiple-outcomes.webp b/05.uncertainity/multiple-outcomes.webp new file mode 100644 index 0000000..964eabd Binary files /dev/null and b/05.uncertainity/multiple-outcomes.webp differ diff --git a/05.uncertainity/multiple-reg.png b/05.uncertainity/multiple-reg.png new file mode 100644 index 0000000..bc94044 Binary files /dev/null and b/05.uncertainity/multiple-reg.png differ diff --git a/05.uncertainity/probability-waffle.png b/05.uncertainity/probability-waffle.png new file mode 100644 index 0000000..c7be62d Binary files /dev/null and b/05.uncertainity/probability-waffle.png differ diff --git a/05.uncertainity/sketchy.gif b/05.uncertainity/sketchy.gif new file mode 100644 index 0000000..538e15f Binary files /dev/null and b/05.uncertainity/sketchy.gif differ diff --git a/05.uncertainity/slides.html b/05.uncertainity/slides.html new file mode 100644 index 0000000..95a39a6 --- /dev/null +++ b/05.uncertainity/slides.html @@ -0,0 +1,175 @@ +
+

Visualizing Uncertainty

+

CAPP 30239

+
+
+
+
+

What causes uncertainty?

+
    +
  1. measurement error - An instrument used has some non-perfect degree of accuracy. In a survey, this could be a poorly-worded question.
  2. +
  3. model uncertainty - Models make assumptions and simplifications, different assumptions lead to different outcomes.
  4. +
  5. sampling variability - Differences between sample & population.
  6. +
  7. missing data - How missing data is accounted for & represented.
  8. +
+

The result is that we have a range or distribution, where we want a number to use with one of our channels (Hue, X, Y, etc.).

+
+
+

Challenges of Uncertainty

+

Often left out, in part due to being hard to understand, and even harder to visualize.

+

Omission however misleads audiences, especially where a lot of significant figures are included.

+

+

Global Population Uncertainty: ±160 million people (2%)

+
+
+

Challenges of Uncertainty

+

Uncertainty estimates are simplified, often out of necessity.

+

+

30% chance of rain: "A 30% chance that at least 0.01" of rain will fall somewhere within a given area over a 12 hour period."

+

Do I bring an umbrella?

+
+
+

Challenges of Uncertainty

+

Complexity of visualization can overwhelm audience, obscure other meaning.

+

+

From a data-ink ratio perspective, it is understandable why if the error bars do not seem relevant to a narrative, that they would be omitted.

+
+
+

Including Uncertainty

+

If omitting uncertainty misleads, it violates our prime directive of graphical integrity.

+

The job then, is to find ways that are audience appropriate & don't obfuscate the meaning.

+

The difficulty will be in resolving this tension.

+
+
+

Common Techniques

+
    +
  • Uncertainty as Probability
  • +
  • Error Bars
  • +
  • Confidence Bands
  • +
+
+
+

Uncertainty As Probability

+

+

Random waffle chart: works for cases with discrete outcomes.

+
+
+

Uncertainty As Probability

+

In practice, we often care about more than boolean outcome.
+

+
+
+
+
+

Uncertainty of Point Estimates

+

These work when we're focused on uncertainty around a particular outcome.

+

Sometimes we need to show uncertainty around discrete measurements, or projections.

+
+
+

Error Bars

+

+
+
+

Error Bands

+
line = alt.Chart(source).mark_line().encode(
+    x='Year',
+    y='mean(Miles_per_Gallon)'
+)
+
+band = alt.Chart(source).mark_errorband(extent='ci').encode(
+    x='Year',
+    y=alt.Y('Miles_per_Gallon').title('Miles/Gallon'),
+)
+
+band + line
+
+
+
+

Issues with Error Bars & Confidence Bands

+
    +
  1. There is no pre-defined meaning of these intervals.
    +If error bars or bands are included, the legend must include information on the meaning.
  2. +
  3. Error bars are common in scientific & academic literature, other audiences cannot be assumed to understand them.
  4. +
  5. Restricted to 1D/2D dots. If variable being expressed is mapped to color, area, etc. then alternative presentations needed.
  6. +
+
+
+
+

Variations on Error Bars & Intervals

+

+
+
+
+

+
+
+

Regression Uncertainty

+

+
+
+

Regression Uncertainty

+

+
+
+

Other Approaches

+
+
+

Showing Multiple Futures

+

+
+
+

+
+
+

Hurricane Uncertainity

+
+
+

+
+
+

+
+
+
+
+

On Maps

+
+
+

"Sketchiness"

+

+
+
+

Animating Uncertainty

+ +
+
+

References & Acknowledgements

+ +
+

What is this trying to show? +source: https://www.ipcc.ch/report/ar6/wg1/figures/chapter-3/figure-3-4/

These are showing essentially the same thing, one shows individual models and the other uses some aggregates with confidence intervals. +These are from the same page of the IPCC report.

We can convert this to discrete measurements: quantile dot plot.

source: fivethirtyeight

when appropriate, can also be used to show multiple intervals

care should be taken that distribution is indeed normal if curves/etc. chosen

source: https://tamucoa.b-cdn.net/app/uploads/2021/10/House2011TrackUncertaintyVisualization.pdf

source: https://www.e-education.psu.edu/geog486/sites/www.e-education.psu.edu.geog486/files/Lesson_07/Images/ex_vs_ont.PNG

\ No newline at end of file diff --git a/05.uncertainity/slides.md b/05.uncertainity/slides.md new file mode 100644 index 0000000..cf27a05 --- /dev/null +++ b/05.uncertainity/slides.md @@ -0,0 +1,253 @@ +# Visualizing Uncertainty + +## CAPP 30239 + +--- + +![bg fit](climate1.png) + + + +--- + +![bg fit](climate2.png) + + + +--- + +## What causes uncertainty? + +1) **measurement error** - An instrument used has some non-perfect degree of accuracy. In a survey, this could be a poorly-worded question. +2) **model uncertainty** - Models make assumptions and simplifications, different assumptions lead to different outcomes. +3) **sampling variability** - Differences between sample & population. +4) **missing data** - How missing data is accounted for & represented. + +The result is that we have a range or distribution, where we want a number to use with one of our channels (Hue, X, Y, etc.). + +--- + +## Challenges of Uncertainty + +Often left out, in part due to being hard to understand, and even harder to visualize. + +Omission however misleads audiences, especially where a lot of significant figures are included. + +![width:100%](clock.png) + +*Global Population Uncertainty: ±160 million people (2%)* + +--- + +## Challenges of Uncertainty + +Uncertainty estimates are simplified, often out of necessity. + +![](weather.png) + +30% chance of rain: "A 30% chance that at least 0.01" of rain will fall somewhere within a given area over a 12 hour period." + +**Do I bring an umbrella?** + +--- + +## Challenges of Uncertainty + +Complexity of visualization can overwhelm audience, obscure other meaning. + +![](matplotlib.png) + +From a data-ink ratio perspective, it is understandable why if the error bars do not seem relevant to a narrative, that they would be omitted. + +--- + +## Including Uncertainty + +If omitting uncertainty misleads, it violates our prime directive of **graphical integrity**. + +The job then, is to find ways that are **audience appropriate** & **don't obfuscate the meaning**. + +The difficulty will be in resolving this tension. + +--- + +## Common Techniques + +- Uncertainty as Probability +- Error Bars +- Confidence Bands + +--- + +## Uncertainty As Probability + + +![width:100%](probability-waffle.png) + +Random waffle chart: works for cases with discrete outcomes. + +--- + +## Uncertainty As Probability + +In practice, we often care about more than boolean outcome. +![](election-prediction.png) + +--- + +![bg fit](election-quantile.png) + + + + +--- + +![bg fit](biden-trump.webp) + + + +--- + +## Uncertainty of Point Estimates + +These work when we're focused on uncertainty around a particular outcome. + +Sometimes we need to show uncertainty around discrete measurements, or projections. + +--- + +### Error Bars + +![](data-ci.png) + +--- + +### Error Bands + +![bg left](altair-errorband.png) + +```python +line = alt.Chart(source).mark_line().encode( + x='Year', + y='mean(Miles_per_Gallon)' +) + +band = alt.Chart(source).mark_errorband(extent='ci').encode( + x='Year', + y=alt.Y('Miles_per_Gallon').title('Miles/Gallon'), +) + +band + line +``` + +--- + +### Issues with Error Bars & Confidence Bands + +1) There is no pre-defined meaning of these intervals. + **If error bars or bands are included, the legend must include information on the meaning.** +2) Error bars are common in scientific & academic literature, other audiences cannot be assumed to understand them. +3) Restricted to 1D/2D dots. If variable being expressed is mapped to color, area, etc. then alternative presentations needed. + +--- + +![bg fit](2016.jpg) + +--- + +### Variations on Error Bars & Intervals + +![](ci-2.png) + + + +--- + +![bg fit](ci-3.png) + + + +--- + +![](2d-bars.png) + +--- + +### Regression Uncertainty + +![width:900px](multiple-reg.png) + +--- + +### Regression Uncertainty + +![width:900px](translucent-band.png) + +--- + +## Other Approaches + +--- +### Showing Multiple Futures + +![](multiple-outcomes.webp) + +--- + +![width:900px](climate1.png) + +--- + +### Hurricane Uncertainity + +
+
+ +![width:450](hurricane2.png) + +
+
+ +![width:450px](hurricane1.png) + +
+
+ + + +--- +### On Maps + +![bg fit](map-uncertainity.png) + + + +--- +### "Sketchiness" + +![](sketchy.gif) + +--- +### Animating Uncertainty + +- + +- HOP Plot: + +--- +## References & Acknowledgements + +- +- +- +- diff --git a/05.uncertainity/translucent-band.png b/05.uncertainity/translucent-band.png new file mode 100644 index 0000000..49411cd Binary files /dev/null and b/05.uncertainity/translucent-band.png differ diff --git a/05.uncertainity/weather.png b/05.uncertainity/weather.png new file mode 100644 index 0000000..f79397f Binary files /dev/null and b/05.uncertainity/weather.png differ