Downloads USGS river and waterbody data for a given extent, processes that data, and makes a map of the rivers where the width of the river is proportional to the area of land it drains.
Find a file
2024-01-01 21:08:38 -06:00
.gitignore ignore figures 2023-10-18 14:11:36 -05:00
01_set_extent.R clarified comments 2023-10-29 15:13:00 -05:00
02_download_data.R clarified comments 2023-10-29 15:13:00 -05:00
03_process_data.R split up scripts into 4 to avoid repitition 2023-10-27 15:57:03 -05:00
04_make_figures.R added rscript 05_make_cnc_figures.R 2024-01-01 21:07:01 -06:00
05_make_cnc_figures.R added rscript 05_make_cnc_figures.R 2024-01-01 21:07:01 -06:00
example.png excluded figures from git repo to reduce repo size 2023-10-18 14:11:36 -05:00
extent.csv added rscript 05_make_cnc_figures.R 2024-01-01 21:07:01 -06:00
extent_olympic.csv changed political boundary data 2023-10-18 14:11:36 -05:00
extent_wa.csv changed political boundary data 2023-10-18 14:11:36 -05:00
extent_wi.csv changed political boundary data 2023-10-18 14:11:36 -05:00
LICENSE Initial commit 2023-10-15 21:12:27 -05:00
pretty_rivers.Rproj initial commit 2023-10-18 14:11:35 -05:00
README.md added rscript 05_make_cnc_figures.R to README 2024-01-01 21:08:38 -06:00

pretty_rivers

Downloads USGS data for a given location and makes a pretty map of the rivers. The width of the rivers is proportional to the area of land that the section of river drains.

To run :

  1. Clone the repository
  2. Edit the extent of the map you want to produce in extent.csv. Include lat/long coordinates of two opposite corners (i.e. top-left and bottom-right).
  3. Run the scripts:
    • 01_set_extent.R - This script sets the data directory and loads the extent from extent.csv.
    • 02_download_data.R - This will take the longest. It downloads the data to a data/ directory in the repo. The whole of Wisconsin downloads ~12GB of data. This script can be skipped after you have already downloaded the data, and the extent is within what you downloaded.
    • 03_process_data.R - This loads and processes the data. After the initial run downloading the data for a given extent, you can start with this script.
    • 04_make_figures.R - This generates figures in the figures/ directory in the repo.
    • 05_make_cnc_figures.R - This generates svg files in the figures/ directory for use in laser cutters and other cnc machines

required packages/libraries installed:

  • R
  • nhdplusTools
  • sf
  • tidyverse
  • svglite

Example figure

example figure