PSYC4411

Challenge Lab: Visualising
Lifestyle & Mental Health

Week 2 · Semester 1, 2026

Current Advances in Psychological Methods & Analyses

Today's Challenge

  • Create a multi-panel visualisation exploring lifestyle factors and mental health in a synthetic dataset (3,000 participants, 44 variables including DASS-21 scores)
    • Sleep, exercise, screen time, social media, caffeine, income — which matter most?
  • Try two workflows: Jupyter notebook and Python scripts
    • Neither is "better" — the point is to try both and form a preference
  • Apply the LLM Problem-Solving Loop from Week 1
    • Plan first → then code → then verify → then document
  • Prepare 1 HTML slide (~3 min) for next week

Your AI Toolkit

Use whatever AI tools you like. No rules, no restrictions. Here are some options:

Inside VS Code

  • Chat — ask questions, get code snippets, paste them in
  • Edit — highlight code, ask the AI to modify it in place
  • Agent — let the AI create files, run code, and iterate autonomously

Outside VS Code

  • Browser chatbots — ChatGPT, Claude, Gemini — copy-paste code back and forth
  • CLI tools — Claude Code, Codex — if you've installed them, go for it
  • Mix and match — use different tools for different tasks

Why Learn VS Code?

  • Browser chatbots are great for questions and quick code — but you still have to copy, paste, run, debug yourself
  • VS Code's AI features can edit your files directly, run your code, read error messages, and fix problems — a tighter loop
  • Over this semester you'll see how this scales:
    LLM → Code → Solution
    Having an AI write and run code to produce a figure, analysis, or document is more powerful and reproducible than asking an AI to generate those outputs directly
  • No pressure today — use whatever feels comfortable. But getting familiar with VS Code now pays off later
VS Code Coding Assistants
You can install extensions for Claude Code, Codex (OpenAI), and Gemini directly inside VS Code — each gives you Chat, Edit, and Agent modes. Gemini works with any Gmail account; Codex and Gemini both offer a free tier. If you hit the limit on one, just switch to another — they all work the same way.

Getting Started

Pick one workflow, or try both to see which you prefer — there's no wrong choice.

Option A: Notebook

  1. Open starter.ipynb
  2. Run the setup cells (imports, data loading)
  3. Ask the AI to plan before writing code
  4. Build your visualisation cell by cell
  5. Verify, refine, document

Option B: Scripts

  1. Ask the AI to create a plan.md
  2. Review and iterate on the plan
  3. Have the AI create a .py script
  4. Run it: python your_script.py
  5. Check the PNG, refine, document

Full details in the challenge brief: weeks/week-02-lab/README.md