Introduction to Python

Brief History

  • Created in the late 1980's
  • by Guido van Rossum - Benevolent Dictator For Life
  • Python 2.0 into the Naughties
  • A move to transparancy and a community driven language
  • Python 3.0 was released in 2008
  • Update to the 'modern way' of doing things
  • Object-oriented programming

Python philosophy

  • Borrow ideas from elsewhere whenever it makes sense.

"Things should be as simple as possible, but no simpler." (Einstein)

  • Do one thing well (The "UNIX philosophy").
  • Don't fret too much about performance - plan to optimize later when needed.

Python philosophy (continued)

  • Don't fight the environment and go with the flow.
  • Don't try for perfection because "good enough" is often just that.
  • (Hence) it’s okay to cut corners sometimes, especially if you can do it right later.

Python applications

Institutional support includes:

  • UK Met Office
  • British Atmospheric Data Centre (BADC)
  • Cefas
  • National Centre for Atmospheric Science (NCAS)
  • European Centre for Medium-Range Weather Forecasts
  • EUMETSAT
  • US National Center for Atmospheric Research (NCAR)
  • many-many more

Adopting Python as the main computing tool encourages better coding practices, efficient data analysis and open-access research, helping scientific community reduce the so-called reproducibility crisis.

Scientific Python stack

  • NumPy provides efficient storage and computation for multi-dimensional data arrays.
  • SciPy contains a wide array of numerical tools such as numerical integration and interpolation.
  • Pandas provides a DataFrame object along with a powerful set of methods to manipulate, filter, group, and transform data.
  • Matplotlib provides a useful interface for creation of publication-quality plots and figures.

To tap into the power of this data science ecosystem, we will spend the first day on becoming familiar with Python language itself.

References

A Whirlwind Tour of Python by Jake VanderPlas (O’Reilly). Copyright 2016 O’Reilly Media, Inc., 978-1-491-96465-1