Z-contrast imaging and electron energy loss spectroscopy in the scanning transmission electron microscope provide the ability to investigate the structure-composition-property relationship at individual defects on the atomic scale. In this article, the main principles behind the techniques will be described. The application of these methods to the analysis of individual dislocations in GaN will also be discussed. In this case, the atomic scale methods indicate that many of the structural and electronic properties of dislocations are modified by the presence of impurities, such as oxygen.