Prerequisites
Before starting this practical session, you’ll need to set up a few essential tools. Don’t worry, we’ll keep this brief!
Required reading
We recommend around 5 minutes for each of the following readings (minimum), or more if you want to work through the instructions (bonus).
Required Software
Depending on your set-up, you can use any of the following steps:
For the easiest setup and to ensure everyone is working in a consistent environment, we highly recommend using a cloud-based development environment in your browser—no local software installation required.
1. GitHub Codespaces (Recommended)
GitHub Codespaces sets up a complete VS Code development environment in your browser with all required software pre-installed:
Benefits:
- Zero Setup: No need to install anything on your local machine.
- Consistent Environment: Everyone uses the exact same tools and configurations.
- Powerful: Runs on cloud servers, providing ample computing resources.
- Accessible: Works from any modern web browser.
- GitHub Account Required: You need a GitHub account to use Codespaces.
- Free Usage Tier: GitHub Codespaces includes 60 hours of free compute time per month for all GitHub accounts (and up to 180 hours via the GitHub Student Developer Pack).
2. Alternative Cloud Platforms
If you prefer a different cloud platform or don’t have a GitHub account yet, you can also use:
- MyBinder
— Launches an interactive JupyterLab environment directly from this repository with no account or password required (note: takes 1–3 minutes to start, and temporary changes are not saved after you close the tab unless downloaded).
- Google Colab
— Fast, reliable cloud Jupyter notebooks for Python and R (requires a Google account).
- Posit Cloud — Browser-based RStudio and Positron workspaces (ideal if you are focusing on R; free tier includes 25 compute hours/month).
If you are accessing course materials from mainland China (for example, during university holidays or while working on your dissertation) where Google Colab or GitHub may be restricted or slow:
- Cloud Notebooks & IDEs: Heywhale (和鲸社区 ModelWhale), Alibaba Cloud ModelScope (阿里云魔搭社区), and Baidu AI Studio (飞桨星河社区) provide fast domestic cloud JupyterLab/IDE environments supporting Python and R with free compute tiers.
- Fast Local Package Downloads: If
pip,pixi,uv, orCRANdownloads are slow on your laptop, use the Tsinghua University TUNA Mirror (mirrors.tuna.tsinghua.edu.cn) or Alibaba Cloud Mirrors (mirrors.aliyun.com).
If you’re using AppsAnywhere(available on university computers or your own laptop):
Open AppsAnywhere on your computer
Search for and launch Anaconda (for Python)

Search for and launch VS Code or Positron
For R (optional), search for and launch R for Windows first, then RStudio

This approach is recommended if you want more control over your installations and if you plan to continue using these tools after the session:
1. Development Environment (IDE)
An IDE (Integrated Development Environment) provides a comprehensive workspace for coding. Popular options include:
For Python:
- VS Code from Microsoft - Versatile IDE with extensions for Python, R, and more
- Positron from Posit - Next-generation data science IDE supporting both Python and R
For R:
- RStudio Desktop (free) from Posit - Specifically designed for R
2. Programming Languages
Python
Python is a general-purpose programming language widely used for data science, machine learning, and AI.
To be able to run Python code in your own laptop. You have two options:
Option A - Global Python: Every project you create/use will use the same Pyhon installation and packages.
- Pros: Simple initial set up. Once installed, you run code directly without managing environments.
- Cons: Slower initial setup and fragile over time. Installing or updating a package for one module can break older projects, and sharing your exact setup with teammates or markers is difficult
- You can install Python in your system using the installers from python.org (version 3.11 or higher recommended) or via Anaconda.
Option B - Project Environments via
pixi(Recommended): Python and all required libraries are self-contained inside each project folder.- Pros: Installs in seconds, prevents dependency conflicts between assignments, and guarantees your code runs identically on anyone else’s machine.
- Cons: Requires learning a couple of basic command-line interactions.
- You will need to install
pixijust once from pixi.prefix.dev just once. We will cover how to set up a project in the first section
R (Optional)
R is another popular language for statistical computing. You can download the R installers from CRAN
Getting Help
If you encounter installation issues:
- Check the RStudio Support page
- Visit Stack Overflow for troubleshooting
- Ask during the session!
If you run into installation issues before the session, don’t spend too much time troubleshooting. We can help you during the practical!
Pre-Session Questionnaire
Once you have reviewed the setup options above, please complete the Pre-Session Questionnaire so we can tailor the sessions to your background and setup.
