Utilizing synchrotron X-ray diffraction and X-ray absorption spectroscopy to study materials for electrochemical reactions involving hydrogen and carbon dioxide