The repository contains the data and code to reproduce the study "Immigrant birds use payoff biased social learning in spatially variable environments". Please consult the readme file for file descriptions and locations, and descriptions of variable names. We simulated immigration events between captive experimental populations of great tits (Parus major) to test whether spatial variability in environmental cues or payoffs affected the degree to which immigrant birds used social information. We analyzed birds' preferences before and after immigration, and used Bayesian learning models to understand the mechanisms behind change (or lack-thereof) in preferences. Behavioral data was collected using automated puzzle boxes in an experiment using captive wild-caught great tits (Parus major). The experiment took place over 2 periods: Jan-March 2021, and Jan-March 2022. All work was conducted by under a nature conservation permit and animal ethics permit from the Regierungsprasidium Freiburg, no.35-9185.81/G-20/100.