High-Throughput Computations Of X-Ray Spectroscopy And Machine Learning-Assisted Chemical Environment Identification