# Projections

```{r setup15, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,warning = FALSE,message = FALSE)
```



```{r}

library(dplyr)
library(rnaturalearth)
library(sf)
library(mapview)
library(tmap)
```

```{r}

countries<-ne_countries(returnclass = c("sf"))


```



```{r}
coun<-st_transform(countries,4087 )
tm_shape(coun) + tm_fill() + tm_borders()  + tm_compass() +tm_grid() + tm_style_natural() -> m1
```



```{r}
coun<-st_transform(countries,4030  )
tm_shape(coun) + tm_borders() + tm_fill() + tm_compass() +tm_grid() +  tm_style("natural") -> m2
```



```{r}
coun<-st_transform(countries,"+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs")
tm_shape(coun) +
  tm_borders()  + tm_compass() +tm_grid() +  tm_style("natural") -> m3
```


```{r}

coun<-st_transform(countries,4326)
tm_shape(coun) + tm_borders()  + tm_compass() +tm_fill() +tm_grid() + tm_style("natural")  -> m4
```



```{r}
proj<-"+proj=eck4 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"
coun<-st_transform(countries,proj)
tm_shape(coun) + tm_borders()  + tm_fill() + tm_style("natural")   + tm_compass() +tm_grid() + tm_style_natural() -> m5



```


```{r}
tmap_arrange(m1, m2, m3,m4, m5)
```

