Skip to content

Commit

Permalink
update site structure
Browse files Browse the repository at this point in the history
  • Loading branch information
clauswilke committed Dec 22, 2024
1 parent 32a5a8e commit 65746e5
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 984 deletions.
4 changes: 2 additions & 2 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ website:
right:
- text: "Slides"
menu:
- text: "Class 1: Introduction"
href: slides/introduction.html
- text: "Class 2: Aesthetic mappings"
href: slides/aesthetic-mappings.qmd

- text: "Worksheets"
menu:
Expand Down
4 changes: 2 additions & 2 deletions _site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="nav-menu-slides">
<li>
<a class="dropdown-item" href="./slides/introduction.html">
<span class="dropdown-text">Class 1: Introduction</span></a>
<a class="dropdown-item" href="./slides/aesthetic-mappings.html">
<span class="dropdown-text">Class 2: Aesthetic mappings</span></a>
</li>
</ul>
</li>
Expand Down
4 changes: 2 additions & 2 deletions _site/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="nav-menu-slides">
<li>
<a class="dropdown-item" href="./slides/introduction.html">
<span class="dropdown-text">Class 1: Introduction</span></a>
<a class="dropdown-item" href="./slides/aesthetic-mappings.html">
<span class="dropdown-text">Class 2: Aesthetic mappings</span></a>
</li>
</ul>
</li>
Expand Down
83 changes: 31 additions & 52 deletions _site/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,25 @@
"text": "Projects\nAll projects are due by 11:00pm on the day they are due. Projects need to be submitted on Canvas. Please carefully read the submission instructions for each project."
},
{
"objectID": "index.html",
"href": "index.html",
"title": "SDS 366",
"section": "",
"text": "This is the home page for SDS 366, Data Visualization in R. All course materials will be posted on this site.\nInstructor: Claus O. Wilke\nMeeting times: TTH 5:00pm to 6:30pm Venue: MEZ B0.306 Syllabus: click here\nUpcoming lectures and assignments: click here"
"objectID": "slides/aesthetic-mappings.html#dataset-daily-average-temperatures-for-various-locations",
"href": "slides/aesthetic-mappings.html#dataset-daily-average-temperatures-for-various-locations",
"title": "Aesthetic mappings",
"section": "Dataset:Daily average temperatures for various locations",
"text": "Dataset:Daily average temperatures for various locations\n\n\n\n\n\n\nlocation\nday_of_year\nmonth\ntemperature\n\n\n\n\nDeath Valley\n1\n01\n51.0\n\n\nDeath Valley\n2\n01\n51.2\n\n\nDeath Valley\n3\n01\n51.3\n\n\nDeath Valley\n4\n01\n51.4\n\n\nDeath Valley\n5\n01\n51.6\n\n\nDeath Valley\n6\n01\n51.7\n\n\nDeath Valley\n7\n01\n51.9\n\n\nDeath Valley\n8\n01\n52.0\n\n\nDeath Valley\n9\n01\n52.2\n\n\nDeath Valley\n10\n01\n52.3\n\n\nDeath Valley\n11\n01\n52.5\n\n\nDeath Valley\n12\n01\n52.7\n\n\nDeath Valley\n13\n01\n52.9\n\n\nDeath Valley\n14\n01\n53.0\n\n\nDeath Valley\n15\n01\n53.2"
},
{
"objectID": "index.html#computing-requirements",
"href": "index.html#computing-requirements",
"title": "SDS 366",
"section": "Computing requirements",
"text": "Computing requirements\nFor students enrolled in this course, you only need a working web browser to access the edupod server, located at: https://edupod.cns.utexas.edu/\nIf you are using the edupod server, stop reading here. Everything is pre-installed and no further action is needed.\nTo run any of the materials locally on your own machine, you will need the following:\n\nA recent version of R, download from here.\nA recent version of RStudio, download from here, OR a recent version of Positron, download from here.\nThe following R packages:\nbroom, cluster, colorspace, cowplot, distill, gapminder, GGally, gganimate, ggiraph, ggdendro, ggdist, ggforce, ggplot2movies, ggrepel, ggridges, ggthemes, gifski, glue, knitr, learnr, naniar, margins, MASS, Matrix, nycflights13, palmerpenguins, patchwork, rmarkdown, rnaturalearth, rnaturalearthhires, scales, sf, shinyjs, sp, tidyverse, transformr, umap, xaringan\n\nYou can install all required R packages at once by running the following code in the R command line:\n# first run this command:\ninstall.packages(\n c(\n \"broom\", \"cluster\", \"colorspace\", \"cowplot\", \"distill\", \"gapminder\", \n \"GGally\", \"gganimate\", \"ggiraph\", \"ggdendro\", \"ggdist\", \"ggforce\",\n \"ggplot2movies\", \"ggrepel\", \"ggridges\", \"ggthemes\", \"gifski\", \"glue\",\n \"knitr\", \"learnr\", \"naniar\", \"margins\", \"MASS\", \"Matrix\",\n \"nycflights13\", \"palmerpenguins\", \"patchwork\", \"rmarkdown\", \"rnaturalearth\",\n \"scales\", \"sf\", \"shinyjs\", \"sp\", \"tidyverse\", \"transformr\", \"umap\",\n \"xaringan\"\n )\n)\n\n# then run this command:\ninstall.packages(\n \"rnaturalearthhires\", repos = \"https://packages.ropensci.org\", type = \"source\"\n)"
"objectID": "slides/aesthetic-mappings.html#getting-the-data",
"href": "slides/aesthetic-mappings.html#getting-the-data",
"title": "Aesthetic mappings",
"section": "Getting the data",
"text": "Getting the data\nAll examples will use the temperatures dataset:\n\n\ntemperatures &lt;- read_csv(\"https://wilkelab.org/SDS375/datasets/tempnormals.csv\") |&gt;\n mutate(\n location = factor(\n location, levels = c(\"Death Valley\", \"Houston\", \"San Diego\", \"Chicago\")\n )\n ) |&gt;\n select(location, station_id, day_of_year, month, temperature)"
},
{
"objectID": "slides/aesthetic-mappings.html#we-define-the-mapping-with-aes",
"href": "slides/aesthetic-mappings.html#we-define-the-mapping-with-aes",
"title": "Aesthetic mappings",
"section": "We define the mapping with aes()",
"text": "We define the mapping with aes()\n\nggplot(\n data = temperatures,\n mapping = aes(x = day_of_year, y = temperature, color = location)\n) + \n geom_line()"
},
{
"objectID": "worksheets/aesthetic-mappings.html",
Expand Down Expand Up @@ -76,6 +83,20 @@
"section": "Using aesthetics as parameters",
"text": "Using aesthetics as parameters\nMany of the aesthetics (such as color, fill, and also size to change line size or point thickness) can be used as parameters inside a geom rather than inside an aes() statement. The difference is that when you use an aesthetic as a parameter, you specify a specific value, such as color = \"blue\", rather than a mapping, such as aes(color = location). Notice the difference: Inside the aes() function, we don’t actually specify the specific color values, ggplot does that for us. We only say that we want the data values of the location column to correspond to different colors. (We will learn later how to tell ggplot to use specific colors in this mapping.)\nTry this with the boxplot example from the previous section. Map location onto the fill aesthetic but set the color of the lines to \"navyblue\".\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nHint\n\n\n\n\n\nggplot(temperatures, aes(x = month, y = temperature, fill = ___)) +\n geom_boxplot(color = ___)\n\n\n\n\n\n\n\n\n\n\n\nSolution\n\n\n\n\n\nggplot(temperatures, aes(x = month, y = temperature, fill = location)) +\n geom_boxplot(color = \"navyblue\")\n\n\n\n\nNow do the reverse. Map location onto the line colors but fill the box with the color \"navyblue\".\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nHint\n\n\n\n\n\nggplot(temperatures, aes(x = month, y = temperature, color = ___)) +\n geom_boxplot(fill = ___)\n\n\n\n\n\n\n\n\n\n\n\nSolution\n\n\n\n\n\nggplot(temperatures, aes(x = month, y = temperature, color = location)) +\n geom_boxplot(fill = \"navyblue\")"
},
{
"objectID": "index.html",
"href": "index.html",
"title": "SDS 366",
"section": "",
"text": "This is the home page for SDS 366, Data Visualization in R. All course materials will be posted on this site.\nInstructor: Claus O. Wilke\nMeeting times: TTH 5:00pm to 6:30pm Venue: MEZ B0.306 Syllabus: click here\nUpcoming lectures and assignments: click here"
},
{
"objectID": "index.html#computing-requirements",
"href": "index.html#computing-requirements",
"title": "SDS 366",
"section": "Computing requirements",
"text": "Computing requirements\nFor students enrolled in this course, you only need a working web browser to access the edupod server, located at: https://edupod.cns.utexas.edu/\nIf you are using the edupod server, stop reading here. Everything is pre-installed and no further action is needed.\nTo run any of the materials locally on your own machine, you will need the following:\n\nA recent version of R, download from here.\nA recent version of RStudio, download from here, OR a recent version of Positron, download from here.\nThe following R packages:\nbroom, cluster, colorspace, cowplot, distill, gapminder, GGally, gganimate, ggiraph, ggdendro, ggdist, ggforce, ggplot2movies, ggrepel, ggridges, ggthemes, gifski, glue, knitr, learnr, naniar, margins, MASS, Matrix, nycflights13, palmerpenguins, patchwork, rmarkdown, rnaturalearth, rnaturalearthhires, scales, sf, shinyjs, sp, tidyverse, transformr, umap, xaringan\n\nYou can install all required R packages at once by running the following code in the R command line:\n# first run this command:\ninstall.packages(\n c(\n \"broom\", \"cluster\", \"colorspace\", \"cowplot\", \"distill\", \"gapminder\", \n \"GGally\", \"gganimate\", \"ggiraph\", \"ggdendro\", \"ggdist\", \"ggforce\",\n \"ggplot2movies\", \"ggrepel\", \"ggridges\", \"ggthemes\", \"gifski\", \"glue\",\n \"knitr\", \"learnr\", \"naniar\", \"margins\", \"MASS\", \"Matrix\",\n \"nycflights13\", \"palmerpenguins\", \"patchwork\", \"rmarkdown\", \"rnaturalearth\",\n \"scales\", \"sf\", \"shinyjs\", \"sp\", \"tidyverse\", \"transformr\", \"umap\",\n \"xaringan\"\n )\n)\n\n# then run this command:\ninstall.packages(\n \"rnaturalearthhires\", repos = \"https://packages.ropensci.org\", type = \"source\"\n)"
},
{
"objectID": "syllabus.html",
"href": "syllabus.html",
Expand Down Expand Up @@ -187,47 +208,5 @@
"title": "Syllabus",
"section": "Class Recordings",
"text": "Class Recordings\nIf any class recordings are provided they are reserved only for students in this class for educational purposes and are protected under FERPA. The recordings should not be shared outside the class in any form. Violation of this restriction by a student could lead to Student Misconduct proceedings."
},
{
"objectID": "slides/test.html#dataset-daily-average-temperatures-for-various-locations",
"href": "slides/test.html#dataset-daily-average-temperatures-for-various-locations",
"title": "Aesthetic mappings",
"section": "Dataset:Daily average temperatures for various locations",
"text": "Dataset:Daily average temperatures for various locations\n\n\n\n\n\nlocation\nday_of_year\nmonth\ntemperature\n\n\n\n\nDeath Valley\n1\n01\n51.0\n\n\nDeath Valley\n2\n01\n51.2\n\n\nDeath Valley\n3\n01\n51.3\n\n\nDeath Valley\n4\n01\n51.4\n\n\nDeath Valley\n5\n01\n51.6\n\n\nDeath Valley\n6\n01\n51.7\n\n\nDeath Valley\n7\n01\n51.9\n\n\nDeath Valley\n8\n01\n52.0\n\n\nDeath Valley\n9\n01\n52.2\n\n\nDeath Valley\n10\n01\n52.3\n\n\nDeath Valley\n11\n01\n52.5\n\n\nDeath Valley\n12\n01\n52.7\n\n\nDeath Valley\n13\n01\n52.9\n\n\nDeath Valley\n14\n01\n53.0\n\n\nDeath Valley\n15\n01\n53.2"
},
{
"objectID": "slides/test.html#getting-the-data",
"href": "slides/test.html#getting-the-data",
"title": "Aesthetic mappings",
"section": "Getting the data",
"text": "Getting the data\nAll examples will use the temperatures dataset:"
},
{
"objectID": "slides/test.html#we-define-the-mapping-with-aes",
"href": "slides/test.html#we-define-the-mapping-with-aes",
"title": "Aesthetic mappings",
"section": "We define the mapping with aes()",
"text": "We define the mapping with aes()\n\n.center[ r ggplot-temps-example-out, ref.label=\"ggplot-temps-example\", echo=FALSE, out.width = \"55%\", fig.width = 5.5, fig.asp = 0.618, dev=\"svg\"]"
},
{
"objectID": "slides/aesthetic-mappings.html#dataset-daily-average-temperatures-for-various-locations",
"href": "slides/aesthetic-mappings.html#dataset-daily-average-temperatures-for-various-locations",
"title": "Aesthetic mappings",
"section": "Dataset:Daily average temperatures for various locations",
"text": "Dataset:Daily average temperatures for various locations\n\n\n\n\n\n\nlocation\nday_of_year\nmonth\ntemperature\n\n\n\n\nDeath Valley\n1\n01\n51.0\n\n\nDeath Valley\n2\n01\n51.2\n\n\nDeath Valley\n3\n01\n51.3\n\n\nDeath Valley\n4\n01\n51.4\n\n\nDeath Valley\n5\n01\n51.6\n\n\nDeath Valley\n6\n01\n51.7\n\n\nDeath Valley\n7\n01\n51.9\n\n\nDeath Valley\n8\n01\n52.0\n\n\nDeath Valley\n9\n01\n52.2\n\n\nDeath Valley\n10\n01\n52.3\n\n\nDeath Valley\n11\n01\n52.5\n\n\nDeath Valley\n12\n01\n52.7\n\n\nDeath Valley\n13\n01\n52.9\n\n\nDeath Valley\n14\n01\n53.0\n\n\nDeath Valley\n15\n01\n53.2"
},
{
"objectID": "slides/aesthetic-mappings.html#getting-the-data",
"href": "slides/aesthetic-mappings.html#getting-the-data",
"title": "Aesthetic mappings",
"section": "Getting the data",
"text": "Getting the data\nAll examples will use the temperatures dataset:\n\n\ntemperatures &lt;- read_csv(\"https://wilkelab.org/SDS375/datasets/tempnormals.csv\") |&gt;\n mutate(\n location = factor(\n location, levels = c(\"Death Valley\", \"Houston\", \"San Diego\", \"Chicago\")\n )\n ) |&gt;\n select(location, station_id, day_of_year, month, temperature)"
},
{
"objectID": "slides/aesthetic-mappings.html#we-define-the-mapping-with-aes",
"href": "slides/aesthetic-mappings.html#we-define-the-mapping-with-aes",
"title": "Aesthetic mappings",
"section": "We define the mapping with aes()",
"text": "We define the mapping with aes()\n\nggplot(\n data = temperatures,\n mapping = aes(x = day_of_year, y = temperature, color = location)\n) + \n geom_line()"
}
]
Loading

0 comments on commit 65746e5

Please sign in to comment.