Skip to content

Commit

Permalink
goodness gracious
Browse files Browse the repository at this point in the history
  • Loading branch information
apreshill committed Apr 17, 2018
1 parent 8fa5414 commit f8066ac
Show file tree
Hide file tree
Showing 155 changed files with 710 additions and 10,881 deletions.
2 changes: 1 addition & 1 deletion 00-install_name_plot.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="slides.html">Slides</a>
<a href="slides.html">Slides &amp; Reading</a>
</li>
<li>
<a href="data-vis-resources.html">Resources</a>
Expand Down
2 changes: 1 addition & 1 deletion 01-addendum.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="slides.html">Slides</a>
<a href="slides.html">Slides &amp; Reading</a>
</li>
<li>
<a href="data-vis-resources.html">Resources</a>
Expand Down
2 changes: 1 addition & 1 deletion 01-eda_hot_dogs.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="slides.html">Slides</a>
<a href="slides.html">Slides &amp; Reading</a>
</li>
<li>
<a href="data-vis-resources.html">Resources</a>
Expand Down
4 changes: 2 additions & 2 deletions 01-eda_hot_dogs_cache/html/__packages
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ purrr
dplyr
stringr
forcats
extrafont
babynames
bindrcpp
extrafont
ggthemes
babynames
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
41 changes: 40 additions & 1 deletion 02-addendum.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,52 @@ moma_singles_summary <- moma %>%
artist_gender = as.factor(artist_gender)) %>%
group_by(year_acquired, artist_gender) %>%
summarize(n_acquired = n(),
mean_lag = mean(lag_acquired)) %>%
median_lag = median(lag_acquired)) %>%
complete(year_acquired, artist_gender,
fill = list(n_acquired = 0))
ggplot(moma_singles_summary, aes(x = year_acquired,
y = n_acquired,
color = artist_gender)) +
geom_point()
ggplot(moma_singles_summary, aes(x = year_acquired,
y = median_lag,
color = artist_gender,
group = artist_gender)) +
geom_point() +
geom_line()
```

Tag top artists


```{r}
top_artists <- moma %>%
count(artist_gender, artist, sort = TRUE) %>%
group_by(artist_gender) %>%
top_n(1) %>%
filter(!is.na(artist_gender)) %>%
pull(artist)
moma <- moma %>%
mutate(top_to_color = case_when(
artist %in% top_artists & artist_gender == "Male" ~ "Picasso",
artist %in% top_artists & artist_gender == "Female" ~ "Levine"
))
moma_top <- moma %>%
filter(!is.na(top_to_color))
moma_else <- moma %>%
filter(is.na(top_to_color))
# need to separate plotting of "NA" points
# plot Levine and Picasso points with separate geom layer
ggplot(data = NULL, aes(year_created, year_acquired)) +
geom_point(data = moma_else, color = "grey70", alpha = .5) +
geom_point(data = moma_top, aes(color = top_to_color), size = 2) +
labs(x = "Year Painted", y = "Year Acquired") +
ggtitle("MoMA Keeps Its Collection Current")
```

39 changes: 37 additions & 2 deletions 02-addendum.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="slides.html">Slides</a>
<a href="slides.html">Slides &amp; Reading</a>
</li>
<li>
<a href="data-vis-resources.html">Resources</a>
Expand Down Expand Up @@ -315,7 +315,7 @@ <h4 class="author"><em>Alison Hill</em></h4>
artist_gender = as.factor(artist_gender)) %&gt;%
group_by(year_acquired, artist_gender) %&gt;%
summarize(n_acquired = n(),
mean_lag = mean(lag_acquired)) %&gt;%
median_lag = median(lag_acquired)) %&gt;%
complete(year_acquired, artist_gender,
fill = list(n_acquired = 0))

Expand All @@ -324,6 +324,41 @@ <h4 class="author"><em>Alison Hill</em></h4>
color = artist_gender)) +
geom_point()</code></pre>
<p><img src="02-addendum_files/figure-html/unnamed-chunk-1-1.png" width="672" /></p>
<pre class="r"><code>ggplot(moma_singles_summary, aes(x = year_acquired,
y = median_lag,
color = artist_gender,
group = artist_gender)) +
geom_point() +
geom_line()</code></pre>
<p><img src="02-addendum_files/figure-html/unnamed-chunk-1-2.png" width="672" /></p>
<p>Tag top artists</p>
<pre class="r"><code>top_artists &lt;- moma %&gt;%
count(artist_gender, artist, sort = TRUE) %&gt;%
group_by(artist_gender) %&gt;%
top_n(1) %&gt;%
filter(!is.na(artist_gender)) %&gt;%
pull(artist)

moma &lt;- moma %&gt;%
mutate(top_to_color = case_when(
artist %in% top_artists &amp; artist_gender == &quot;Male&quot; ~ &quot;Picasso&quot;,
artist %in% top_artists &amp; artist_gender == &quot;Female&quot; ~ &quot;Levine&quot;
))

moma_top &lt;- moma %&gt;%
filter(!is.na(top_to_color))

moma_else &lt;- moma %&gt;%
filter(is.na(top_to_color))

# need to separate plotting of &quot;NA&quot; points
# plot Levine and Picasso points with separate geom layer
ggplot(data = NULL, aes(year_created, year_acquired)) +
geom_point(data = moma_else, color = &quot;grey70&quot;, alpha = .5) +
geom_point(data = moma_top, aes(color = top_to_color), size = 2) +
labs(x = &quot;Year Painted&quot;, y = &quot;Year Acquired&quot;) +
ggtitle(&quot;MoMA Keeps Its Collection Current&quot;) </code></pre>
<p><img src="02-addendum_files/figure-html/unnamed-chunk-2-1.png" width="672" /></p>

<p>
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion 02-moma.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ knitr::include_url("https://apreshill.github.io/data-vis-labs-2018/slides/02-sli

# Inspiration + data

We'll use data from the Museum of Modern Art (MOMA)
We'll use data from the Museum of Modern Art (MoMA)

- Publicly available on [GitHub](https://github.com/MuseumofModernArt/collection)
- As analyzed by [fivethirtyeight.com](https://fivethirtyeight.com/features/a-nerds-guide-to-the-2229-paintings-at-moma/)
Expand Down
4 changes: 2 additions & 2 deletions 02-moma.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="slides.html">Slides</a>
<a href="slides.html">Slides &amp; Reading</a>
</li>
<li>
<a href="data-vis-resources.html">Resources</a>
Expand Down Expand Up @@ -340,7 +340,7 @@ <h1><span class="header-section-number">2</span> Slides for today</h1>
</div>
<div id="inspiration-data" class="section level1">
<h1><span class="header-section-number">3</span> Inspiration + data</h1>
<p>We’ll use data from the Museum of Modern Art (MOMA)</p>
<p>We’ll use data from the Museum of Modern Art (MoMA)</p>
<ul>
<li>Publicly available on <a href="https://github.com/MuseumofModernArt/collection">GitHub</a></li>
<li>As analyzed by <a href="https://fivethirtyeight.com/features/a-nerds-guide-to-the-2229-paintings-at-moma/">fivethirtyeight.com</a></li>
Expand Down
13 changes: 0 additions & 13 deletions 02-moma_cache/html/__packages

This file was deleted.

Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-10-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-11-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-12-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-13-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-14-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-15-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-16-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-17-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-18-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-19-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-20-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-22-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-23-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-24-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-25-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-7-1.png
Binary file not shown.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-8-1.png
Diff not rendered.
Binary file removed 02-moma_files/figure-html/unnamed-chunk-9-1.png
Diff not rendered.
2 changes: 1 addition & 1 deletion 02a-moma-cleaning.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="slides.html">Slides</a>
<a href="slides.html">Slides &amp; Reading</a>
</li>
<li>
<a href="data-vis-resources.html">Resources</a>
Expand Down
2 changes: 1 addition & 1 deletion 03-colors_and_animal_words.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="slides.html">Slides</a>
<a href="slides.html">Slides &amp; Reading</a>
</li>
<li>
<a href="data-vis-resources.html">Resources</a>
Expand Down
2 changes: 1 addition & 1 deletion 03a-animal-word-cleaning.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="slides.html">Slides</a>
<a href="slides.html">Slides &amp; Reading</a>
</li>
<li>
<a href="data-vis-resources.html">Resources</a>
Expand Down
2 changes: 1 addition & 1 deletion README.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="slides.html">Slides</a>
<a href="slides.html">Slides &amp; Reading</a>
</li>
<li>
<a href="data-vis-resources.html">Resources</a>
Expand Down
2 changes: 1 addition & 1 deletion _site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ output_dir: '.'
navbar:
title: CS631 Labs
left:
- text: Slides
- text: Slides & Reading
href: slides.html
- text: Resources
href: data-vis-resources.html
Expand Down
2 changes: 1 addition & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="slides.html">Slides</a>
<a href="slides.html">Slides &amp; Reading</a>
</li>
<li>
<a href="data-vis-resources.html">Resources</a>
Expand Down
15 changes: 1 addition & 14 deletions data-vis-resources.Rmd
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
---
title: "Resources"
output:
html_document:
toc: true
toc_depth: 2
toc_float: TRUE
number_sections: true
output: html_document
---

# Talks & Workshops

## Take A Sad Plot & Make It Better

Expand All @@ -27,11 +21,4 @@ Workshop given at OHSU Data Jamboree

https://alison.rbind.io/html/jamboree_heart_ggplot.html

# Reading

Free books, available to read online:

- Modern Dive chapter on Data Visualization: http://moderndive.com/3-viz.html
- R for Data Science chapter on Data Visualization: http://r4ds.had.co.nz/data-visualisation.html
- Fundamentals of Data Visualization: http://serialmentor.com/dataviz/
- Data Visualization: A Practical Introduction: http://socviz.co
Loading

0 comments on commit f8066ac

Please sign in to comment.