-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.qmd
60 lines (52 loc) · 1.68 KB
/
map.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: "Inventory Map"
format:
html:
page-layout: full
title-block-style: none
execute:
echo: false
---
```{r}
#| output: false
library(rdeck)
library(dplyr)
sf::sf_use_s2(FALSE)
works <- readr::read_rds(here::here("data", "works.rda"))
works <-
mutate(
works,
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_in_place <- dplyr::filter(works, status == "" | stringr::str_detect(status, "in place"))
# works_removed <- dplyr::filter(works, !stringr::str_detect(status, "in place"))
baltimore_city <- readr::read_rds(here::here("data", "baltimore_city.rda"))
```
```{r}
#| column: screen-inset-shaded
rdeck(
map_style = snapbox::mapbox_gallery_north_star(),
theme = "light",
initial_bounds = sf::st_bbox(baltimore_city),
picking_radius = 1,
height = 533
) |>
add_scatterplot_layer(
data = works_in_place,
get_position = geometry,
get_fill_color = scale_color_category(work_type, palette = scales::brewer_pal(type = "qual", palette = "Set2"), col_label = "Type"), # "#008385",
name = "Works",
radius_min_pixels = 4,
opacity = 0.6,
tooltip = c(title, year, location, street_address, primary_artist, work_type, medium),
pickable = TRUE
)
```
Artworks that are known to be removed or destroyed are not included in this map. The map may include artworks that are no longer present but not identified as such in the inventory. Depending on available location information, the placement of map markers may be approximate or inaccurate.