Special bindings for stars data structures
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
A good start would be to replicate the plot.stars() method (from https://github.com/r-spatial/stars)
library(stars)
etm <- st_stars(system.file("tif/L7_ETMs.tif", package = "stars"))
plot(etm)

So plot_ly(etm) would do something similar to this (automatically)
library(sf)
etm <- st_transform(etm, 3857)
band <- st_dimensions(etm)[["band"]]
n <- band$to - band$from + 1
ann <- list(x = 0.5, y = 1, yanchor = "bottom", xanchor = "middle", xref = "paper", yref = "paper", showarrow = FALSE)
plots <- lapply(seq_len(n), function(i) {
z <- t(etm[[1]][,,i])
ann$text <- paste(names(etm), i)
plot_ly(z = z[seq.int(nrow(z), 1), ]) %>%
layout(annotations = ann) %>%
colorbar(title = i)
})
subplot(plots, nrows = 2, titleX = TRUE, shareX = TRUE, shareY = TRUE)

cc @jackparmer
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by studying the referenced stars::plot.stars() behavior and the shown plot_ly(etm) and subplot() examples. Identify the existing plot_ly and subplot entry points that handle structured data, then define completion as automatic plotting of stars objects with band panels and matching annotations, colorbars, and shared axes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100