::: {.cell hash='08_Maps_cache/revealjs/unnamed-chunk-59_64938bd4ff96a21b29b5d243362a96a2'}

```{.r .cell-code}
rivers_file <- 
  "data/ne_10m_rivers_lake_centerlines.shp"
file.exists(rivers_file)
```

::: {.cell-output .cell-output-stdout}
```
[1] TRUE
```
:::

```{.r .cell-code}
if(!file.exists(rivers_file)) {
  rivers <- ne_download(
    scale="large",
    type="rivers_lake_centerlines",
    category="physical",
    returnclass = "sf"
  )
  write_sf(rivers, rivers_file)
} else {
  rivers <- read_sf(rivers_file)
}
```
:::