Add BLS client library, example scripts, and usage docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 08:39:47 -04:00
parent eb724aa7ff
commit 20bd3e9a2f
11 changed files with 1443 additions and 0 deletions

View File

@ -0,0 +1,36 @@
"""
Pre-built productivity series IDs — Major Sector Productivity & Costs.
"""
from ..series import productivity
def business_output_per_hour(seasonal: bool = True) -> str:
"""Business sector output per hour worked (quarterly)."""
return productivity("business", "output_per_hour", seasonal)
def business_unit_labor_cost(seasonal: bool = True) -> str:
"""Business sector unit labor costs (quarterly)."""
return productivity("business", "unit_labor_cost", seasonal)
def business_real_comp_per_hour(seasonal: bool = True) -> str:
"""Business sector real compensation per hour."""
return productivity("business", "real_comp_per_hr", seasonal)
def nonfarm_output_per_hour(seasonal: bool = True) -> str:
return productivity("nonfarm_business", "output_per_hour", seasonal)
def manufacturing_output_per_hour(seasonal: bool = True) -> str:
return productivity("manufacturing", "output_per_hour", seasonal)
def productivity_dashboard() -> dict:
return {
"Business Output/Hr": business_output_per_hour(),
"Business Unit Labor Cost": business_unit_labor_cost(),
"Nonfarm Output/Hr": nonfarm_output_per_hour(),
"Manufacturing Output/Hr": manufacturing_output_per_hour(),
}