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.
| .gitignore | ||
| 01_set_extent.R | ||
| 02_download_data.R | ||
| 03_process_data.R | ||
| 04_make_figures.R | ||
| 05_make_cnc_figures.R | ||
| example.png | ||
| extent.csv | ||
| extent_olympic.csv | ||
| extent_wa.csv | ||
| extent_wi.csv | ||
| LICENSE | ||
| pretty_rivers.Rproj | ||
| README.md | ||
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 :
- Clone the repository
- 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). - Run the scripts:
01_set_extent.R- This script sets the data directory and loads the extent fromextent.csv.02_download_data.R- This will take the longest. It downloads the data to adata/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 thefigures/directory in the repo.05_make_cnc_figures.R- This generates svg files in thefigures/directory for use in laser cutters and other cnc machines
required packages/libraries installed:
RnhdplusToolssftidyversesvglite
