In this talk I will discuss generalising the mapping from quantum error correcting codes to stat. mech. models (originally due to Dennis, Kitaev, Landahl and Preskill) to the case of correlated Pauli noise. This mapping connects the error correcting threshold to a phase transition, allowing us to use methods for studying stat. mech. models to estimate code thresholds. Using this, I will present numerical estimates of toric code thresholds under correlated noise. Time permitting, I will also discuss how this mapping can be used to give a tensor network-based algorithm for approximate optimal decoding of 2d topological codes, generalising the decoder of Bravyi, Suchara and Vargo.