---
title: "Embedding tmap in RMarkdown"
output: html_notebook
---


```{r}
library(tmap)
```

# Maps made in plot mode

```{r}
tmap_mode("plot")
data(World)
tm_shape(World) +
  tm_polygons("HPI")
```
# Maps made in view mode


```{r}
tmap_mode("view")
data(World)
tm_shape(World) +
  tm_polygons("HPI", id = "iso_a3", popup.vars = TRUE)
```
