-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mvanrongen
committed
Nov 15, 2024
1 parent
430d2ea
commit 252ea4d
Showing
6 changed files
with
34,835 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"hash": "d4a131e91826a1b7c0f7e8f521c61159", | ||
"result": { | ||
"engine": "knitr", | ||
"markdown": "---\ntitle: Plotting data\n---\n\n\n\n\n::: {.callout-tip}\n#### Learning objectives\n\n- \n:::\n\n## Context\nWe now have a good grasp of how data is commonly structured, with variables in columns and observations in rows. This is the perfect format for visualising data.\n\n## Introducing plotting\n\nTo create a plot we'll need three things:\n\n1. data\n2. mapping aesthetics\n3. specify the type of plot\n\n::: {.panel-tabset group=\"language\"}\n## R\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"2\"}\nlibrary(tidyverse)\n```\n\n::: {.cell-output .cell-output-stderr}\n\n```\n── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──\n✔ dplyr 1.1.4 ✔ readr 2.1.5\n✔ forcats 1.0.0 ✔ stringr 1.5.1\n✔ ggplot2 3.5.1 ✔ tibble 3.2.1\n✔ lubridate 1.9.3 ✔ tidyr 1.3.1\n✔ purrr 1.0.2 \n── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──\n✖ dplyr::filter() masks stats::filter()\n✖ dplyr::lag() masks stats::lag()\nℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors\n```\n\n\n:::\n\n```{.r .cell-code code-line-numbers=\"2\"}\nsurveys <- read_csv(\"data/surveys.csv\")\n```\n\n::: {.cell-output .cell-output-stderr}\n\n```\nRows: 34786 Columns: 13\n── Column specification ────────────────────────────────────────────────────────\nDelimiter: \",\"\nchr (6): species_id, sex, genus, species, taxa, plot_type\ndbl (7): record_id, month, day, year, plot_id, hindfoot_length, weight\n\nℹ Use `spec()` to retrieve the full column specification for this data.\nℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.\n```\n\n\n:::\n\n```{.r .cell-code code-line-numbers=\"2\"}\nggplot(data = surveys,\n mapping = aes(x = weight, y = hindfoot_length)) +\n geom_point()\n```\n\n::: {.cell-output .cell-output-stderr}\n\n```\nWarning: Removed 4048 rows containing missing values or values outside the scale range\n(`geom_point()`).\n```\n\n\n:::\n\n::: {.cell-output-display}\n![](04-plotting_files/figure-html/unnamed-chunk-1-1.png){width=672}\n:::\n:::\n\n\n\n\n## Python\n\n:::\n\n### Start plotting\n* LO: plotting with ggplot2\n\n### Building up plots\n* LO: layering plots\n\n### Changing plots\n* LO: changing aesthetics (colour, fill, transparency, size)\n\n\n\n## Summary\n\n::: {.callout-tip}\n#### Key points\n\n- \n:::\n", | ||
"supporting": [ | ||
"04-plotting_files" | ||
], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"hash": "d4a131e91826a1b7c0f7e8f521c61159", | ||
"result": { | ||
"engine": "knitr", | ||
"markdown": "---\ntitle: Plotting data\n---\n\n\n\n\n::: {.callout-tip}\n#### Learning objectives\n\n- \n:::\n\n## Context\nWe now have a good grasp of how data is commonly structured, with variables in columns and observations in rows. This is the perfect format for visualising data.\n\n## Introducing plotting\n\nTo create a plot we'll need three things:\n\n1. data\n2. mapping aesthetics\n3. specify the type of plot\n\n::: {.panel-tabset group=\"language\"}\n## R\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code code-line-numbers=\"2\"}\nlibrary(tidyverse)\n```\n\n::: {.cell-output .cell-output-stderr}\n\n```\n── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──\n✔ dplyr 1.1.4 ✔ readr 2.1.5\n✔ forcats 1.0.0 ✔ stringr 1.5.1\n✔ ggplot2 3.5.1 ✔ tibble 3.2.1\n✔ lubridate 1.9.3 ✔ tidyr 1.3.1\n✔ purrr 1.0.2 \n── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──\n✖ dplyr::filter() masks stats::filter()\n✖ dplyr::lag() masks stats::lag()\nℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors\n```\n\n\n:::\n\n```{.r .cell-code code-line-numbers=\"2\"}\nsurveys <- read_csv(\"data/surveys.csv\")\n```\n\n::: {.cell-output .cell-output-stderr}\n\n```\nRows: 34786 Columns: 13\n── Column specification ────────────────────────────────────────────────────────\nDelimiter: \",\"\nchr (6): species_id, sex, genus, species, taxa, plot_type\ndbl (7): record_id, month, day, year, plot_id, hindfoot_length, weight\n\nℹ Use `spec()` to retrieve the full column specification for this data.\nℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.\n```\n\n\n:::\n\n```{.r .cell-code code-line-numbers=\"2\"}\nggplot(data = surveys,\n mapping = aes(x = weight, y = hindfoot_length)) +\n geom_point()\n```\n\n::: {.cell-output .cell-output-stderr}\n\n```\nWarning: Removed 4048 rows containing missing values or values outside the scale range\n(`geom_point()`).\n```\n\n\n:::\n\n::: {.cell-output-display}\n![](04-plotting_files/figure-html/unnamed-chunk-1-1.png){width=672}\n:::\n:::\n\n\n\n\n## Python\n\n:::\n\n### Start plotting\n* LO: plotting with ggplot2\n\n### Building up plots\n* LO: layering plots\n\n### Changing plots\n* LO: changing aesthetics (colour, fill, transparency, size)\n\n\n\n## Summary\n\n::: {.callout-tip}\n#### Key points\n\n- \n:::\n", | ||
"supporting": [ | ||
"04-plotting_files" | ||
], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.