-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.qmd
46 lines (40 loc) · 878 Bytes
/
data.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: Data
format:
html:
page-layout: full
toc: false
---
## Works
```{r}
#| echo: false
#| message: false
library(gt)
library(dplyr)
sf::sf_use_s2(FALSE)
works <- readr::read_rds(here::here("data", "works.rda"))
works_df <- works |>
sf::st_drop_geometry() |>
mutate(
across(
all_of(c("title", "location", "street_address", "primary_artist", "medium")),
~ stringr::str_wrap(.x, width = 35)
),
across(
all_of(c("primary_artist", "medium")),
~ stringr::str_replace_all(.x, ",", ", ")
)
)
works_df |>
select(
all_of(c("title", "year", "primary_artist", "medium", "status", "type", "street_address", "location", "neighborhood"))
) |>
gt() |>
opt_interactive(
use_search = TRUE,
use_compact_mode = TRUE,
use_filters = TRUE,
use_resizers = TRUE,
pagination_type = "jump"
)
```