Difference between revisions of "Visualizing process data"
Jump to navigation
Jump to search
Kevin Dunn (talk | contribs) |
Kevin Dunn (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 16: | Line 16: | ||
** [[Media:Viz-quiz-02.pdf|Quiz 2]] and [[Media:Viz-quiz-02-solution.pdf|Solution 2]] | ** [[Media:Viz-quiz-02.pdf|Quiz 2]] and [[Media:Viz-quiz-02-solution.pdf|Solution 2]] | ||
** [https://docs.google.com/document/d/1rZXJY7aybeng7H_ZngzHDsbBxn-uipvRPF6r9JdH-9g Quiz 3] and [https://docs.google.com/document/d/1ew6UwKP8SBM19jvdYfMxgSnRVIvUNuwnOSNlJoZ3Tg4 Solution 3] | ** [https://docs.google.com/document/d/1rZXJY7aybeng7H_ZngzHDsbBxn-uipvRPF6r9JdH-9g Quiz 3] and [https://docs.google.com/document/d/1ew6UwKP8SBM19jvdYfMxgSnRVIvUNuwnOSNlJoZ3Tg4 Solution 3] | ||
* Complete steps 1, 2 ... 9 of the [[Software_tutorial software tutorial]] | * Complete steps 1, 2 ... 9 of the [[Software_tutorial| software tutorial]] | ||
== Extended readings == | == Extended readings == | ||
Line 60: | Line 60: | ||
[http://www.r-fiddle.org/#/fiddle?id=19PyJkpa&version=1 Run this code in a web-browser] | [http://www.r-fiddle.org/#/fiddle?id=19PyJkpa&version=1 Run this code in a web-browser] | ||
< | <html><div data-datacamp-exercise data-lang="r"> | ||
<code data-type="sample-code"> | |||
# Run this code line-by-line (copy & paste) to understand the demonstration | # Run this code line-by-line (copy & paste) to understand the demonstration | ||
f <- 'http://openmv.net/file/raw-material-properties.csv' | |||
data <- read.csv(f) | |||
summary(data) | summary(data) | ||
Line 77: | Line 79: | ||
# Superimpose them? | # Superimpose them? | ||
plot(data$density1, type='b', col="blue") | plot(data$density1, type='b', col="blue") | ||
lines(data$density2, type='b', col="red") | |||
# Where's density2 ? | |||
lines(data$density2, type='b', col="red") | |||
# Superimpose them: limits | # Superimpose them: limits | ||
plot(data$density1, type='b', col="blue", ylim=c(10, 45)) | plot(data$density1, | ||
lines(data$density2, type='b', col="red") | type='b', | ||
</ | col="blue", | ||
ylim=c(10, 45)) | |||
# Now density2 shows up | |||
lines(data$density2, | |||
type='b', | |||
col="red") | |||
</code> | |||
</div></html> |
Latest revision as of 19:11, 14 January 2019
Learning outcomes
- Understand when it is appropriate to use scatter plots, bar plots, pie charts (hint: almost never), and even tables.
- Learn an interesting, potentially new plot: the box plot, to summarize and compare data.
- How to effectively visualize up to 5 dimensions on a 2-D plot, as shown in a video by Hans Rosling.
- Know the meaning of words like sparklines, data density, and chart junk.
Resources
- Class notes 2015
- Class notes 2014
- Textbook, chapter 1
- Check your knowledge with these quizzes:
- Quiz 1 and Solution 1
- Quiz 2 and Solution 2
- Quiz 3 and Solution 3
- Complete steps 1, 2 ... 9 of the software tutorial
Extended readings
- Sankey diagrams for example, would make a great way to show energy utilization in your company, or even a mass balance superimposed on a flowsheet. Here's a great example applied to the UK energy supply and demand.
- 40 years of boxplots
- Why you should never have to use pie charts, an article by Stephen Few.
- This is one video you must watch for the course: Hans Rosling shows an incredible data visualization
Class videos from prior years
Videos from 2015
07:31 | Download video | Download captions | Script |
03:16 | Download video | Download captions | Script |
04:51 | Download video | Download captions | Script |
07:23 | Download video | Download captions | Script |
Videos from 2014
Videos from 2013
Software codes for this section
Code to show how to superimpose plots
Run this code in a web-browser
# Run this code line-by-line (copy & paste) to understand the demonstration
f <- 'http://openmv.net/file/raw-material-properties.csv'
data <- read.csv(f)
summary(data)
# Single plot
plot(data$density1)
# Connect the dots
plot(data$density1, type='b')
# Another variable
plot(data$density2, type='b', col="red")
# Superimpose them?
plot(data$density1, type='b', col="blue")
# Where's density2 ?
lines(data$density2, type='b', col="red")
# Superimpose them: limits
plot(data$density1,
type='b',
col="blue",
ylim=c(10, 45))
# Now density2 shows up
lines(data$density2,
type='b',
col="red")