The study of carbonates is fundamental for the understanding of the Earth’s deep carbon cycle. The double carbonate ankerite, Ca(FexMg1-x)(CO3)2 (0≤x≤0.7), with high Fe contents is also expected to undergo a similar spin transition but no studies have been reported so far. Disordered ankerite is expected in the Earth’s mantle so it is of utmost relevance to understand the effect of disorder on the spin transition and electronic properties in this context. The aim of the experiment is to investigate the electronic and structural properties of ordered and disordered ankerite samples upon compression to 75 GPa, using a combination of X-ray emission spectroscopy (XES) and X-ray powder diffraction (XRD) at the beamline ID20.