---
title: "Chapter 04 Template"
author: "Roger Beecham"
format: html
---

## Introduction

Reopen your project and save this `.qmd` file in the top-level folder. When working through the materials from this chapter run each code chunk separately by clicking the small green arrow beside each code chunk. By default I have set `eval: false` on most code chunks, so when you knit the code chunk will not execute.

The technical element involves analysing [`stats19`](https://data.gov.uk/dataset/cb7ae6f0-4be6-4935-9277-47e5ce24a11f/road-safety-data) road crash data.

## Setup

The code block below points to the packages you need.

```{r}
#| echo: true
#| eval: false
library(tidyverse) 
library(sf) 
library(here) 
library(fst) 
library(lubridate) 
```

Bring in the pedestrian-vehicle crashses dataset (`ped_veh`) as an `.fst` file.

```{r}
#| echo: true
#| eval: false
url <- "https://vis4sds.github.io/data/ch4/ped_veh.fst"
download.file(url, here("data", "ped_veh.fst"))
ped_veh <- read_fst(here("data", "ped_veh.fst"))
```
