knitr::opts_chunk$set(echo = TRUE, fig.width = 9) library(tmap)
# default: no panels tm_shape(World) + tm_polygons("HPI")
# with tm_shape(World) + tm_polygons("HPI") + tm_layout(panel.show = TRUE)
# default: with panels tm_shape(World) + tm_polygons(c("HPI", "footprint"))
# without tm_shape(World) + tm_polygons(c("HPI", "footprint")) + tm_layout(panel.show = FALSE)
# default: with panels tm_shape(World) + tm_polygons("HPI") + tm_facets("continent") ### Facets defined with multiple variables, single pages ```r # default: without tm_shape(World) + tm_polygons(c("HPI", "footprint")) + tm_facets_pagewise() ```r # with tm_shape(World) + tm_polygons(c("HPI", "footprint")) + tm_facets_pagewise() + tm_layout(panel.show = TRUE)
# default: with tm_shape(World) + tm_polygons("HPI") + tm_facets("continent")
# without tm_shape(World) + tm_polygons("HPI") + tm_facets("continent") + tm_layout(panel.show = FALSE)
# default: with panels tm_shape(World) + tm_polygons("HPI") + tm_facets_grid("continent", "economy")
# without tm_shape(World) + tm_polygons("HPI") + tm_facets_grid("continent", "economy") + tm_layout(panel.show = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.