Onboarding¶
Need help?
Don't worry if any tool is unfamiliar. We will review the setup together in the hands-on lab. If you run into issues, post a screenshot on the WhatsApp chat!
Before our second class meeting, please complete the following onboarding steps to get your computer ready for data science.
1. Join the Class WhatsApp Community¶
- Join via WhatsApp.
- Send a short hello message in the General channel once you've joined.
2. Create a Typst Account¶
We will use Typst throughout the course for authoring reproducible scientific papers, milestone reports, and formatted tables.
- Sign up for a free account at typst.app.
- Typst is a modern, fast, and intuitive alternative to LaTeX that lets you produce publication-quality PDFs with ease.
3. Install Your Data Science Environment (Automated Script)¶
We provide an automated setup script that installs Visual Studio Code, Python, the required VS Code extensions (Python & Jupyter Notebooks), and the core data science packages (ipykernel for interactive line-by-line execution, pandas for data management, Altair for data visualization, statsmodels for statistical modeling, and vl-convert-python for exporting figures).
-
Open the Terminal app:
- Press Cmd+Space to open Spotlight search.
- Type
Terminaland press Enter.
-
Copy and paste the following command into Terminal, then press Enter:
curl -fsSL https://raw.githubusercontent.com/mickaeltemporao/data-analysis/main/scripts/setup-mac.sh | bash -
Important details during installation:
- Xcode Tools pop-up: If a pop-up window appears asking to install "Command Line Developer Tools", click Install and wait for it to complete. Once finished, run the command above once more in Terminal.
- Password prompt: When the script asks for your Mac password (
Password: 🔑), type your computer password and press Enter. Note: For security reasons, characters will not appear on screen as you type—just type your password normally and press Enter.
-
Verify Success: Run the script until you see this final confirmation message at the bottom of the Terminal:
🎉 Setup complete! You are ready for Data Analysis.[!IMPORTANT] If you do not see this final success message, re-run the command in your Terminal.
-
Open PowerShell as Administrator:
- Right-click the Windows Start Menu button .
- Select Terminal (Admin) or Windows PowerShell (Admin).
- Click Yes if Windows prompts you to allow changes.
-
Copy and paste the following command into PowerShell, then press Enter:
irm https://raw.githubusercontent.com/mickaeltemporao/data-analysis/main/scripts/setup-windows.ps1 | iex -
Verify Success: Keep the window open while it downloads and configures your environment. Run the script until you see this final confirmation message:
🎉 Setup complete! You are ready for Data Analysis.[!IMPORTANT] If you do not see this final success message, or if any download was interrupted, simply paste and run the command again.
(I use Arch, btw! )
- Open your Terminal app.
-
Copy and paste the following command into Terminal, then press Enter:
curl -fsSL https://raw.githubusercontent.com/mickaeltemporao/data-analysis/main/scripts/setup-arch.sh | bash -
What this automated script does:
- Installs Python,
uv,git, and base tools viapacman. - Installs Visual Studio Code (
visual-studio-code-binbuilt from AUR). - Sets up an isolated course virtual environment (
.venv-da) usinguvand installs all required packages (ipykernel,pandas,altair,statsmodels,vega_datasets,vl-convert-python). - Installs VS Code Python extensions and applies beginner-friendly sane defaults (disables Copilot, enables Native REPL Smart Send, enables auto-save and word wrap).
- Installs Python,
-
Verify Success: Run the script until you see this final confirmation message at the bottom of the Terminal:
🎉 Setup complete! You are ready for Data Analysis.[!IMPORTANT] If you do not see this final success message, simply paste and run the command again.
4. Your Course Workspace in VS Code¶
When the automated setup script finishes, Visual Studio Code opens automatically with your data-analysis course folder ready in the left sidebar!
(Whenever you launch VS Code from your Applications or Start Menu in the future, it will automatically reopen straight into your data-analysis workspace).
[!IMPORTANT] Grant Workspace Trust (Avoid Restricted Mode):
If VS Code displays a pop-up window asking "Do you trust the authors of the files in this folder?", click Yes, I trust the authors.If VS Code ever opens in Restricted Mode (indicated by a banner across the top or a blue shield icon in the bottom-left status bar saying "Restricted Mode"), extensions like Python and Jupyter will be disabled and code execution will be blocked:
- Click the "Restricted Mode" banner or shield icon in the bottom-left corner.
- Click Trust (or Trust folder & enable all features).
Confirm Your Virtual Environment (.venv-da)¶
In data science, a virtual environment keeps your course packages isolated and stable. To avoid confusion with .env configuration files or your course project folder (data-analysis), our environment is named .venv-da.
Because the setup script automatically configured your workspace settings and registered the kernel, VS Code automatically selects your .venv-da environment:
- Look at the bottom-right status bar in VS Code: you should see
.venv-da(orPython ... ('.venv-da': venv)). - If it is not selected automatically:
- Open the Command Palette (press F1 or click the search bar at the very top of VS Code):
- macOS: press Cmd+Shift+P
- Windows: press Ctrl+Shift+P
- In the search box, type:
Python Select Interpreter - Click on the option containing
.venv-da.
- Open the Command Palette (press F1 or click the search bar at the very top of VS Code):
[!TIP] If you already ran the setup script during week 1 with an older environment name, simply re-run the setup script command above! The script will automatically migrate your existing environment to
.venv-daand configure all settings.
5. Verify Your Setup with an Interactive Python Script¶
In this course, we work directly with clean Python script files (.py) and an interactive line-by-line execution workflow, paired with Typst for scientific writing.
Let's test your environment to confirm that everything is working properly.
Step 1: Create a New Python Script¶
- In your open
data-analysisworkspace in VS Code, click File > New File... (or click the New File icon next toDATA-ANALYSISin the left Explorer sidebar). - Type
test.pyas the filename and press Enter. - If VS Code prompts you where to save it, choose your
data-analysisfolder.
Step 2: Paste the Test Code¶
Paste the following test code directly into your test.py editor window:
print("Hello from Python!")
# you can do some math
40 + 2
print("You're ready for Data Analysis! 🔥")
Step 3: Run Your Code Line-by-Line with Shift+Enter¶
In VS Code, you can execute code interactively one line at a time:
- Click on the very first line of code (
print("hello there")) to place your blinking cursor there. - Press Shift+Enter.
- A Python REPL terminal panel will automatically pop up at the bottom of VS Code, execute the line, and advance your cursor to the next line.
- Keep pressing Shift+Enter to step through each line of code.
Step 4: Confirm Success!¶
In the Python REPL terminal at the bottom of your screen, you should see:
Hello from Python!
42
You're ready for Data Analysis! 🔥
If you see these outputs printed in the terminal without errors, your computer is 100% ready for the course!