---
title: "Siraj R Notebook"
output: html_notebook
---

Introduction to:
An R package of map layers for British Columbia

```{r}
library(bcmaps)
#install.packages('bcmapsdata', repos='https://bcgov.github.io/drat/')
```

```{r}
library(bcmapsdata)
library(sf)

bc <- bc_bound()
plot(st_geometry(bc))
```

```{r}
available_layers()
```


```{r}
library(dplyr)
ws <- get_layer("wsc_drainages", class = "sf")
plot(ws["SUB_SUB_DRAINAGE_AREA_NAME"], key.pos = NULL)
```

```{r}
er <- get_layer("ecoregions", class = "sf")
er
plot(er["ECOREGION_CODE"], key.pos = NULL)
```


```{r}
rd <- regional_districts()
rd
```

```{r}
bc <- bc_bound()
plot(st_geometry(bc))
kootenays <- rd[rd$ADMIN_AREA_NAME == "Regional District of Central Kootenay"]
plot(st_geometry(kootenays), col = "lightseagreen", add = TRUE)
```

```{r}
bc <- bc_bound()
plot(st_geometry(bc))
kootenays <- rd[rd$LGL_ADMIN_AREA_ID == "60", ]
plot(st_geometry(kootenays), col = "gray", add = TRUE)
```

```{r}
cities <- bc_cities()
cities
plot(st_geometry(bc))
PG <- cities[cities$NAME == "Prince George", ]
plot(st_geometry(PG), col = "black", add = TRUE)
```

```{r}
plot(st_geometry(bc))
ALL <- cities #[cities$NAME == "Prince George", ]
plot(st_geometry(ALL), col = "red", add = TRUE)
```


```{r}
library(ggplot2)
ggplot() + geom_sf(data = bc_bound()) + geom_sf(data = bc_cities()) 

```

Excersice: Explore more about BCMAP tool and plot two further features in two plots. Make sure to give plot proper titles on x, y sides and on Top. Use different colours.

```{r}

```

