library(tidyverse)
library(ggdiagram)
rect_width <- 1.75
rect_height <- 0.6
clrs <- MetBrewer::met.brewer("Tam")
# set_default_arrowhead(ggarrow::arrow_head_wings(offset = 30, inset = 60))
This file contains hidden or 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
| library(tidyverse) | |
| # Download the annual HadCRUT.5.1.0.0 data from | |
| # https://www.metoffice.gov.uk/hadobs/hadcrut5/data/HadCRUT.5.1.0.0/download.htm | |
| hadcrut <- read_csv( | |
| "HadCRUT.5.1.0.0.analysis.summary_series.global.annual.csv" | |
| ) |> | |
| rename( | |
| anomaly = `Anomaly (deg C)`, | |
| conf_low = `Lower confidence limit (2.5%)`, |
This file contains hidden or 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
| library(tidyverse) | |
| library(sf) | |
| library(rnaturalearth) | |
| library(ggtext) | |
| clr_ocean <- "#d9f0ff" | |
| clr_land <- "#facba6" | |
| world <- ne_countries(scale = 110) |> | |
| filter(admin != "Antarctica") |
This file contains hidden or 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
| alias get_seed='curl "https://www.random.org/integers/?num=1&min=10000000&max=99999999&col=1&base=10&format=plain&rnd=new"' |
This file contains hidden or 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
| --- | |
| title: "Cross reference fun times" | |
| crossref: | |
| custom: | |
| - kind: float | |
| key: appfig | |
| latex-env: appfig | |
| reference-prefix: Figure A | |
| space-before-numbering: false | |
| latex-list-of-description: Appendix Figure |
This file contains hidden or 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
| library(tidyverse) | |
| # Here's some state-level data | |
| some_state_data <- tribble( | |
| ~state, ~something, | |
| "Wyoming", 5, | |
| "North Carolina", 9, | |
| "Nevada", 10, | |
| "Georgia", 3, | |
| "Rhode Island", 1, |
This file contains hidden or 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
| library(tidyverse) | |
| library(sf) | |
| library(rnaturalearth) | |
| # World map | |
| world <- ne_countries(scale = "medium") |> | |
| filter(adm0_a3 != "ATA") |> | |
| st_transform(crs = "+proj=merc") | |
| # The center of the map is off the coast of Sardegna |
This file contains hidden or 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
| library(tidyverse) | |
| library(ggtext) | |
| library(patchwork) | |
| library(scales) | |
| top_plot <- ggplot(penguins, aes(x = body_mass)) + | |
| geom_histogram(binwidth = 100, color = "white", boundary = 0) + | |
| scale_x_continuous( | |
| breaks = seq(2500, 6500, by = 1000), | |
| limits = c(2500, 6500), |
This file contains hidden or 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
| library(tidyverse) | |
| library(ggpattern) | |
| publication_names <- c( | |
| "Juvenile Instructor" = "J/I", | |
| "Der Ster" = "NE", | |
| "Der Wegweiser" = "GM", | |
| "Juvenile Instructor + Der Ster" = "J/I;NE", | |
| "Juvenile Instructor + Der Wegweiser" = "J/I;GM" | |
| ) |
library(tidyverse)
library(broom)
library(gapminder)
gapminder
#> # A tibble: 1,704 × 6
#> country continent year lifeExp pop gdpPercap
#> <fct> <fct> <int> <dbl> <int> <dbl>
#> 1 Afghanistan Asia 1952 28.8 8425333 779.
#> 2 Afghanistan Asia 1957 30.3 9240934 821.NewerOlder