  The local structure and chemical bonding in two-phase amorphous
Cr$_{1-x}$C$_{x}$ nanocomposite thin films are investigated by Cr $K$-edge
($1s$) X-ray absorption near-edge structure (XANES) and extended X-ray
absorption fine structure (EXAFS) spectroscopies in comparison to theory. By
utilizing the computationally efficient \textit{stochastic quenching} (SQ)
technique, we reveal the complexity of different Cr-sites in the transition
metal carbides, highlighting the need for large scale averaging to obtain
theoretical XANES and EXAFS spectra for comparison with measurements. As shown
in this work, it is advantageous to use \textit{ab initio} theory as an
assessment to correctly model and fit experimental spectra and investigate the
trends of bond lengths and coordination numbers in complex amorphous materials.
With sufficient total carbon content ($\geq$ 30 at\%), we find that the
short-range coordination in the amorphous carbide phase exhibit similarities to
that of a Cr$_{7}$C$_{3\pm{}y}$ structure, while excessive carbons assemble in
the amorphous carbon phase.
