2020-03-17 11:33:48

Preliminaries

Announcements

Today’s topics

  • Be multi-lingual!
  • Introduction to Python
  • Introduction to Jupyter

Be multilingual!

What to learn

  • R
  • HTML, CSS
  • Shell scripting
  • Python
  • MATLAB

Why/how

  • Computer languages are similar, have strengths & weaknesses
  • Comprehension before production (read code before you write it)

Introduction to Python

Zen of Python

  • Beautiful is better than ugly.
  • Explicit is better than implicit.
  • Simple is better than complex.
  • Complex is better than complicated.
  • Readability counts.

Fun facts

  • Released in 1991
  • Supports imperative, object-oriented, and functional programming paradigms
  • Syntax makes extensive use of white space

Python:

def mult_by_two(x):
  x * 2

R:

mult_by_two <- function(x) {
  x * 2
}

  • Uses = for assignment (vs. R’s <-)

https://www.tiobe.com/tiobe-index/

Full-service programming language

  • Scientific programming
  • Web programming (Django)
    • Instagram, Disqus, Mozilla, Bitbucket, Open Science Framework (OSF)

Introduction to Jupyter notebooks

Resources

About Jupyter

  • Literate programming documents (code + text + images + …) in your browser
  • Began as interactive Python (iPython)

Getting to Juptyer

Walking through a simple notebook

Your turn

Try this

  • Connect to PSU VPN via Cisco AnyConnect, then
  • Install Python on your local machine; install Jupyter & launch it.

Next time…

  • Tools for reproducible data-gathering