posit-dev / posit-dev/positron

Positron window terminates unexpectedly with Mapbox in Plots pane

Open
#3,230 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: plots lang: r support
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

Discussed in https://github.com/posit-dev/positron-beta/discussions/198

Originally posted by JosiahParry May 21, 2024
Repros without fail for me:
image

Shapefile here to repro
taxi_zones.zip

# needs rdeck from github
# https://qfes.github.io/rdeck/articles/rdeck.html
# and sf, wk, and dplyr

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,
    id = "heatmap",
    coverage = 1,
    pickable = TRUE,
    auto_highlight = TRUE,
    elevation_range = c(0, 3000),
    elevation_scale = 50,
    extruded = TRUE,
    get_polygon = geometry,
    color_range = c(
      rgb(1, 152, 189, maxColorValue = 255),
      rgb(73, 227, 206, maxColorValue = 255),
      rgb(216, 254, 181, maxColorValue = 255),
      rgb(254, 237, 177, maxColorValue = 255),
      rgb(254, 173, 84, maxColorValue = 255),
      rgb(209, 55, 78, maxColorValue = 255)
    )
  )
```</div>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the supplied R reproduction with rdeck, sf, wk, and dplyr in Positron and observe the Plots pane behavior. Trace the Mapbox plot rendering path after the plot is displayed; done means the plot renders without terminating the Positron window.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
desktop-dev, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.