Determining the resistivity of graphite