Files
bls-data/tests/fixtures/qcew_dc_sample.csv
Dave Boyd 9e2c55c568 Add QCEW CSV module, ECEC breakdown, response caching + typed errors
Item 1 — QCEW county/industry detail:
- new bls_client/qcew.py: thin client over the QCEW Open Data CSV service
  (area/industry/size slices; no API key, no quota), with filter_rows helper
- covers the county/industry detail the timeseries API can't reach

Item 2 — ECEC benefit breakdown:
- new series.ecec() builder from the authoritative cm.estimate decode table
- real helpers: wages, total benefits, paid leave, supplemental pay,
  health insurance, retirement & savings, legally required + ecec_dashboard()
- FIX: ecec_total_benefits was CMU1036... (education/health industries only);
  correct all-civilian total benefits is CMU1030000000000D

Item 3 — caching + typed errors:
- bls_client/cache.py FileCache (on-disk, TTL); BLSClient(cache=True),
  queries_used counter (cache hits don't spend quota)
- bls_client/errors.py: BLSError / BLSQuotaError / BLSRequestError; quota
  exhaustion now raises a clear BLSQuotaError instead of a generic RuntimeError

Tests: 119 offline (+24) incl. ECEC goldens, QCEW fixture parse, cache/quota
behavior; live smoke extended to ECEC + QCEW. Helper sweep: 96/96 live.
README: caching/QCEW usage, updated coverage + limitations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 10:38:12 -04:00

1.9 KiB

1area_fipsown_codeindustry_codeagglvl_codesize_codeyearqtrdisclosure_codeannual_avg_estabsannual_avg_emplvltotal_annual_wagestaxable_annual_wagesannual_contributionsannual_avg_wkly_wageavg_annual_paylq_disclosure_codelq_annual_avg_estabslq_annual_avg_emplvllq_total_annual_wageslq_taxable_annual_wageslq_annual_contributionslq_annual_avg_wkly_wagelq_avg_annual_payoty_disclosure_codeoty_annual_avg_estabs_chgoty_annual_avg_estabs_pct_chgoty_annual_avg_emplvl_chgoty_annual_avg_emplvl_pct_chgoty_total_annual_wages_chgoty_total_annual_wages_pct_chgoty_taxable_annual_wages_chgoty_taxable_annual_wages_pct_chgoty_annual_contributions_chgoty_annual_contributions_pct_chgoty_annual_avg_wkly_wage_chgoty_annual_avg_wkly_wage_pct_chgoty_avg_annual_pay_chgoty_avg_annual_pay_pct_chg
2110000105002024A5224075966693430310874540058709911928888423651229891.001.001.001.001.001.001.007371.419120.340998451604.6-94377645-1.7-3132981-2.6984.351014.3
3110001105102024A341193145270672414990026951401401.2913.1311.090.000.000.850.8410.325281.310986533134.200.000.0752.939052.9
4110002105102024A143824439586048321613900024319911035080.041.621.270.520.000.790.7900.07332.0154261320.4389385031.810474.8-31-1.5-1612-1.5
5110003105102024A253993538270989249180473625921348040.030.060.070.000.011.251.25-1-3.8-75-1.875730801.4-94668-27.5-1797-27.5833.343313.3
6110005105102024A5186052428461866193554538419891911928390522691180011.020.810.771.021.010.960.967361.4-1275-0.229781926355.1-98176827-1.8-3131288-2.61145.359535.3
7110008109602024A3802353823156411732016388180497925791340970.292.142.380.150.011.111.1110.331861.411216525253.7379918230.2-1693-25.4582.329902.3