Skip to main content

County Business Patterns

census/cbp/cbp_county holds the number of establishments and of employees in each county, by NAICS code, from the Census Bureau's County Business Patterns (CBP). It has one partition per CBP vintage, for the vintages from 2017 on. The partitions are dynamic. Add a vintage to the deployment once the Census Bureau publishes it.

market/us/dealers/demographics reads it to compute the CBP features of each dealer location's county and of each of its isochrones.

Source​

The asset reads the Census Data API, https://api.census.gov/data/<year>/cbp, with the API key in the US_CENSUS_API_KEY environment variable. One request returns NAICS2017, ESTAB and EMP for every county and NAICS code, with LFO=001 (all legal forms of organization) and EMPSZES=001 (all employment sizes). The asset keeps the NAICS codes of cbp_county_naics_codes in ai_public/defs/census/template_vars.py:

  • the sectors 00 (all sectors), 52, 54, 62, 44-45 (retail trade) and 72;
  • each code a feature in packages/ai_core/src/ai_core/cbp/feature_defs.json uses.

No feature uses the sectors 52, 54, 62, 44-45 and 72.

Columns​

One row per county, NAICS code and measure.

ColumnTypeMeaning
geo_idString5-digit county GEOID: the state FIPS code, then the county FIPS code
geo_typeStringcounty
variableStringThe measure and the NAICS code, such as ESTAB_441110
valueFloat64The count
yearInt64The vintage
as_ofDateJanuary 1 of the second year after the vintage, close to when the Census Bureau publishes the vintage
api_nameStringcbp
_partitionStringThe vintage, the partition key

The measures are:

  • ESTAB: the number of establishments;
  • EMP: the number of paid employees in the pay period including March 12.

Since 2022, the Census Bureau has used Connecticut's nine planning regions, codes 09110 to 09190, in place of its counties. CBP 2023 uses the planning regions, as do the 2024 tracts of census/acs/acs5_tract.

Suppressed and noisy cells​

The CBP vintages before 2017 withhold the employment of a cell that would disclose a company's data. A materialization of a vintage before 2017 fails.

From 2017, CBP publishes every cell:

  • ESTAB is the count itself.
  • EMP has noise added to protect each company's data. The Census Bureau flags each cell as low noise (under 2%), moderate noise (2% to 5%) or high noise (5% or more). The noise is largest in cells of few establishments.

The asset does not fetch the noise flag, and the features use EMP as published.

A county without an establishment of a NAICS code has no row for that code. The features count such a code as 0. A materialization fails when a count is not a number of at least 0.

CBP counts an establishment without a fixed location in one county, such as a statewide service, under county code 999 of its state. No tract is in such a county, so the CBP features of market/us/dealers/demographics leave these establishments out.

CBP county data cover the 50 states and the District of Columbia. Puerto Rico and the island areas have none.

Features​

packages/ai_core/src/ai_core/cbp/feature_defs.json defines the CBP features in the format of the ACS demographic features. Each sum scalar is the count of one variable. Each ratio divides the counts of two variables.

FeatureDefinition
cbp_establishmentsESTAB_00, all establishments
cbp_employeesEMP_00, all employees
cbp_motor_vehicle_and_parts_dealersESTAB_441, establishments of motor vehicle and parts dealers
cbp_new_car_dealersESTAB_441110, establishments of new car dealers
cbp_used_car_dealersESTAB_441120, establishments of used car dealers
cbp_new_car_dealer_employeesEMP_441110, employees of new car dealers
cbp_establishments_per_10k_residentsESTAB_00 per 10,000 residents
cbp_employees_per_10k_residentsEMP_00 per 10,000 residents
cbp_motor_vehicle_and_parts_dealers_per_10k_residentsESTAB_441 per 10,000 residents
cbp_new_car_dealers_per_10k_residentsESTAB_441110 per 10,000 residents
cbp_used_car_dealers_per_10k_residentsESTAB_441120 per 10,000 residents
cbp_employees_per_new_car_dealerEMP_441110 divided by ESTAB_441110

The features describe a dealer's market:

  • All establishments and all employees measure the area's business activity. Employees count the jobs located in the area, held by residents and by commuters. Employees per resident is therefore high in an employment center and low where people live but work elsewhere.
  • New car dealers (NAICS 441110) are the franchised dealers a franchise competes with. Used car dealers (441120) compete for the same buyers.
  • Motor vehicle and parts dealers (NAICS 441) include car dealers, the dealers of recreational vehicles, boats and motorcycles, and auto parts stores.
  • Employees per new car dealer measure the size of the area's new car dealers.

The variable residents_10k holds the residents of a county in units of 10,000. It is the sum of the 2024 ACS total population B01001_001E of the county's tracts, divided by 10,000. ai_core.cbp.features.cbp_county_values() adds it to the CBP rows.