library(tmap)
tmap_mode("plot") data(World) tm_shape(World) + tm_polygons("HPI")
tmap_mode("view") data(World) tm_shape(World) + tm_polygons("HPI", id = "iso_a3", popup.vars = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.