Scattermapbox cluster do not work
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Clustering of scatter points on a map do not form even though the documentation indicates this should work:
https://plotly.com/r/reference/scattermapbox/#scattermapbox-cluster
It seems to work in Plotly for Python:
https://plotly.com/python/scattermapbox/
Below is a reproducible example. Please use your own mapbox token.
Sys.setenv("MAPBOX_TOKEN" = mapboxtoken)
df = read.csv('https://raw.githubusercontent.com/bcdunbar/datasets/master/meteorites_subset.csv')
fig <- df %>% plot_mapbox(lat = ~reclat, lon = ~reclong,
size=2, type = 'scattermapbox',
mode = 'scattermapbox', hoverinfo='name',
cluster = list(enabled = TRUE, step = -2, color = 'red'))
fig <- fig %>% layout(title = 'Meteorites',
font = list(color='white'),
plot_bgcolor = '#191A1A', paper_bgcolor = '#191A1A',
mapbox = list(style = 'dark'),
legend = list(orientation = 'h',
font = list(size = 8)),
margin = list(l = 25, r = 25,
b = 25, t = 25,
pad = 2))
fig <- fig %>% config(mapboxAccessToken = Sys.getenv("MAPBOX_TOKEN"))
fig
Warning message:
'scattermapbox' objects don't have these attributes: 'cluster'
Cluster formation using Plotly for Python
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Ausführung des reproduzierbaren R-Beispiels unter Verwendung der verknüpften scattermapbox-Clusterreferenz und bestätige die Warnung, dass das cluster-Attribut nicht unterstützt wird. Vergleiche das R-Ergebnis mit dem verknüpften Plotly Python-Beispiel; als erledigt gilt die Aufgabe, wenn der R-scattermapbox-Trace die dokumentierten cluster-Einstellungen akzeptiert und Cluster bildet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100