๐Ÿ“‹ Getting Ready

2023/24 Winter Term

Author

On this page, you will find information on how to set up your computer for this course, as well as practical advice on Python programming.

Set up your computer

Below you will find links to download and install the software that you will need for this course. If you prefer a more detailed guide, you can follow this guide created by our colleague Michael Wiemers from the LSE Digital Skills Lab.

Important

LSE Digital Skills Labs are also offering in-person workshops at the start of the 2023/24 Winter Term. We STRONGLY recommend you take these workshops if you are brand new to programming in Python or need a refresher.

1. Install the bash terminal

Coding is like having a conversation with your computerโ€™s hardware, such as the CPU, memory, and hard drive, instructing it on what to do. Programming languages like Python offer a high-level way to communicate with the computer, making it more accessible. However, understanding how to communicate with the computer at a fundamental level is essential. For instance, you should know how to run a Python script or install a new Python package. This is where the terminal comes into play.

You will first encounter the Terminal in the ๐Ÿ’ป Week 01 lab, with the help of your lab teacher. But things might make more sense after the ๐Ÿ—“๏ธ Week 01 lecture, where we will explain precisely what it is and how it works. The following instructions will guide you through installing a specific Terminal app called bash on your computer.

Windows logo Windows users

๐ŸŽฏ ACTION POINTS

  1. Download Git for Windows. It is very likely that you will need the 64-bit Git for Windows Setup version.

    Git is a central tool in this course but we will only start using it in Week 03. We ask you to install it now because it comes with a terminal called bash that you will need for your first lab session in Week 01.

  2. Run the installer and follow the instructions. You can accept all the default settings.

  3. Once the installation is complete, open the Git Bash app. You can find it by typing โ€œGit Bashโ€ in the Windows search bar.

Apple logo macOS users

๐ŸŽฏ ACTION POINTS

  1. Open the terminal

  2. Now, to ensure you are using the bash shell, type the following and hit ENTER:

    echo $SHELL

    You can move to the next step if you see the following message on the terminal screen.

    /bin/bash
  3. If, instead, you saw the message below:

    /bin/zsh

    Then your computer came pre-packed with a different terminal called Z Shell. Read and follow the instructions in this tutorial to change your shell to bash 1.

2. Install Python

Python is a general-purpose programming language that is becoming increasingly popular in the social sciences. It is free and open-source and runs on Windows, Mac OS X, and Linux.

๐Ÿ”— Link: Download Python from the Python Software Foundation.

3. Install miniconda

Just installing Python is not enough. You also need to install a lot of additional packages to be able to do data analysis in Python. The easiest way to do this is to install miniconda, a free and open-source package manager that allows you to install, run, and update Python packages.

๐Ÿ”— Link: Download miniconda from the miniconda installation webpage.

Note: if you already have some experience with Python and have installed Anaconda, you can skip this step. Anaconda and miniconda are very similar, but Anaconda comes with a lot of additional packages that you probably donโ€™t need and therefore uses more disk space. That is why we recommend using miniconda instead.

4. Install an IDE

Once you download Python, you can start using it straight away. All you need to do is type python (or python.exe if you are on Windows) in your terminal to start the Python interpreter. You can also write your Python scripts in any text editor and run them from the terminal with the python command. However, it is much more convenient to use an integrated development environment (IDE) that provides a graphical user interface (GUI) to Python.

In this course, we will use Visual Studio Code. Follow the instructions below to install it on your computer.

VS Code

Visual Studio Code (VS Code) is a very popular free and open-source IDE developed by Microsoft. It supports many programming languages, including Python, and comes with a lot of useful features, such as syntax highlighting, code completion, and debugging.

๐Ÿ”— Link: Download Visual Studio Code from the VS Code website.

๐Ÿ”— Link: Download the Python Extension for VS Code. Donโ€™t forget to read the examples contained on that page to learn how to use the extension.

Tip

VS Code is very flexible.

You can install many extensions to add new features to the IDE. For example, you can install the GitHub Copilot extension to get AI-powered suggestions as you write your code or the Grammarly extension to check your spelling and grammar. You can find a list of the most popular VS Code extensions here.

5. GitHub and GitHub Copilot

GitHub is a developer platform which is used by teams across industries to collaborative on data science projects! It uses Git, a version control software, to keep track of changes to projects, managing tasks, bug tracking, feature requests and many more wonderful things. In DS105W, you will get very familiar with GitHub as we will use it for assignments and group work - which is great as itโ€™s a very commonly used platform by data scientists.

GitHub also an AI-based autocompletion software called GitHub Copilot (like Grammarly for code), which is free for students (otherwise, you have to pay a monthly fee). Yay!

๐ŸŽฏ ACTION POINTS

You can go ahead and create a GitHub account, but I have a few extra tips on this:

1. People often use GitHub even after their studies. GitHub is commonly used to keep a portfolio of your coding skills. So, because of this, we suggest you register an account with GitHub using your personal e-mail address so you can stay in it in the future.

2. Choosing a good (professional-sounding๐Ÿ‘ฉโ€๐Ÿ’ผ) username is also a good idea

3. Then, go to GitHub Education and sign up for the Student Pack (๐ŸงญAt the top of the page, click on Student -> Student Developer Pack, and follow the instructions from there). GitHub itself is free, but the student pack will give you free access to a set of paid tools - some of which we will use in the course. Here, you will have to provide evidence that you are a student at LSE.

4. It might take a few days/weeks for your application to succeed. You wonโ€™t have free access to GitHub Copilot until then - but itโ€™s all good, because we will only use Copilot after W06!

Now you can start exploring the wonderful world of GitHub public repositories. (Whatโ€™s a repository? Have a read here)

Footnotes

  1. Curious about the different shells on Mac ๐Ÿค“ ? Checkout the full article on โ€œLearn Enough Tutorials: Using Z Shell on Macsโ†ฉ๏ธŽ