plot_mapbox: example from C Sievert's book not working when updating plotly?

I tried to recreate a map from C Sievert's great book on plotly & co (chapter 4.1.1).
Here the link.

plot_mapbox(maps::canada.cities) %>%
    x = ~long, 
    y = ~lat, 
    size = ~pop, 
    color = ~country.etc,
    colors = "Accent",
    text = ~paste(name, pop),
    hoverinfo = "text"


The example runs as expected when using his RStudio Cloud version which loads plotly
If I update the package to the latest CRAN version (which I use on my machine, 4.9.2) the example doesn't work as intended. The result only shows the dots, but no map.

Any idea how to rectify this? Many thanks!

Just to update - I think that the observed behavior is actually unintended and a bug. I therefore filed an issue at github.

Carson Sievert was quite quick and fixed the bug. See here.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.