Skip to content

Jupyter notebooks for introductory Python course for the MSc program "Data Analytics for Economics and Finance" at the University of Glasgow.

Notifications You must be signed in to change notification settings

richardfoltyn/python-statistics

Repository files navigation

Python for numerical computations and data analysis

License: CC BY-NC-SA 4.0 Binder

Author: Richard Foltyn, University of Glasgow


NOTE: This repository is no longer being maintained. Please use the material hosted here instead which was prepared for a more recent, similar course.


Units

This introductory course consists of several units. Each unit corresponds to one interactive Jupyter notebook, which is also available as a static PDF file. Alternatively, you can download the entire course as a single PDF.

  1. Crash course for the impatient [PDF]
  2. Language and NumPy basics [PDF]
  3. Control flow and list comprehensions [PDF]
  4. Reusing code - Functions, modules and packages [PDF]
  5. Plotting [PDF]
  6. Advanced NumPy [PDF]
  7. Random number generation and statistics [PDF]
  8. Handling data with pandas [PDF]
  9. Data input and output [PDF]
  10. Error handling [PDF]
  11. Applications: Econometrics [PDF]

The launch binder link at the top to start an interactive notebook.


Installation

Running without installation

Click on the Binder button above to use the notebooks directly in your web browser (in might take a while to set up the environment). No local Python installation is required.

Running locally

Download the repository contents

If you are familiar with git, clone the repository:

git clone https://github.com/richardfoltyn/python-statistics.git

Otherwise, download the contents as a ZIP file by clicking on Code above.

Install Anaconda

On Windows, you need to install a local Python environment such as Anaconda. On Linux, your distribution comes with Python but the required packages are most likely outdated, so it is still recommended installing Anaconda.

Windows

Once Anaconda is installed, click on Jupyter Notebook in the Start menu and navigate to where you extracted the repository contents. Select index.ipynb to run the main notebook.

Jupyter Notebook

Linux

You need to create a new Python environment which contains all the required packages. You can use the specification provided in environment.yml to accomplish that:

conda env create -f environment.yml

Activate the virtual environment you just created:

conda activate python-statistics

To start the Jupyter notebook server, navigate to where you extracted the repository contents and run

cd path/to/repository
jupyter notebook index.ipynb

Licence

This material is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except for the data files contained in the data/ folder, which fall under the terms imposed by the original content creators.

Credits

Special thanks go to Jonna Olsson for reading through all units and suggesting various improvements.

About

Jupyter notebooks for introductory Python course for the MSc program "Data Analytics for Economics and Finance" at the University of Glasgow.

Topics

Resources

Stars

Watchers

Forks