Update chapter_2.qmd

Added code to chapter 2 to download dataset from zenodo
This commit is contained in:
Jeremy Kidwell 2024-05-08 14:54:03 +01:00
parent 29fdadabf7
commit 028d55126d

View file

@ -32,6 +32,10 @@ library(here) |> suppressPackageStartupMessages()
library(tidyverse) |> suppressPackageStartupMessages()
library(haven)
here::i_am("chapter_2.qmd")
# download spotlight dataset from zenodo
if (file.exists(here("example_data", "climate_experience_data.sav")) == FALSE) {
download.file("https://zenodo.org/records/11130201/files/climate_experience_data.sav", destfile = here("gits", "spotlight-report", "data", "climate_experience_data.sav"))}
climate_experience_data <- read_sav(here("example_data", "climate_experience_data.sav"))
```