  The information content of crystalline materials becomes astronomical when
collective electronic behavior and their fluctuations are taken into account.
In the past decade, improvements in source brightness and detector technology
at modern x-ray facilities have allowed a dramatically increased fraction of
this information to be captured. Now, the primary challenge is to understand
and discover scientific principles from big data sets when a comprehensive
analysis is beyond human reach. We report the development of a novel
unsupervised machine learning approach, XRD Temperature Clustering (X-TEC),
that can automatically extract charge density wave (CDW) order parameters and
detect intra-unit cell (IUC) ordering and its fluctuations from a series of
high-volume X-ray diffraction (XRD) measurements taken at multiple
temperatures. We apply X-TEC to XRD data on a quasi-skutterudite family of
materials, (Ca$_x$Sr$_{1-x}$)$_3$Rh$_4$Sn$_{13}$, where a quantum critical
point arising from charge order is observed as a function of Ca concentration.
We further apply X-TEC to XRD data on the pyrochlore metal, Cd$_2$Re$_2$O$_7$,
to investigate its two much debated structural phase transitions and uncover
the Goldstone mode accompanying them. We demonstrate how unprecedented atomic
scale knowledge can be gained when human researchers connect the X-TEC results
to physical principles. Specifically, we extract from the X-TEC-revealed
selection rule that the Cd and Re displacements are approximately equal in
amplitude, but out of phase. This discovery reveals a previously unknown
involvement of $5d^2$ Re, supporting the idea of an electronic origin to the
structural order. Our approach can radically transform XRD experiments by
allowing in-operando data analysis and enabling researchers to refine
experiments by discovering interesting regions of phase space on-the-fly.
