Open juliasilge opened 4 months ago
Running this code requires downloading the data Josiah shared as well as a Mapbox account, but the free tier seems to work.
Running just the rdeck()
bit seems fine (no crash and displays the htmlwidget in the Plots pane) but when you add on add_polygon_layer()
it crashes. Here is a slightly more minimal example:
locs <- sf::read_sf("data/data-raw/nyc-taxi-2023-taxi/taxi-zones/taxi_zones.shp") |>
sf::st_transform(4326) |>
dplyr::mutate(geometry = wk::wk_polygon(geometry))
library(rdeck)
rdeck(
initial_view_state = view_state(
initial_exetent = wk::wk_bbox(locs$geometry),
zoom = 6.6,
bearing = -27.5,
pitch = 40.5
)
) |>
add_polygon_layer(
data = locs,
get_polygon = geometry
)
Discussed in https://github.com/posit-dev/positron-beta/discussions/198