```r
# library(dplyr)
# library(rnaturalearth)
# library(sf)
# library(mapview)
# 
# nat_earth_countries<-st_as_sf(rnaturalearth::ne_countries(scale = 10))
# write_sf(nat_earth_countries,conn,"nat_earth_countries_hi")
# nat_earth_countries<-st_as_sf(rnaturalearth::ne_countries())
# write_sf(nat_earth_countries,conn,"nat_earth_countries")
# 
# nat_earth_adm1<-ne_states(country = NULL, geounit = NULL, iso_a2 = NULL, spdf = NULL, returnclass = c("sf"))
# write_sf(nat_earth_adm1,conn,overwrite=TRUE) 
# query<- "CREATE INDEX adm_ind ON nat_earth_adm1 USING GIST (geometry) "
# dbSendQuery(conn,query)
# 
# nat_earth_adm1 %>% filter(admin =="United Kingdom") %>% st_transform(27700)->nat_earth_uk
# write_sf(nat_earth_uk,conn) #Writes to the data base
# dbListTables(conn)
```