Add flowmapblue to quarto chunk
I've got a quarto website where I'm trying to add the flowmapblue plot:
#| eval: TRUE
mapboxAccessToken <- Sys.getenv("MAPBOX")
flowmapblue(locations, flows, mapboxAccessToken,
clustering = TRUE, darkMode = TRUE, animation = FALSE) -> flowmap
flowmap
When the website renders, the plot is outside of the code block and the CSS on the page gets changed. I've tried to use it with function widgetframe::framewidget() but no luck. Any general ideas would be helpful. I'm confident it can be done, because I saw it on Professor Moraga's post: https://www.paulamoraga.com/blog/2020-07-11-mobility.html.
Many thanks and love the package! It works great from the console.
Hi @RobWiederstein , I've recently noticed this problem too. I solved it with:
htmlwidgets::saveWidget(flowmap, "flowmap_widget.html")
library(shiny)
shiny::tags$iframe(src = "flowmap_widget.html", width = "100%", height = "600px")
So basically you have to dump the map into an html file and then paste it back as an iframe, sort of.
This is a workaround...
Perfect! Worked great and thanks so much!
Perhaps this should be addressed as a bug, as this is not normal behaviour for an htmlwidget, or at least we should reflect this in the documentation.