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?


1 Answer 1


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 entirely within R, which uses the R front-end to this open-source geospatial platform, whitebox. 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.

  • $\begingroup$ Excellent! This is what I ended up using to produce some pretty nice visuals and improve my understanding of the local water flows! $\endgroup$ Apr 20, 2022 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.