Skip to contents

All functions

convert_2010_to_2020_bounds()
redistributes 2010 data based on 2020 census boundaries param: data(dataframe) -> data to redistribute. contains geoid(2010) and value attributes. param: geoid_col(character - default="geoid") -> name of column with 2010 geoids return: redistributed(dataframe) -> data redistributed to 2020 tract boundaries. contains geoids(2020) and redistributed values
create_crosswalk()
generates a crosswalk file inclusive of all geography levels possible that exist in geoids. param: geoids(character vector) -> geoids to get crosswalk for. return: dataframe of relationship data. columns: geoid10, geoid20, area10, area20, area_part, type_change
get_2010_2020_bound_changes()
determines if/how census tract boundaries changed from 2010 to 2020. Adds an additional "type_change" column to 2010-2020 tract relationship file indicating whether a tract did not change ("same"), a tract was split but bounds did not change ("split"), or a tracts bounds moved ("moved"). param: res(character - default "tract") -> resolution to get changes for. param: geoids(character vector - default NULL) -> geoids to get changes for. if none provided, returns all of US return: dataframe of relationship data with "type_change" column.
standardize_all()
takes in a finalized tract dataset and standardizes the values to fit 2020 tract boundaries. assumes that the dataset fits the data commons conventions for finalized data (columns: geoid, year, measure, value, moe, region_type || measure names: snake case - underscore delimeter) param: data(dataframe) -> tract data fitting data commons conventions (outlined above) param: filter_geo(character - default="state") -> geographic level to keep consistent with original data. (for example, if your original data only contains specific states like Virginia, use "state". if your original data only contains specific counties like Fairfax and Arlington, use "county") return: same dataframe with values standardized to 2020 boundaries