Skip to main content
Queen Mary Academy

Generative AI Coding in Climate Analyses

An abstract image of the planel earth on a black background with lines of code superimposed on the top in places
Image by Pete Linforth from Pixabay
Profile photo of Dr Heather Ford

Dr Heather Ford

NERC Independent Research Fellow, Reader in Environmental Science

Climate Change in Practice is a module in the School of Geography open to BSc, BA and Associate Students. The module introduces students to coding and analysing climate model data for future climate scenarios. They consider the social and environmental impact of future climate change on a global and regional scale.

Responding to a need

Many of our dissertation students are interested in analysing climate modelling data to understanding how climate change will impact communities and the environment. However, students frequently lack the coding skills necessary to manipulate climate modelling data. This module provides the scaffolding necessary to analyse temperature and precipitation climate model data. 

This project is aligned with Queen Mary’s 2030 Strategy for Education and Student Experience, as well as the Russell Group Principles on the use of generative AI tools in education. To assist with coding, a series of self-paced generative AI exercises were created to practice effective prompts using AI. As using generative AI is an emerging skill, effective prompt use is a desirable characteristic for employability. Furthermore, the data analysis and coding are marketable skills for employers.

This Queen Mary Academy Fellowship project also addresses three of the five points raised by the recent Russell Group principles on the use of generative AI tools in education:

  1. Universities will support students and staff to become AI-literate
  2. Staff should be equipped to support students to use generative AI tools effectively and appropriately in their learning experience 
  3. Universities will work collaboratively to share best practice as the technology and its application in education evolves

The Approach

A figure behind a laptopDuring this Fellowship, I created six student-paced exercises for using generative AI tools to assist in coding. This aimed to develop autonomous learning by the students in line the with ACE approach and explore an emerging field of AI and using AI effectively.

Deciding on student-paced learning content

Coding from scratch is a relatively complex task but AI assisted coding can help accelerate data analyses and visualization. I decided students should do a range of exercises including:

  1. How to Use AI for Coding
  2. Importing Data
  3. Doing Calculations
  4. Plotting Time Series
  5. Modifying Plot Colours
  6. Modifying Plot Axes

In this approach the students were given a set of data that they could analyse and plot in R Studio.  This mirrored the tasks they were asked to complete as part of their assessment for the module. So essentially, they would be able to practice the skills necessary to do well on the assessment.

Developing student-paced content

Coding is not a skill I had taught students before, so I was a little uncertain as to the best practices. Dr Usman Naeem was an invaluable resource and I’m grateful that Graeme Hathaway from Queen Mary Academy connected us. Usman shared his own examples of implementing AI in his coding classes in EECS. Although the level of coding ability is vastly different in EECS than the School of Geography, his examples included reflective exercises and critical evaluation of AI-generated code – which is exactly what is necessary for effective AI use. Using Usman’s approach, I created the student-paced exercises in the six topics above. In the exercises, students were asked to input a prompt to a generative AI tool, rate the quality of the code, perform an analysis of the code (weaknesses, strengths), and implement the code in R Studio.  

Implementing the student-paced exercises

At first Google Bard was chosen for student use. However as the student-paced exercises were being developed Google switched to Gemini and students in the UK had difficulty accessing Gemini. I have since switched the Microsoft Copilot as an example AI-tool through the exercises but encourage students to use the tool they find most useful.  

I initially used the Lesson feature on QMPlus as it enables quantification of engagement. However, the students and I found this clunky and not a useful method. I switched to worksheets.

Engagement with these student-paced lessons was lower than anticipated, probably because of their formative nature. This highlights an opportunity to explore strategies that enhance motivation and demonstrate the value of these exercises beyond summative assessment.

Coding is an important skill to learn for Environmental Analysis careers and this was a good easy way to grasp the basic concepts of it
— Student Sem A 2024/25

Impact

During the module, students were provided and guided through implementing a skeleton code to make maps of climate variables (temperature and precipitation). In addition to directing the students to the student-paced exercises, throughout the module I encouraged the use of AI to modify the code and improve the visualization of the data and thus the assessment. I also encouraged them to use R Studio in their data analyses in other modules.

Short-term benefits

Whether through engaging with the student-paced activities or just the general encouragement of AI use, many students used AI to modify their code and improve the visualizations in their assessments. 

Medium-term outcomes

Students used R Studio and their coding ability to do data analyses, including box plots, in their other coursework. They were using the coding skills introduced and developed in my module in their other modules. In a module evaluation a student wrote “Coding is an important skill to learn for Environmental Analysis careers and this was a good easy way to grasp the basic concepts of it” (SEM1, 2024-2025) and another wrote “it's a highly relevant module to learn - links to a highly important issue the world faces today. there is a range of different ways to learn - lectures, AI, videos.” (SEM2, 2023-2024).

Longer-term impact

Students are now using R Studio in their final year dissertation projects and using climate data as part of their analyses. The first cohort will submit their dissertations in April 2025. Aside from their dissertations, they have learned a skill that improves their employability.

It's a highly relevant module to learn - links to a highly important issue the world faces today. There is a range of different ways to learn - lectures, AI, videos.
— Student, Sem B 2023/24

Recommendations

I have several recommendations:

  1. Student-paced learning should probably be part of a student’s overall mark. I think the load-bearing could be small but students lead complex lives so if they don’t see how it translated into an immediate impact on their mark they generally do not do the exercises.
  2. Developing a tool or best practice for coding exercises through the QMPlus platform so that engagement can be tracked
  3. Unless a specific AI-tool is industry standard (like Github, Co-Pilot), allow the students flexibility to use an AI-tool that works for them.

Dr Heather Ford

Queen Mary Academy Fellow 2023/24

Email Dr Heather Ford
Back to top