Scattermapbox cluster do not work
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- r
- Domain
- data-visualization
Research direction
Start by running the reproducible R example using the linked scattermapbox cluster reference and confirm the warning that the cluster attribute is unsupported. Compare the R result with the linked Plotly Python example; done means the R scattermapbox trace accepts the documented cluster settings and forms clusters.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Getting set up
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.
More from plotly/plotly.R
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
save_image ErrorOpen
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Similar issues
-
benchmark bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 78/100
ThinkR-open/datadiff#59 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
epiforecasts/EpiNow2#1594 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
duckdb/duckdb-r#2773 · 1 comment ·
Maintainers usually reply within 1 day