(self)
return self.raw_csv_path
Downloads raw data from the Census API.
        Returns path to CSV.
Downloads raw data from the Census API.
        Returns path to CSV.
Downloads raw data from the Census API . Returns path to CSV .
def download(self):
        """
        Downloads raw data from the Census API.
        Returns path to CSV.
        """
        # Skip hitting the API if we've already got the file, as long as we're not forcing it.
        if self.raw_csv_path.exists() and not self.config.force:
            logger.debug(f"Raw CSV already exists at {self.raw_csv_path}")
            return self.raw_csv_path

        # Get the data
        data = self.get_raw_data()

        # Convert it to a dataframe
        df = pd.DataFrame.from_records(data)

        # Write it to disk
        logger.debug(f"Writing raw ACS table to {self.raw_csv_path}")
        df.to_csv(self.raw_csv_path, index=False, encoding="utf-8")

        # Pause to be polite to the API.
        time.sleep(0.5)

        # Hand the path back
        return self.raw_csv_path
def download ( self ) : # Skip hitting the API if we've already got the file, as long as we're not forcing it. if self . raw_csv_path . exists ( ) and not self . config . force : logger . debug ( f"Raw CSV already exists at {self.raw_csv_path}" ) return self . raw_csv_path # Get the data data = self . get_raw_data ( ) # Convert it to a dataframe df = pd . DataFrame . from_records ( data ) # Write it to disk logger . debug ( f"Writing raw ACS table to {self.raw_csv_path}" ) df . to_csv ( self . raw_csv_path , index = False , encoding = "utf-8" ) # Pause to be polite to the API. time . sleep ( 0.5 ) # Hand the path back return self . raw_csv_path