Skip to content

Instantly share code, notes, and snippets.

View andrewheiss's full-sized avatar
👨‍💻
#rstats-ing all the things

Andrew Heiss andrewheiss

👨‍💻
#rstats-ing all the things
View GitHub Profile

In this paper, the authors explore ████ ███████ ██ ███ ██████████ ██ ███████ ███ █████ ██████ ██ ████████ ██████ ███████████ ███ █████ ██ ██████████ ████ ██ ███████████ ████ ███ ██████ ██ ██████ █████████ █████████ █████ ███ ███ █████ ██ ███ ████ █████████ ███ ████████ █████ ████ ███ ███████████ █████████ █████ ██████████████ ███████ ██ ███ ████ ██████. This is important work!

The theory is strong and the qualitative work is well done and complements the experiment. I have some reservations and questions about the methods and analysis, but these issues are all fixable. I list my observations and comments below.


praise: This is an excellent and tightly written experiment that tests a specific, narrow, important hypothesis in a rigorous way. This is all incredibly fascinating and well done!


library(tidyverse)
library(tidytext)
library(schrute)
library(rcartocolor)
library(ggh4x)
# Get all the words as single rows
all_words <- schrute::theoffice |>
mutate(season_cat = factor(season)) |>
unnest_tokens(output = word, input = text) |>
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%)`,
library(tidyverse)
library(sf)
library(rnaturalearth)
library(ggtext)
clr_ocean <- "#d9f0ff"
clr_land <- "#facba6"
world <- ne_countries(scale = 110) |>
filter(admin != "Antarctica")
alias get_seed='curl "https://www.random.org/integers/?num=1&min=10000000&max=99999999&col=1&base=10&format=plain&rnd=new"'
---
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
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,
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
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))
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),