Local origins of sensor activity in 1D oxide nanostructures: from spectromicroscopy to device