---
title: "Fires in the UK and Croatia"
author: "Duncan"
date: "5/14/2019"
output: html_document
---



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


```{r}
library(giscourse)
library(dplyr)
conn<-sconnect11()

```



```{r}
query1<-"select * from nat_earth_countries_hi where name ilike '%Brazil%'"
query2<-"select * from fires"


query<-sprintf("select f.* from (%s) c, (%s) f where st_intersects(f.geom,c.geometry)",query1,query2)

st_read(conn,query=query) -> brazi_fires


```


