Reproducible Data Analysis for Mental Health Research

Division of Psychiatry, University College London

Online

Oct 14-Nov 4, 2026

09:30-13:00

Instructors: Justin C Yang, Naomi Launders, Stephanie Wu, Yunsoo Kim

This four-session online workshop series is free to attend and is for PhD students, postdoctoral researchers, and other research staff in the UCL Division of Psychiatry.

It is a self-organised Carpentries Mix & Match workshop using selected episodes from the official Software Carpentry R for Reproducible Scientific Analysis and Plotting and Programming in Python lessons. Teaching will use live coding and practical exercises based on the Gapminder data.

Both strands begin at introductory level. Learners are strongly encouraged to attend all four sessions, as concepts and good practices are reinforced across the series. If this is not possible, learners may attend either the R or Python strand; anyone joining only the second session of a strand should already have equivalent foundational experience.

The Carpentries

The Carpentries project comprises the Data Carpentry, High-Performance Computing Carpentry, Library Carpentry, and Software Carpentry communities of Instructors, Trainers, Maintainers, helpers, and supporters who share a mission to teach foundational computational and data science skills to researchers.

This workshop uses official Software Carpentry lesson material in a self-organised Mix & Match format, selecting the R and Python episodes listed in the schedule below.

Carpentries Clippings

Want to learn more and stay engaged with The Carpentries?

Carpentries Clippings is The Carpentries' monthly newsletter, where community news, community job postings, and more are shared.

Sign up to our newsletter

Code of Conduct

Everyone who participates in Carpentries activities is required to conform to the Code of Conduct, which also outlines how to report an incident if needed.

Report a Code of Conduct Incident

Workshop Logistics

Who
PhD students, postdoctoral researchers, and other research staff in the UCL Division of Psychiatry. No previous programming experience is required for the introductory R or Python sessions.
Where

The workshop will be delivered online via Microsoft Teams. Joining instructions will be sent to registered participants before the workshop.

For learners who would prefer to attend from Maple House, rooms have been reserved as optional workspace: Room 434 on 14 October, 21 October, and 4 November, and Room 412 on 28 October. These rooms will be unstaffed, with all teaching and support provided through Teams. They are simply available as a convenient place to join the online workshop from the office.

When
14, 21, and 28 October, and 4 November 2026, 09:30–13:00 (Europe/London).
Format
Four online half-day sessions with live coding, exercises, two short breaks each morning, and regular opportunities for questions. The sessions are designed for active participation rather than passive viewing.
Cost
Free to attend.
Contact
Please email justin.yang@ucl.ac.uk with questions about the workshop.

Registration and Collaborative Notes

Registration

Registration for this workshop has now closed.

Registration Closed

Collaborative Notes

Use our shared UCL collaborative notes for questions, links, code snippets, and notes during the workshop.

Open Collaborative Notes

Carpentries Surveys

Pre-Workshop Survey

Please complete the Carpentries pre-workshop survey before your first session.

Pre-Workshop Survey

Post-Workshop Survey

Please complete the Carpentries post-workshop survey after your final session.

Post-Workshop Survey

Schedule

14 October: Getting Started with Reproducible Analysis in R

Schedule for 14 October: Getting Started with Reproducible Analysis in R
TimeTopicInstructor
Before startingPre-workshop survey
09:30Introduction to R and RStudio; Project Management With RStudio; Seeking HelpJustin
10:00Data StructuresJustin
10:45Break (10 minutes)
10:55Exploring Data Frames and Subsetting DataJustin
11:35Control FlowJustin
12:00Break (5 minutes)
12:05VectorizationNaomi
12:25Functions ExplainedNaomi
12:55Questions and recapJustin
13:00Finish

21 October: Data Wrangling, Visualisation, and Reporting in R

Schedule for 21 October: Data Wrangling, Visualisation, and Reporting in R
TimeTopicInstructor
09:30Creating Publication-Quality Graphics with ggplot2Stephanie
10:35Break (10 minutes)
10:45Data Frame Manipulation with dplyrJustin
11:35Break (5 minutes)
11:40Data Frame Manipulation with tidyrJustin
12:20Producing Reports With knitrJustin
13:00Finish

28 October: Getting Started with Python for Research

Schedule for 28 October: Getting Started with Python for Research
TimeTopicInstructor
09:30Running and QuittingJustin
09:45Variables and AssignmentJustin
10:05Data Types and Type ConversionJustin
10:25Built-in Functions and HelpJustin
10:50Break (10 minutes)
11:00LibrariesYunsoo
11:20Reading Tabular Data into DataFramesYunsoo
11:40Pandas DataFramesYunsoo
12:10Break (5 minutes)
12:15PlottingYunsoo
12:45Exercises and recapJustin
13:00Finish

