allow deletion of data from Heat Figs with Patch()
Nessuno ha ancora preso questa issue.
- #2837 di @justinzhu17 — chiusa senza merge
- Lingua principale
- Python
- Stelle
- 24.4k
- Fork
- 2.3k
- Merge medio
- 2g 7h
- PR unite (30g)
- 13
Descrizione
I am trying to delete some data from a heat fig, and it doesn't seem to be possible with patch. With patch, you would return something like
fig = Patch()
del fig['data'][0][x][0]
to delete the first item in the heatfig. The issue is that the heatfig has the following structure:
{ "data": [
{
"x": ["2021-12-21T19:58:00.542000", "2021-12-21T19:58:01.542000", "2021-12-21T19:58:02.542000" ],
"y": [13500.0, 13503.33591, 13506.67183 ],
"z": [[599.8054, 581.1404, 570.4771 ],
[678.9323, 644.2858, 610.9979 ],
[576.6772, 568.9164, 565.6251 ],
}]}
and so you would need to loop through each list in the z field to remove the first item as well (as the heatfig is a 3D array). We can't know ahead of time how many items are in the z field making it impossible to delete data.
Basically, if you want to remove the first timestamp in the fig, you would need the data to look like:
{ "data": [
{
"x": ["2021-12-21T19:58:01.542000", "2021-12-21T19:58:02.542000" ],
"y": [13500.0, 13503.33591, 13506.67183 ],
"z": [[581.1404, 570.4771 ],
[644.2858, 610.9979 ],
[568.9164, 565.6251 ],
}]}
I don't want to load in the whole fig as state because it is quite large (and defeats the purpose of using a Patch()).
I haven't found a work around for this yet.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Nell’issue non sono indicati file né test. Inizia riproducendo l’esempio Patch() di una figura heatmap e traccia il comportamento esistente di patch per i dati x, y e z annidati. Il lavoro è completato quando è possibile rimuovere un timestamp dalla figura, aggiornando i valori z corrispondenti, senza caricare l’intero stato della figura.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- data-visualization
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100