observablehq / observablehq/plot
Plot.initialize
Open
Nobody has claimed this yet.
enhancement
question
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
A debugging routine, e.g.,
function Plot_initialize(data, {transform, ...channels} = {}) {
data = arrayify(data);
let index = data == null ? undefined : Uint32Array.from(data, (d, i) => i);
if (transform !== undefined) {
({facets: index, data} = transform(data, [index]));
if (index.length) ([index] = index);
}
return {
data,
index,
...Object.fromEntries(
Object.entries(channels)
.map(([name, value]) => [name, Plot.valueof(data, value)])
)
};
}
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
The issue provides a JavaScript example for a Plot_initialize debugging routine, but names no implementation file, test, entry point, or acceptance criteria. First clarify whether this is intended as a feature and what behavior should be considered complete before locating the relevant initialization code and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100