Skip to content

Commit

Permalink
remove ggplot reference in warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
atheobold committed Apr 8, 2024
1 parent f992d4b commit afe35df
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions _freeze/slides/week2-day1/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"hash": "03b76047df8a2b52fbc3146418d279d6",
"hash": "d02218427dd3b96a04b90caa5cab1e39",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"Visualizing & Summarizing Numerical Data\"\nauthor: \"STAT 313\"\nformat: \n revealjs:\n logo: images/ggplot2.png\n theme: style.scss\neditor: visual\nexecute: \n warning: false\n message: false\n---\n\n::: {.cell}\n\n:::\n\n\n# Researching Group Collaborations\n\n## \n\n::: {style=\"font-size: 3em; color: #ed8402;\"}\n5-minutes\n:::\n\n::: columns\n::: {.column width=\"47%\"}\nIf you [would]{.underline} like to participate\n\n- Complete [consent form](https://forms.office.com/Pages/ResponsePage.aspx?id=2wING578lUSVNx03nMoq5wvQIC5qYK9Er5WXQADAGttUMDE0TjZCOUZMSEg3V0JFV1dLU01ENERLVi4u) (say yes)\n:::\n\n::: {.column width=\"5%\"}\n:::\n\n::: {.column width=\"47%\"}\nIf you [would not]{.underline} like to participate\n\n- Complete [consent form](https://forms.office.com/Pages/ResponsePage.aspx?id=2wING578lUSVNx03nMoq5wvQIC5qYK9Er5WXQADAGttUMDE0TjZCOUZMSEg3V0JFV1dLU01ENERLVi4u) (say no)\n:::\n:::\n\n# Visualizing Numerical Variables\n\n## Warm-up\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/aesthetics-1.png){fig-align='center' width=960}\n:::\n:::\n\n\n. . .\n\nWhat are the `aes`thetics in this plot?\n\nWhat `geom`etric object is being plotted?\n\n## Today's Layout\n\n1. Review visualizations for numerical variables\n2. Discuss the pros / cons of each visualization <!-- 3. Practice producing these visualizations -->\n\n. . .\n\n</br>\n\n<!-- Open today's interactive document, so you can be ready to code along with me! -->\n\n<!-- ::: {style=\"font-size: 1.25em;\"} -->\n\n<!-- <https://bit.ly/week-2-code-along> -->\n\n<!-- ::: -->\n\n## {background-color=\"#D4D4D4\"}\n\n::: {style=\"margin-top: 100px; font-size: 2em; color: #000000;\"}\nUnivariate (One Variable) Visualizations -- For Numerical Data\n:::\n\n::: incremental\n::: {style=\"color:#000000;\"}\n- Histogram (or Dotplot)\n- Boxplot\n- Density Plot\n:::\n:::\n\n## Histogram\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/histogram-1.png){width=960}\n:::\n:::\n\n\n::: incremental\n- Is `count` a variable in the dataset?\n- How did `ggplot` decide how tall each bar should be?\n:::\n\n<!-- ## {background-color=\"#B6CADA\"} -->\n\n<!-- ::: {style=\"font-size: 4em;\"} -->\n\n<!-- Recreate my plot! -->\n\n<!-- ::: -->\n\n<!-- ::: {style=\"font-size: 1.5em;\"} -->\n\n<!-- <https://bit.ly/week-2-code-along> -->\n\n<!-- ::: -->\n\n## \n\n::: columns\n::: {.column width=\"50\"}\n### What are the strengths of a histogram?\n\n::: fragment\n- Inspect shape of a distribution (skewed or symmetric)\n- Identify modes (most common values)\n:::\n:::\n\n::: {.column width=\"50\"}\n### What are the weaknesses of a histogram?\n\n::: fragment\n- **Do not** plot raw data, plot summaries (counts) of the data!\n- Sensitive to the width of the bins (`binwidth`)\n:::\n:::\n:::\n\n## Boxplot\n\n\n::: {.cell layout-nrow=\"1\"}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/boxplot-1.png){width=960 height=100%}\n:::\n\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/boxplot-2.png){width=960 height=100%}\n:::\n:::\n\n\n. . .\n\nWhat calculations are necessary for creating a boxplot?\n\n<!-- ## {background-color=\"#B6CADA\"} -->\n\n<!-- ::: {style=\"font-size: 4em;\"} -->\n\n<!-- Recreate my plot! -->\n\n<!-- ::: -->\n\n<!-- ::: {style=\"font-size: 1.5em\"} -->\n\n<!-- <https://bit.ly/week-2-code-along> -->\n\n<!-- ::: -->\n\n## \n\n::: columns\n::: {.column width=\"50\"}\n### What are strengths of a boxplot?\n\n::: fragment\n- Easy to flag unusual observations\n- Easy to see the median\n:::\n:::\n\n::: {.column width=\"50\"}\n### What are weaknesses of a boxplot?\n\n::: fragment\n- Don't plot raw data\n- Only plot summary statistics\n- Hide multiple modes\n:::\n:::\n:::\n\n## {background-color=\"#000000\"}\n\n![](images/boxplot_horst.png)\n\n## Density Plot\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/density-1.png){width=960}\n:::\n:::\n\n\n. . .\n\n- A smooth approximation to a variable's distribution\n- Plots density (as a proportion) on the y-axis\n\n## \n\n::: columns\n::: {.column width=\"50\"}\n### What are strengths of a density plot?\n\n::: fragment\n- Inspect shape of a distribution (skewed or symmetric)\n- Identify modes (most common values)\n- Less jagged than a histogram\n:::\n:::\n\n::: {.column width=\"50\"}\n### What are weaknesses of a density plot?\n\n::: fragment\n- Do not plot raw data, plot summaries (proportions) of the data!\n- y-axis is difficult to interpret\n- Can over smooth and hide interesting shapes\n:::\n:::\n:::\n\n## {background-color=\"#D4D4D4\"}\n\n::: {style=\"margin-top: 100px; font-size: 2em; color: #000000;\"}\nBivariate (Two Variables) Visualizations -- For Numerical Data\n:::\n\n::: incremental\n::: {style=\"color: #000000;\"}\n- Scatterplots (Week 2)\n\n- Faceted Histograms (Week 3)\n\n- Side-by-Side Boxplots (Week 3)\n\n- Stacked Density Plots (Week 3)\n:::\n:::\n\n## Scatterplots\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/scatterplot-1.png){width=960}\n:::\n:::\n\n\n. . .\n\nWhat are the `geom`etric objects being plotted in a scatterplot?\n\n<!-- ## {background-color=\"#B6CADA\"} -->\n\n<!-- ::: {style=\"font-size: 4em;\"} -->\n\n<!-- Recreate my plot! -->\n\n<!-- ::: -->\n\n<!-- ::: {style=\"font-size: 1.5em;\"} -->\n\n<!-- <https://bit.ly/week-2-code-along> -->\n\n<!-- ::: -->\n\n## \n\n> \"The scatterplot the most generally useful invention in the history of statistical graphics.\"\n\n</br>\n\n. . .\n\n::: columns\n::: {.column width=\"50\"}\nWhat are strengths of a scatterplot?\n\n::: fragment\n- Plots the **raw** data!\n- Inspect form, strength, and direction of a relationship\n- Identify unusual values\n:::\n:::\n\n::: {.column width=\"50\"}\nWhat are weaknesses of a scatterplot?\n\n::: fragment\n- Can get \"busy\" when there are lots of observations (points)\n:::\n:::\n:::\n\n## {background-color=\"#D4D4D4\"}\n\n::: {style=\"margin-top: 100px; font-size: 2em; color: #000000;\"}\nMultivariate (3+ Variables) Plots\n:::\n\n::: {style=\"color: #000000; font-size: 0.75em;\"}\nThere are two main methods for adding a third (or fourth) variable into a data visualization:\n\n::: columns\n::: {.column width=\"50%\"}\n::: fragment\n::: {style=\"color: #34605f; font-size: 1.25em;\"}\nColors\n:::\n\n- creates colors for every level of a categorical variable\n- creates a gradient for different values of a quantitative variable\n:::\n:::\n\n::: {.column width=\"50%\"}\n::: fragment\n::: {style=\"color: #b76352; font-size: 1.25em;\"}\nFacets\n:::\n\n- creates subplots for every level of a categorical variable\n- labels each sub-plot with the value of the variable\n:::\n:::\n:::\n:::\n\n## Colors in Scatterplots -- Numerical Variable\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/scatterplot-color-num-1.png){fig-align='center' width=960}\n:::\n:::\n\n\n<!-- ## {background-color=\"#B6CADA\"} -->\n\n<!-- ::: {style=\"font-size: 4em;\"} -->\n\n<!-- Recreate my plot! -->\n\n<!-- ::: -->\n\n## Colors in Scatterplots -- Categorical Variable\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/scatterplot-color-cat-1.png){fig-align='center' width=960}\n:::\n:::\n\n\n## Why not use facets with a numerical variable???\n\n. . .\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/scatterplot-facets-num-1.png){fig-align='center' width=960}\n:::\n:::\n\n\n## Due by Wednesday\n\n1. Visualizing Numerical Data -- Reading Guide, Part 2\n2. Visualizing & Summarizing Numerical Data – Concept Quiz\n3. Exploring Numerical Data -- R Tutorial, Part 1\n4. Summarizing with Statistics -- R Tutorial, Part 2\n\n. . .\n\n::: callout-warning\n# Deadline Policy\n\nIf you cannot submit an assignment by the deadline, you are required to submit a deadline extension request **before** the assignment deadline has passed.\n:::\n",
"markdown": "---\ntitle: \"Visualizing & Summarizing Numerical Data\"\nauthor: \"STAT 313\"\nformat: \n revealjs:\n logo: images/ggplot2.png\n theme: style.scss\neditor: visual\nexecute: \n warning: false\n message: false\n---\n\n::: {.cell}\n\n:::\n\n\n# Researching Group Collaborations\n\n## \n\n::: {style=\"font-size: 3em; color: #ed8402;\"}\n5-minutes\n:::\n\n::: columns\n::: {.column width=\"47%\"}\nIf you [would]{.underline} like to participate\n\n- Complete [consent form](https://forms.office.com/Pages/ResponsePage.aspx?id=2wING578lUSVNx03nMoq5wvQIC5qYK9Er5WXQADAGttUMDE0TjZCOUZMSEg3V0JFV1dLU01ENERLVi4u) (say yes)\n:::\n\n::: {.column width=\"5%\"}\n:::\n\n::: {.column width=\"47%\"}\nIf you [would not]{.underline} like to participate\n\n- Complete [consent form](https://forms.office.com/Pages/ResponsePage.aspx?id=2wING578lUSVNx03nMoq5wvQIC5qYK9Er5WXQADAGttUMDE0TjZCOUZMSEg3V0JFV1dLU01ENERLVi4u) (say no)\n:::\n:::\n\n# Visualizing Numerical Variables\n\n## Warm-up\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/aesthetics-1.png){fig-align='center' width=960}\n:::\n:::\n\n\n. . .\n\nWhere are variables being included in this plot?\n\nWhat objects are being used to represent the data?\n\n## Today's Layout\n\n1. Review visualizations for numerical variables\n2. Discuss the pros / cons of each visualization \n<!-- 3. Practice producing these visualizations -->\n\n. . .\n\n</br>\n\n<!-- Open today's interactive document, so you can be ready to code along with me! -->\n\n<!-- ::: {style=\"font-size: 1.25em;\"} -->\n\n<!-- <https://bit.ly/week-2-code-along> -->\n\n<!-- ::: -->\n\n## {background-color=\"#D4D4D4\"}\n\n::: {style=\"margin-top: 100px; font-size: 2em; color: #000000;\"}\nUnivariate (One Variable) Visualizations -- For Numerical Data\n:::\n\n::: incremental\n::: {style=\"color:#000000;\"}\n- Histogram (or Dotplot)\n- Boxplot\n- Density Plot\n:::\n:::\n\n## Histogram\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/histogram-1.png){width=960}\n:::\n:::\n\n\n::: incremental\n- Is `count` a variable in the dataset?\n- How did `ggplot` decide how tall each bar should be?\n:::\n\n<!-- ## {background-color=\"#B6CADA\"} -->\n\n<!-- ::: {style=\"font-size: 4em;\"} -->\n\n<!-- Recreate my plot! -->\n\n<!-- ::: -->\n\n<!-- ::: {style=\"font-size: 1.5em;\"} -->\n\n<!-- <https://bit.ly/week-2-code-along> -->\n\n<!-- ::: -->\n\n## \n\n::: columns\n::: {.column width=\"50\"}\n### What are the strengths of a histogram?\n\n::: fragment\n- Inspect shape of a distribution (skewed or symmetric)\n- Identify modes (most common values)\n:::\n:::\n\n::: {.column width=\"50\"}\n### What are the weaknesses of a histogram?\n\n::: fragment\n- **Do not** plot raw data, plot summaries (counts) of the data!\n- Sensitive to the width of the bins (`binwidth`)\n:::\n:::\n:::\n\n## Boxplot\n\n\n::: {.cell layout-nrow=\"1\"}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/boxplot-1.png){width=960 height=100%}\n:::\n\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/boxplot-2.png){width=960 height=100%}\n:::\n:::\n\n\n. . .\n\nWhat calculations are necessary for creating a boxplot?\n\n<!-- ## {background-color=\"#B6CADA\"} -->\n\n<!-- ::: {style=\"font-size: 4em;\"} -->\n\n<!-- Recreate my plot! -->\n\n<!-- ::: -->\n\n<!-- ::: {style=\"font-size: 1.5em\"} -->\n\n<!-- <https://bit.ly/week-2-code-along> -->\n\n<!-- ::: -->\n\n## \n\n::: columns\n::: {.column width=\"50\"}\n### What are strengths of a boxplot?\n\n::: fragment\n- Easy to flag unusual observations\n- Easy to see the median\n:::\n:::\n\n::: {.column width=\"50\"}\n### What are weaknesses of a boxplot?\n\n::: fragment\n- Don't plot raw data\n- Only plot summary statistics\n- Hide multiple modes\n:::\n:::\n:::\n\n## {background-color=\"#000000\"}\n\n![](images/boxplot_horst.png)\n\n## Density Plot\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/density-1.png){width=960}\n:::\n:::\n\n\n. . .\n\n- A smooth approximation to a variable's distribution\n- Plots density (as a proportion) on the y-axis\n\n## \n\n::: columns\n::: {.column width=\"50\"}\n### What are strengths of a density plot?\n\n::: fragment\n- Inspect shape of a distribution (skewed or symmetric)\n- Identify modes (most common values)\n- Less jagged than a histogram\n:::\n:::\n\n::: {.column width=\"50\"}\n### What are weaknesses of a density plot?\n\n::: fragment\n- Do not plot raw data, plot summaries (proportions) of the data!\n- y-axis is difficult to interpret\n- Can over smooth and hide interesting shapes\n:::\n:::\n:::\n\n## {background-color=\"#D4D4D4\"}\n\n::: {style=\"margin-top: 100px; font-size: 2em; color: #000000;\"}\nBivariate (Two Variables) Visualizations -- For Numerical Data\n:::\n\n::: incremental\n::: {style=\"color: #000000;\"}\n- Scatterplots (Week 2)\n\n- Faceted Histograms (Week 3)\n\n- Side-by-Side Boxplots (Week 3)\n\n- Stacked Density Plots (Week 3)\n:::\n:::\n\n## Scatterplots\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/scatterplot-1.png){width=960}\n:::\n:::\n\n\n. . .\n\nWhat are the `geom`etric objects being plotted in a scatterplot?\n\n<!-- ## {background-color=\"#B6CADA\"} -->\n\n<!-- ::: {style=\"font-size: 4em;\"} -->\n\n<!-- Recreate my plot! -->\n\n<!-- ::: -->\n\n<!-- ::: {style=\"font-size: 1.5em;\"} -->\n\n<!-- <https://bit.ly/week-2-code-along> -->\n\n<!-- ::: -->\n\n## \n\n> \"The scatterplot the most generally useful invention in the history of statistical graphics.\"\n\n</br>\n\n. . .\n\n::: columns\n::: {.column width=\"50\"}\nWhat are strengths of a scatterplot?\n\n::: fragment\n- Plots the **raw** data!\n- Inspect form, strength, and direction of a relationship\n- Identify unusual values\n:::\n:::\n\n::: {.column width=\"50\"}\nWhat are weaknesses of a scatterplot?\n\n::: fragment\n- Can get \"busy\" when there are lots of observations (points)\n:::\n:::\n:::\n\n## {background-color=\"#D4D4D4\"}\n\n::: {style=\"margin-top: 100px; font-size: 2em; color: #000000;\"}\nMultivariate (3+ Variables) Plots\n:::\n\n::: {style=\"color: #000000; font-size: 0.75em;\"}\nThere are two main methods for adding a third (or fourth) variable into a data visualization:\n\n::: columns\n::: {.column width=\"50%\"}\n::: fragment\n::: {style=\"color: #34605f; font-size: 1.25em;\"}\nColors\n:::\n\n- creates colors for every level of a categorical variable\n- creates a gradient for different values of a quantitative variable\n:::\n:::\n\n::: {.column width=\"50%\"}\n::: fragment\n::: {style=\"color: #b76352; font-size: 1.25em;\"}\nFacets\n:::\n\n- creates subplots for every level of a categorical variable\n- labels each sub-plot with the value of the variable\n:::\n:::\n:::\n:::\n\n## Colors in Scatterplots -- Numerical Variable\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/scatterplot-color-num-1.png){fig-align='center' width=960}\n:::\n:::\n\n\n<!-- ## {background-color=\"#B6CADA\"} -->\n\n<!-- ::: {style=\"font-size: 4em;\"} -->\n\n<!-- Recreate my plot! -->\n\n<!-- ::: -->\n\n## Colors in Scatterplots -- Categorical Variable\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/scatterplot-color-cat-1.png){fig-align='center' width=960}\n:::\n:::\n\n\n## Why not use facets with a numerical variable???\n\n. . .\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](week2-day1_files/figure-revealjs/scatterplot-facets-num-1.png){fig-align='center' width=960}\n:::\n:::\n\n\n## Due by Wednesday\n\n1. Visualizing Numerical Data -- Reading Guide, Part 2\n2. Visualizing & Summarizing Numerical Data – Concept Quiz\n3. Exploring Numerical Data -- R Tutorial, Part 1\n4. Summarizing with Statistics -- R Tutorial, Part 2\n\n. . .\n\n::: callout-warning\n# Deadline Policy\n\nIf you cannot submit an assignment by the deadline, you are required to submit a deadline extension request **before** the assignment deadline has passed.\n:::\n",
"supporting": [
"week2-day1_files"
],
Expand Down
2 changes: 1 addition & 1 deletion docs/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@
"href": "slides/week2-day1.html#warm-up",
"title": "Visualizing & Summarizing Numerical Data",
"section": "Warm-up",
"text": "Warm-up\n\n\nWhat are the aesthetics in this plot?\nWhat geometric object is being plotted?"
"text": "Warm-up\n\n\nWhere are variables being included in this plot?\nWhat objects are being used to represent the data?"
},
{
"objectID": "slides/week2-day1.html#todays-layout",
Expand Down
2 changes: 1 addition & 1 deletion docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
</url>
<url>
<loc>https://atheobold.github.io/stat-313-website/slides/week2-day1.html</loc>
<lastmod>2024-04-08T20:35:50.015Z</lastmod>
<lastmod>2024-04-08T21:33:54.371Z</lastmod>
</url>
<url>
<loc>https://atheobold.github.io/stat-313-website/slides/week9-day2.html</loc>
Expand Down
4 changes: 2 additions & 2 deletions docs/slides/week2-day1.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ <h1>Visualizing Numerical Variables</h1>
<h2>Warm-up</h2>

<img data-src="week2-day1_files/figure-revealjs/aesthetics-1.png" class="quarto-figure quarto-figure-center r-stretch" width="960"><div class="fragment">
<p>What are the <code>aes</code>thetics in this plot?</p>
<p>What <code>geom</code>etric object is being plotted?</p>
<p>Where are variables being included in this plot?</p>
<p>What objects are being used to represent the data?</p>
</div>
</section>
<section id="todays-layout" class="slide level2">
Expand Down
9 changes: 4 additions & 5 deletions slides/week2-day1.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,15 @@ penguins %>%

. . .

What are the `aes`thetics in this plot?
Where are variables being included in this plot?

What `geom`etric object is being plotted?
What objects are being used to represent the data?

## Today's Layout

1. Review visualizations for numerical variables
2. Discuss the pros / cons of each visualization <!-- 3. Practice producing these visualizations -->

. . .
2. Discuss the pros / cons of each visualization
<!-- 3. Practice producing these visualizations -->

</br>

Expand Down

0 comments on commit afe35df

Please sign in to comment.