Skip to content

pycensus.census.countries.usa.lodes_wac.custom_fields

Custom fields for LODES that require mathematical operations.

This module defines derived fields that are computed from LODES (LEHD Origin-Destination Employment Statistics) data using custom mathematical operations. LODES provides job counts and worker residence/workplace data.

Note: LODES data is derived from state unemployment insurance records and federal administrative data, providing detailed workplace and residence employment data.

compute_job_density(jobs_total, area)

Compute job density (jobs per square mile/km).

Parameters:

Name Type Description Default
jobs_total Series

Total number of jobs

required
area Series

Area in square miles or square kilometers

required

Returns:

Type Description
Series

Job density (jobs per unit area)

compute_job_concentration_ratio(jobs_total, population16plus)

Compute jobs-to-working-age-population ratio.

This ratio indicates the balance between jobs and potential workers. A ratio > 1 means more jobs than working-age residents (in-commuting). A ratio < 1 means more residents than jobs (out-commuting).

Parameters:

Name Type Description Default
jobs_total Series

Total number of jobs

required
population16plus Series

Population aged 16 and over

required

Returns:

Type Description
Series

Jobs-to-working-age-population ratio

compute_income_segment_share(jobs_income_segment, jobs_total)

Compute the share of jobs in a specific income segment.

Parameters:

Name Type Description Default
jobs_income_segment Series

Number of jobs in a specific income segment (low, mid, or high)

required
jobs_total Series

Total number of jobs

required

Returns:

Type Description
Series

Share of jobs in the segment (0-1)

compute_age_segment_share(jobs_age_segment, jobs_total)

Compute the share of jobs held by a specific age segment.

Parameters:

Name Type Description Default
jobs_age_segment Series

Number of jobs held by a specific age segment (young, prime, or older)

required
jobs_total Series

Total number of jobs

required

Returns:

Type Description
Series

Share of jobs in the age segment (0-1)

compute_mean_job_income(jobs_income_low=None, jobs_income_mid=None, jobs_income_high=None, jobs_total=None)

Estimate mean job income from income segment counts.

This is an approximation since we don't have actual income values for each segment. We use representative values for each segment.

Parameters:

Name Type Description Default
jobs_income_low Optional[Series]

Number of jobs in low income segment (CE01)

None
jobs_income_mid Optional[Series]

Number of jobs in mid income segment (CE02)

None
jobs_income_high Optional[Series]

Number of jobs in high income segment (CE03)

None
jobs_total Optional[Series]

Total number of jobs (for validation)

None

Returns:

Type Description
Series

Approximate mean job income

Note

This uses approximate income thresholds: - Low: $0-$1,250/month - Mid: $1,250-$3,333/month
- High: $3,333+/month Annualized: Low ~$15k, Mid ~$30k, High ~$60k

compute_worker_age_ratio(jobs_age_young, jobs_age_prime, jobs_age_older)

Compute ratios of jobs across different age groups.

Parameters:

Name Type Description Default
jobs_age_young Series

Number of jobs held by young workers (CA01)

required
jobs_age_prime Series

Number of jobs held by prime-age workers (CA02)

required
jobs_age_older Series

Number of jobs held by older workers (CA03)

required

Returns:

Type Description
dict

Dictionary with ratios:

dict
  • young_to_prime: Ratio of young to prime-age workers
dict
  • older_to_prime: Ratio of older to prime-age workers
dict
  • young_to_older: Ratio of young to older workers