Skip to content

kstrm/Starting-out-with-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Getting going with Python and Jupyter notebooks

Scientific python

Using Python with packages such as Numpy, Scipy, Pandas, Matplotlib, etc. (i.e., Scientific Python) is a powerful and easy way to perform scientific calculations and data analysis. Furthermore, coupling scientific Python with Jupyter notebooks makes for a fantastic way to both (1) perform calculation and (2) communicate your results and methods in an effective format. The merging of computations and communication with the Python + Jupyter notebook paring makes the combo and excellent choice for research, homework, and playing around with numbers and functions. The purpose of this repository is to help get students up and running with the basics of using Python and Jupyter notebooks for science calculations.

Running python

In the cloud

  • Google's Colaboratory (Colab) is a good free resource for collaborative, cloud-based computing. Using Python and Jupyter notebooks in Colab is a perfect place to start.

A big plus associated with running Python and Jupyter notebooks in the cloud is that you don't need to install anything on your local machine. The downsides can be that you need to be connected to the internet, at times it can be slower, and that you have reduced freedom and customization available to you in your workflow.

On your local computer

Example Notebooks

Examples-Starting-Out

The notebooks in this folder highlight basic commands in Numpy, Scipy, and Matplotlib for simple procedures such as:

  • Indexing, arrays, and loops
  • Solving functions or implicit equations
  • Plotting
  • Simple methods for approximating a derivative

Examples-Working-with-Data

The notebooks in this folder explore 15 minute and annual flow data from a USGS gaging station on the New River near Radford, VA (USGS gage 03171000 NEW RIVER AT RADFORD, VA). This set of notebooks focuses on using Pandas and demonstrates simple data analysis operations such as:

  • Reading in csv files
  • Working with DataFrames
  • Filtering
  • Plotting
  • Regression

Running the examples

You can view the files simply by clicking on the file link in the directory above. To run the notebooks, you will either need to use Colab, or you will need to install a python distribution on your computer (below you will find information on how to install python on your local machine). If you will be using Python regularly, then I suggest you install it on your local machine.

To use Colab, go to https://colab.research.google.com/. If an upload dialogue pops up, then click on the GitHub tab, past in this repository address, https://github.com/kstrm/Starting-out-with-python, and then select the "open notebook in a new tab" icon to the right of the notebook you wish to copy. Doing this will open it in Colab. Once it is open, click on the "Copy to Drive" button to make a copy that you can edit and save in our Google Drive. The notebook will be saved in the folder "Colab Notebooks." The folder will be automatically created in your drive it is not there already.

To you use your local machine you can either download the individual file or clone or download the repository as a whole.

Other Helpful Links

General

Plotting

Tutorials

About

A few files and links to help students get going with python and juypter notebooks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors