wo main ways to creating a <strong>plotly</strong> object: either by transforming a <strong>ggplot2</strong> object (via <code>ggplotly()</code>) into a <strong>plotly</strong> object or by directly initializing a <strong>plotly</strong> object with <code>plot_ly()</code>/<code>plot_geo()</code>/<code>plot_mapbox()</code>. Both approaches have somewhat complementary strengths and weaknesses, so it can pay off to learn both approaches. Moreover, both approaches are an implementation of the Grammar of Graphic