mhweber / ICRW8_Geospatial_Workshop

Working with Geospatial Hydrologic Data for Watershed Analyses in R and Python Using Web Services
https://mhweber.github.io/ICRW8_Geospatial_Workshop/Slides.html
11 stars 3 forks source link

ICRW8_Geospatial_Workshop

Material for the 'Working with Geospatial Hydrologic Data for Watershed Analyses in R and Python Using Web Services' ICRW8 Workshop.

Leafmap demo material here:

Video

Notebook

Python workshop slides here:

Binder

Dam Impact Exercise in Python:

Colab

Getting Started

R

For working with R, you can use RStudio and you will need the following libraries installed:

library(remotes)
library(sf)
library(lwgeom)
library(ggplot2)
library(jsonlite)
library(httr)
library(data.table)
library(dplyr)
library(readr)
library(knitr)
library(rnaturalearth)
library(stringr)
library(osmdata)
library(mapview)
library(dataRetrieval)
library(terra)
library(raster)
library(stars)
library(remotes)
library(elevatr)
remotes::install_github("mhweber/awra2020spatial")
library(awra2020spatial)
remotes::install_github("mhweber/Rspatialworkshop")
library(Rspatialworkshop)
remotes::install_github("mikejohnson51/AOI")
#hydroloom
remotes::install_github("DOI-USGS/nhdplusTools@2cb81da"
library(hydroloom)
library(AOI)
library(terrainr)
#StreamCatTools
remotes::install_github("USEPA/StreamCatTools")
library(StreamCatTools)
#nwmTools
remotes::install_github("mikejohnson51/nwmTools")
library(nwmTools)
library(cowplot)
# zonal
# remotes::install_github("NOAA-OWP/zonal")
library(zonal)

Python

For running Python notebooks you can use a combination of Miniforge or Mambaforge and Jupyter Lab or other IDE.

After installingminiforge or mambaforge you can create a Python environment as follows:

git clone https://github.com/mhweber/ICRW8_Geospatial_Workshop && \
cd ICRW8_Geospatial_Workshop && \
conda env create -f environment.yml

or

git clone https://github.com/mhweber/ICRW8_Geospatial_Workshop && \
cd ICRW8_Geospatial_Workshop && \
mamba env create -f environment.yml

Now a new environment called icrw8 is created that can be loaded from your IDE. You can also use the Binder service by clicking on the Binder badge above to launch a Jupyter Lab instance with all the required Python libraries installed.

Resources

Here is a list of some useful geospatial tools and resources:

General

R

Python