Local structure in nematic and isotropic liquid crystals