How to harmonise datasets collected by different partners
Use Case Overview
Collaborative research projects often involve partners collecting similar data independently. Differences in variable definitions, units, coding and file formats can make it difficult to analyse these datasets together. Harmonisation aligns comparable data with agreed definitions and structures so they can support joint analysis.
Partners first agree on which variables they need for the joint analysis. They compare available dataset descriptions to assess whether the variables are comparable and then agree on how the relevant data may be accessed and used. They document the transformations and any remaining differences so the analysis team can interpret the harmonised data and reproduce the process.
Examples
Our multicentre study combines data that two partner hospitals collected independently, including height and other baseline measurements. I want to harmonise these data elements so that we can analyse both datasets together under agreed access conditions.
Complexity
Medium
Key Experts
Researcher, Data steward, Research software engineer, Data scientist, ELSI expert, Project manager
Outcome
Harmonised dataset
Your Journey
Understand and compare partner datasets
Agree on which variables are needed for the joint analysis.
Collect the available dataset descriptions and codebooks and make them available to the project team.
Compare variable definitions, units and collection methods to identify which variables are sufficiently comparable for joint analysis.
Examples
Researcher
I collect the partners' codebooks. Partner A records height in centimetres and Partner B in metres. I also find that the partners use different codes for missing values.
Agree on conditions for joint use
Confirm with each partner whether their data can be used for the planned joint analysis.
Check the consent and institutional rules that apply. For personal data, include applicable GDPR requirements.
Agree who can access the data, where the data can be processed and which agreements are needed.
Put any required approvals and agreements in place before accessing or transferring the data.
Examples
Researcher
I discuss the planned analysis with partner data stewards. We agree that the analysis team will use the data in the project's approved environment once the required agreements are in place.
Guidance steps
Define access conditions
Define and document the conditions under which data can be accessed and reused, including access levels, policies, licences and agreements, ensuring compliance with legal, ethical and FAIR requirements.
View step details
Agree on a common standard and map the datasets
Agree on shared variable definitions, units and a common data structure that fit the planned analysis and intended use. Aim to reuse established standards when they fit, keeping your FAIR objectives in mind. Record the agreed definitions in a shared codebook.
Create a mapping table that links each partner's variables to the corresponding variables in the harmonised dataset. Record any conversion or recoding rules. Document how variables that cannot be made comparable will be handled.
Consider expressing the shared codebook as machine-readable validation rules, for example with Pydantic, so that the harmonised data can be checked automatically.
Examples
Researcher
We agree to record height in centimetres. The mapping table links both partners' height variables to the shared height variable and specifies the conversion for Partner B.
Guidance steps
Apply common data elements
Identify, select and apply common data elements to standardise data collection and improve interoperability, data quality and reuse.
View step details
Transform the partner datasets
Apply the agreed mappings, including unit conversions, recoding and changes to the data structure.
Preserve the source dataset versions and record the transformations so they can be repeated.
Examples
Researcher
The Research software engineer runs a script that converts Partner B's height values from metres to centimetres. A value of 1.72 metres becomes 172 centimetres in the harmonised dataset.
Check the harmonised data
Check whether the transformed data follow the agreed definitions and structure, using your validation rules if you set them up. Compare a sample of transformed records with the source data.
Investigate unexpected values, missing data or changes in record counts with the relevant partners.
Correct errors and document any remaining limitations that may affect the analysis.
Examples
Researcher
The check flags several height values of 999 centimetres. Partner A confirms that 999 was used to indicate a missing value. We update the mapping and rerun the transformation.
Prepare the harmonised data for joint analysis
Finalise the data version for joint analysis and its supporting documentation, including the shared codebook, mapping table and transformation records.
Make the data and documentation available to authorised project partners under the agreed conditions.
Examples
Researcher
I save the version that will be used for the joint analysis and make it available to the team with the shared codebook, mapping table and scripts.
+1
The harmonised data are ready for joint analysis
The analysis team can use the harmonised data under the agreed access conditions. The documentation shows how each partner's data were transformed and records any remaining limitations. Both structural and resource-level metadata can subsequently be made available if this is part of the objectives.
Guidance steps
Register resource level metadata
Make resources findable by selecting appropriate metadata catalogues and registering consistent, well-defined resource-level metadata.
View step details
Register structural metadata
Publish and enhance a codebook or data dictionary by selecting suitable repositories and formats to make the data understandable and reusable.
View step details