I'm James Hayes (née McMahon) (he/him), a Principal Information Analyst for Public Health Scotland with a passion for data and its power to drive meaningful insights. My journey into the world of data started with a Maths BSc from the University of St Andrews, and since then, I've been on an exciting ride through the ever-evolving landscape of data science.
I live in the beautiful region of Perthshire, Scotland, and I'm a big advocate for remote work. Working for PHS in this way is excellent for maintaining a healthy work-life balance and ensuring I can maximize my time with my family. It also gives me the flexibility to serve my community as a retained firefighter.
When I'm not wrangling data or responding to emergencies, I enjoy exploring my hobbyist interest in Python.
Here are some of the technologies I work with:
I'm particularly proficient in R's tidyverse ecosystem for data manipulation and visualization, and I have extensive experience in mentoring and training others in these skills.
Here are some of the projects I'm proud to have worked on:
- Source Linkage Files: I played a key role in the management and development of source linkage files, which are crucial for connecting different health datasets and enabling powerful, large-scale research.
- Locality Profiles: I led the creation of locality profiles, providing detailed health and social care data at a local level to help inform decision-making and improve services.
- OctopusR: An R package for interacting with the Octopus Energy API, allowing users to easily retrieve and analyze their energy data.
- phsmethods: A collection of standardized methods for common analytical tasks in Public Health Scotland, improving efficiency and reproducibility.
- phsopendata: A package that simplifies access to data from the Scottish Health and Social Care Open Data platform.
- phslookups: A package for working with PHS lookup files.
- phstemplates: An R package for creating standardized R projects and documents at Public Health Scotland. The functionality from
phssensitivitylabelshas been incorporated into this package.
Here's a snapshot of my GitHub activity:
I prefer to be contacted by email. You can reach me at the email address associated with my GitHub account.




