Skip to content

ECCC-MSC/Basin-Delineation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Introduction

These scripts were created to generate basin delineations and other value-added products from Water Survey of Canada hydrometric stations.

Installation

download the latest build from the /built subdirectory and from your R session type:

devtools::install_local(<path to *.tar.gz>)

Dependencies

Most dependencies will download automatically provided that you install using devtools::install_local from a built *.tar.gz file. Others will need to be downloaded and installed manually such as HYDAT

Code

Components

The R package consists of the following files:

  • DEM_tools.R: creates DEM mosaics from local files or from various online FTP servers (e.g. CDED, NED) after downloading them

  • geonames_db.R: For interacting with canadian geographic names database API

  • HYDROBASINS_Rscript.R: For interacting with HydroBASINS tables

  • misc.R: miscellaneous helper functions

  • SAGA_Tools.R: Wrappers for RSAGA functions, mostly those suited to basin delineation and DEM preprocessing

  • spatial_stations.R: Functions to create R Spatial* objects corresponding to hydrometric stations from ECDE table exports or the HYDAT sqlite database

  • station_names.R: Functions to parse hydrometric station names and

  • basin_creation.R: Relies on above files to create basin delineations from a few input parameters such as station names/numbers and coordinates

  • upstReam.R: Used to construct and query large matrices describing upstream/downstream hydrometric station relationships

About

An R library for rapid watershed delineation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages