<p>It sounds like you're looking for flow accumulation (upstream) area, most likely.  That's imperfect for what you're looking for (e.g. doesn't account for varying infiltration rates), but it's probably the best you can do with just elevation.  From that, points with high flow accumulation area will approximate the stream network.</p>
<p>Searching for that, I didn't find anything that doesn't have any external dependencies, but I did find <a href="https://vt-hydroinformatics.github.io/rgeoraster.html" rel="noreferrer">this guide</a> entirely within R, which uses the <a href="https://cran.r-project.org/web/packages/whitebox/index.html" rel="noreferrer">R front-end</a> to <a href="https://www.whiteboxgeo.com/" rel="noreferrer">this open-source geospatial platform, whitebox</a>.  Installing whitebox is handled entirely through the R library.  Note that the guide is missing a dependency; you have to install and load the <code>rgdal</code> package too (for visualization).</p>
<p>Other than loading <code>rgdal</code>, I followed those instructions exactly and it seemed to work fine.  The high-accumulation points were a decent approximation of the actual streams in the area.</p>

CC BY-SA 4.0
2022-04-20T15:11:45.153Z
Excellent! This is what I ended up using to produce some pretty nice visuals and improve my understanding of the local water flows!
CharismaticChromoFauna
CC BY-SA 4.0
2022-04-18T18:13:52.797Z
2022-04-18T18:13:52.797Z
damp_civil
<p>As a non-specialist, enviro-enthusiast, I am curious about visualizing post-precipitation run-off in my local area. I have been able to access and download appropriate elevatio rasters for my local topography, but have not been able to find a tool or pipeline to visualize where water goes after it rains. That is, essentially, my goal.</p>
<p>I have looked at several packages in this list (<a href="https://cran.r-project.org/web/views/Hydrology.html" rel="nofollow noreferrer">https://cran.r-project.org/web/views/Hydrology.html</a>), but no vignettes or examples take me through the process using raster/elevation files.</p>
<p>Are there any straightforward walk-throughs that would let me use my existing data to generate visualizations of drainage/flow from preciptation, using previously obtained raster elevation files?</p>

<hydrology><precipitation><rainfall><watershed><r>
Easiest way to visualize precipitation drainage using raster elevation files in R?
CharismaticChromoFauna
# Easiest way to visualize precipitation drainage using raster elevation files in R?

(Asked by: username_0 on 2021-11-13)

As a non-specialist, enviro-enthusiast, I am curious about visualizing post-precipitation run-off in my local area. I have been able to access and download appropriate elevatio rasters for my local topography, but have not been able to find a tool or pipeline to visualize where water goes after it rains. That is, essentially, my goal.

I have looked at several packages in this list (<https://cran.r-project.org/web/views/Hydrology.html>), but no vignettes or examples take me through the process using raster/elevation files.

Are there any straightforward walk-throughs that would let me use my existing data to generate visualizations of drainage/flow from preciptation, using previously obtained raster elevation files?

**Tags:** hydrology, precipitation, rainfall, watershed, r


---

## 1 answers

### Answer by username_1 on 2022-04-18. Score: 5 | Accepted answer

It sounds like you're looking for flow accumulation (upstream) area, most likely. That's imperfect for what you're looking for (e.g. doesn't account for varying infiltration rates), but it's probably the best you can do with just elevation. From that, points with high flow accumulation area will approximate the stream network.

Searching for that, I didn't find anything that doesn't have any external dependencies, but I did find [this guide](https://vt-hydroinformatics.github.io/rgeoraster.html) entirely within R, which uses the [R front-end](https://cran.r-project.org/web/packages/whitebox/index.html) to [this open-source geospatial platform, whitebox](https://www.whiteboxgeo.com/). Installing whitebox is handled entirely through the R library. Note that the guide is missing a dependency; you have to install and load the `rgdal` package too (for visualization).

Other than loading `rgdal`, I followed those instructions exactly and it seemed to work fine. The high-accumulation points were a decent approximation of the actual streams in the area.

> **Comments:**
> **username_0**: Excellent! This is what I ended up using to produce some pretty nice visuals and improve my understanding of the local water flows!  

---

