Skip to content

Sample codes for the hydrology course offered at Princeton University

Notifications You must be signed in to change notification settings

XiaogangHe/Princeton-CEE306

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dive into hydrology using Python

Tools you'll need

For Mac users, we highly recommend installing Anaconda (Python 2.7 version) as you can use its package manager (called "conda") to easily install and update packages 😄. For example, open your terminal window and type the following commands to install the above mentioned packages:

  • conda install R
  • conda install rpy2

For Windows users, you may need to install these packages separately 😦.

  • To install rpy2, download the Windows Binaries for rpy2 [here] (http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2) based on your computer architecture. Launch the Command Prompt and type pip install SomePackage-1.0-py2.py3-none-any.whl to install the downloaded .whl files. Please make sure that you have the latest version of pip. You can upgrade pip using python -m pip install --upgrade pip.
  • Change Path for R. Go to advanced and system setting -> environment variables
  • In the user variable field, add C:\Program Files\R\R-3.0.2\bin\x64 to the path
  • In the system variable field, add three new variables:
    • Create a R_HOME system variable with a value similar to C:\Program Files\R\R-3.2.0
    • Create a R_USER system variable with your user name C:\Users\"your user name"
    • Create a R_LIBS_USER system variable with a path to the folder where external R packages are/will be installed. You can find the path through the command .libPaths() in the R environment.

Let's get started!

  1. Get the GitHub repository
    • Use the command line: git clone git@github.com:XiaogangHe/Princeton-CEE306.git
    • Or download the repository as a .zip file
  2. Run the notebook
    • Open your terminal and type: jupyter notebook

Resources

Learn IPython well

Learn Pandas well

Cheat sheets

Bookmark these cheat sheets:

Questions, answers, chats

Ask questions related to Python on StackExchange stats.stackexchange.com – python.

About

Sample codes for the hydrology course offered at Princeton University

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published