4 November: Programming and Data Analysis in Python

Schedule for 4 November: Programming and Data Analysis in Python
TimeTopicInstructor
09:30ListsJustin
09:50For LoopsJustin
10:15ConditionalsJustin
10:40Looping Over Data SetsJustin
10:55Break (10 minutes)
11:05Plotting (brief recap)Yunsoo
11:20Writing FunctionsYunsoo
11:45Variable ScopeYunsoo
12:05Break (5 minutes)
12:10Programming StyleYunsoo
12:35Break (5 minutes)
12:40Wrap-UpYunsoo
13:00Finish

Setup

Please complete the relevant setup before the first session you plan to attend. Both lessons assume basic familiarity with files and folders. You will need a Mac, Linux, or Windows computer, together with an up-to-date web browser. Tablets and Chromebooks are not recommended for following the workshop exercises. If you are using a UCL-managed computer and do not have permission to install software yourself, please arrange any required installation in advance.

Microsoft Teams

The workshop will be delivered using Microsoft Teams. UCL staff and students should use the UCL Information Services Division guidance for Microsoft Teams for information about accessing Teams, signing in, meetings, and accessibility features.

Joining instructions will be sent to registered participants before the workshop. Before your first session, please check that you can sign in with your UCL account and join a Teams meeting on the computer you will use for the workshop, and that your audio is working. Headphones or a headset are recommended, particularly if you are joining from one of the shared rooms at Maple House.

Set up your workspace

Carpentries workshops are taught by live coding, so you will need to see both Teams and the software you are working in. We recommend one of the following arrangements:

The Carpentries' guidance on screen layouts for online workshops has additional suggestions.

R and RStudio

To participate in the R sessions, please ensure you have the latest version of R and RStudio installed on your computer.

Optional preparation for new or rusty R users

No previous programming experience is required, and we will teach these topics in the workshop. However, the first R session covers the introductory material relatively quickly so that we can spend more time working with data. If you are completely new to R/RStudio, or have not used them for a while, it may help to familiarise yourself with the software beforehand using the official Software Carpentry lesson.

  • Recommended: preview Introduction to R and RStudio. Focus on recognising the RStudio panes, running commands in the console and from a script, assigning values to objects, calling functions, and installing/loading packages.
  • If you have a little more time: also skim Project Management With RStudio and Seeking Help. These introduce RStudio Projects, sensible project organisation, and ways to use R's built-in help.

You do not need to complete every exercise or memorise any syntax. The aim is simply to make RStudio and the basic workflow feel familiar before we revisit them together at the start of the first R session.

Python, JupyterLab, and the Gapminder data

The Python sessions use Python 3 in JupyterLab, together with pandas and matplotlib. Please complete the setup before the first Python session on 28 October. We recommend the Carpentries' Miniforge/conda setup because it provides a consistent environment with the packages used in the lesson.

  1. Install Miniforge. Follow the Carpentries Python installation instructions for Windows, macOS, or Linux. If you are using a UCL-managed computer, arrange any installation or permissions support in advance.
  2. Create the workshop environment. Download the Carpentries environment file and save it in your Downloads folder. Then open Miniforge Prompt on Windows, or a Terminal on macOS/Linux, and run:
    cd Downloads
    conda env create -f carpentries_environment.yml
    conda activate carpentries
    If the environment already exists on your computer, you only need to activate it with conda activate carpentries.
  3. Check that Python, the required packages, and JupyterLab work. With the carpentries environment active, run:
    python --version
    python -c "import pandas, matplotlib; print('Python setup OK')"
    jupyter lab
    JupyterLab should open in your web browser. Once you have confirmed that it launches, you can close the browser tab and stop JupyterLab in the terminal with Ctrl+C.
  4. Download the lesson data. Download and unzip the Gapminder data somewhere easy to find. At the workshop, activate the carpentries environment, navigate to the folder containing the unzipped data, and start JupyterLab with jupyter lab.

If you have problems

If you are using a UCL-managed computer and need help installing software or resolving permissions or configuration issues, please contact UCL IT Services. For workshop-specific questions about which software or materials are required, contact the workshop organiser.

Accessibility

We want the workshop to be accessible and inclusive. If there is anything we can reasonably do to support your participation, please contact justin.yang@ucl.ac.uk before the workshop. For information about accessibility features in Microsoft Teams, see the UCL ISD Microsoft Teams guidance.

Recordings

Carpentries workshops are designed around live participation, coding, and exercises. Participants should therefore plan to attend in real time. Recordings are not currently planned.