Lab 0 — Environment Setup & First Orange Project
Goal
By the end of this lab you will have a working development environment and a completed Orange workflow that explores economic development data across countries. This is the foundation for every lab session that follows.
What to submit
Four items, submitted to the LMS before the end of Week 2:
- Screenshot of your Python environment running successfully: either VS Code Terminal showing the pandas version, or a Google Colab cell printing "pandas ready".
- Orange workflow file
lab0_HDI.ows— saved from your Orange session. - Screenshot of your completed Scatter Plot (GDP per capita vs. life expectancy, coloured by HDI).
- Business memo — 4–5 sentences answering the question posed in Part D below.
Part A — Python environment (VS Code, ~20 min)
VS Code is a free, cross-platform code editor. We use it to read and adapt Python/pandas scripts throughout the course.
A1. Install Python
Windows:
- Go to python.org/downloads → click Download Python.
- Open the
.exeinstaller. Tick "Add Python to PATH" at the bottom of the first screen before clicking Install.
macOS:
- Go to python.org/downloads → download the macOS package.
- Open the
.pkgfile and follow the prompts.
Verify: open Terminal (macOS) or Command Prompt (Windows) and run:
python --version
You should see Python 3.x.x. On macOS you may need python3 --version.
A2. Install VS Code
- Download from code.visualstudio.com (the page auto-detects your OS).
- Install, ticking "Add to PATH" when offered.
- Open VS Code → click the Extensions icon (left sidebar) → search Python → install the Microsoft Python extension.
- Also install the Jupyter extension.
A3. Install pandas
Open the VS Code integrated terminal (Terminal → New Terminal) and run:
pip install pandas
(macOS: try pip3 install pandas if the above fails.)
A4. Verify
Create a file test.py, paste the code below, and run it (click ▶ or right-click → Run Python File in Terminal):
import pandas as pd
print("pandas ready")
print(pd.__version__)
If the terminal prints "pandas ready" and a version number → Part A complete.
If installation fails on your machine, skip to Part B (Google Colab) — you can complete the entire course without a local Python install.
Part B — Alternative: Google Colab (~15 min)
Google Colab runs Python in your browser — no installation needed.
- Go to colab.research.google.com (sign in with a Google account).
- Click File → New notebook.
- In the first cell, type and run (
Shift + Enter):
import pandas as pd
print("pandas ready")
print(pd.__version__)
pandas is pre-installed in Colab; it will print immediately.
One of Part A or Part B is sufficient. If VS Code works, use it — it is the better long-term tool. Colab is the backup when local setup fails.
Part C — Install Orange Data Mining (~10 min)
Orange is the primary tool for this course.
- Go to orangedatamining.com/download.
- Download the standalone installer for your OS:
- Windows:
Orange3-...-x86_64.exe - macOS: choose Apple Silicon or Intel (check → About This Mac → Chip).
- Linux: use the Anaconda path (instructions on the download page).
- Windows:
- Install:
- Windows: open the
.exe. If Windows SmartScreen blocks it, click More info → Run anyway, then Next → Install. - macOS: open the
.dmg, drag Orange to Applications. First launch: right-click → Open (macOS security restriction).
- Windows: open the
- Open Orange → you see the Welcome screen → installation successful.
Orange bundles its own Python. It is independent of the Python you installed in Part A.
Part D — First Orange project: HDI dataset (~40 min)
We will build a workflow to explore the Human Development Index (HDI) — a dataset of economic and social indicators for countries worldwide (GDP per capita, life expectancy, education). This maps directly to CRISP-DM's Business Understanding and Data Understanding phases from the Week 1 lecture.
Business question: As an analyst at an international investment fund, how do countries differ in economic development, and what factors travel together with higher income?
D1. Open Orange and create a new workflow
Open Orange → Welcome screen → New (or File → New). You see a blank canvas and a widget panel on the left.
D2. Load the HDI dataset
- In the widget panel under Data, drag Datasets onto the canvas.
- Double-click the widget → search for HDI → select it → Orange downloads the data.
- Close the widget window. The widget now has data flowing from its output.
If HDI does not appear: use the File widget instead and open the file downloaded from
https://datasets.biolab.si/core/HDI.tab.
D3. View the data table
- Drag a Data Table widget onto the canvas.
- Connect Datasets → Data Table by dragging from the right edge of Datasets to the left edge of Data Table.
- Double-click Data Table to open it.
Record: How many rows (countries) and columns (indicators) does the dataset have? Click a column header to sort. Which country has the highest HDI? Which has the lowest?
D4. Descriptive statistics
- Drag Feature Statistics onto the canvas.
- Connect Datasets → Feature Statistics.
- Open it: for each numeric column, note the mean, min/max, and any missing values.
Question: Which columns have missing values? What does the gap between min and max GDP per capita tell you about global inequality?
D5. Distribution of one variable
- Drag Distributions onto the canvas.
- Connect Datasets → Distributions.
- Select HDI as the variable. Observe the shape. Then switch to life expectancy.
D6. Scatter plot — the "aha" step
- Drag Scatter Plot onto the canvas (under Visualize).
- Connect Datasets → Scatter Plot.
- Set Axis X to GDP/GNI per capita and Axis Y to life expectancy. Set Color to HDI if available.
Observe: Do points trend upward? This is correlation (Week 5). Click a point to identify the country.
D7. Save the workflow
File → Save As → name it lab0_HDI.ows.
D8. Business memo
Write 4–5 sentences answering the original question:
"The HDI dataset contains [number] countries. Development levels vary widely: HDI ranges from [min] to [max]. The scatter plot reveals that GDP per capita and life expectancy move together — wealthier countries tend to live longer. [Your observation about an outlier or interesting cluster.] For an investment fund, these findings suggest focusing on [your recommendation]."
This is the core skill graded throughout the course: turning a chart into a business sentence.
Troubleshooting
| Problem | Fix |
|---|---|
VS Code: python command not found |
Re-install Python with "Add to PATH" ticked; restart VS Code |
pip install pandas fails on Mac |
Use pip3 install pandas |
| Cannot install anything on this machine | Use Google Colab (Part B) for the whole course |
| macOS: "Orange can't be opened" | Right-click Orange → Open; or System Settings → Privacy & Security → Open Anyway |
| HDI not in Datasets widget | Download from datasets.biolab.si/core/HDI.tab and open with the File widget |
| Widgets won't connect | Drag from the right edge of the source widget to the left edge of the destination |