Liver fluke infection causes serious disease (fasciolosis) in cattle and sheep in many regions of the world, resulting in production losses and additional economic consequences due to condemnation of the liver at slaughter. Liver fluke depends on mud snails as an intermediate host and infect livestock when ingested through grazing. Therefore, environmental factors play important roles in infection risk and climate change is likely to modify this. Here, we demonstrate how slaughterhouse data can be integrated with other data, including animal movement and climate variables to identify environmental risk factors for liver fluke in cattle in Scotland. We fitted a generalized linear mixed model to the data, with exposure-weighted random and fixed effects, an approach which takes into account the amount of time cattle spent at different locations, exposed to different levels of risk. This enabled us to identify an increased risk of liver fluke with increased animal age, rainfall, and temperature and for farms located further to the West, in excess of the risk associated with a warmer, wetter climate. This model explained 45% of the variability in liver fluke between farms, suggesting that the unexplained 55% was due to factors not included in the model, such as differences in on-farm management and presence of wet habitats. This approach demonstrates the value of statistically integrating routinely recorded slaughterhouse data with other pre-existing data, creating a powerful approach to quantify disease risks in production animals. Furthermore, this approach can be used to better quantify the impact of projected climate change on liver fluke risk for future studies.