(self)
return self.processed_csv_path
Converts the raw file to be used by humans.

        Returns path to CSV.
Converts the raw file to be used by humans.
Converts the raw file to be used by humans .
def process(self):
        """
        Converts the raw file to be used by humans.

        Returns path to CSV.
        """
        # Figure out where to write it
        if self.processed_csv_path.exists() and not self.config.force:
            logger.debug(f"Processed CSV already exists at {self.processed_csv_path}")
            return self.processed_csv_path

        # Read in the raw CSV of data from the ACS
        df = pd.read_csv(self.raw_csv_path, dtype=str)

        # Get the crosswalk between raw and processed field names
        field_name_mapper = self.get_raw_field_map()

        # Cast numbers to floats
        for field in field_name_mapper.keys():
            if "_" in field and (field.endswith("E") or field.endswith("M")):
                df[field] = df[field].astype(np.float64)

        # Rename fields with humanized names
        df.rename(columns=field_name_mapper, inplace=True)

        # Add a combined GEOID column with a Census unique identifer
        df['geoid'] = df.apply(self.create_geoid, axis=1)

        if hasattr(self.config, 'process'):
            df = self.config.process(df)

        # Write it out
        logger.debug(f"Writing CSV to {self.processed_csv_path}")
        df.set_index(["geoid", "name"]).to_csv(
            self.processed_csv_path,
            index=True,
            encoding="utf-8"
        )
        return self.processed_csv_path
def process ( self ) : # Figure out where to write it if self . processed_csv_path . exists ( ) and not self . config . force : logger . debug ( f"Processed CSV already exists at {self.processed_csv_path}" ) return self . processed_csv_path # Read in the raw CSV of data from the ACS df = pd . read_csv ( self . raw_csv_path , dtype = str ) # Get the crosswalk between raw and processed field names field_name_mapper = self . get_raw_field_map ( ) # Cast numbers to floats for field in field_name_mapper . keys ( ) : if "_" in field and ( field . endswith ( "E" ) or field . endswith ( "M" ) ) : df [ field ] = df [ field ] . astype ( np . float64 ) # Rename fields with humanized names df . rename ( columns = field_name_mapper , inplace = True ) # Add a combined GEOID column with a Census unique identifer df [ 'geoid' ] = df . apply ( self . create_geoid , axis = 1 ) if hasattr ( self . config , 'process' ) : df = self . config . process ( df ) # Write it out logger . debug ( f"Writing CSV to {self.processed_csv_path}" ) df . set_index ( [ "geoid" , "name" ] ) . to_csv ( self . processed_csv_path , index = True , encoding = "utf-8" ) return self . processed_csv_path