Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"government",
"dwelling",
"institutional_sector",
"firm",
}
ALLOWED_AGGREGATIONS = {
"sum",
Expand Down
4 changes: 4 additions & 0 deletions arch/source_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@
"ssa-ssi-table-7b1-2024": Path("ssa/ssi_table_7b1_2024"),
"hhs-acf-tanf-caseload-2024": Path("hhs_acf/tanf_caseload_2024"),
"hhs-acf-tanf-financial-2024": Path("hhs_acf/tanf_financial_2024"),
"hmrc-vat-firm-targets-2024-25": Path("hmrc/vat_firm_targets_2024_25"),
"kff-marketplace-effectuated-enrollment": Path(
"kff/marketplace_effectuated_enrollment"
),
"ons-uk-business-firm-targets-2025": Path(
"ons/uk_business_firm_targets_2025"
),
"usda-snap-fy69-to-current": Path("usda_snap/fy69_to_current"),
}
SOURCE_ARTIFACT_CACHE_ENV = "ARCH_SOURCE_ARTIFACT_CACHE_DIR"
Expand Down
2 changes: 2 additions & 0 deletions arch/sources/cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,8 @@ def _delimited_scalar(value: str) -> Scalar:
stripped = value.strip()
if not stripped:
return None
if "_" in stripped:
return stripped
numeric = stripped.replace("$", "").replace(",", "")
if numeric.lstrip("-").isdigit():
return int(numeric)
Expand Down
2 changes: 2 additions & 0 deletions arch/sources/rows.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,8 @@ def _delimited_scalar(value: str) -> Scalar:
stripped = value.strip()
if not stripped:
return None
if "_" in stripped:
return stripped
numeric = stripped.replace("$", "").replace(",", "")
if numeric.lstrip("-").isdigit():
return int(numeric)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
target_group,band_id,band_label,value
vat_registered_count_by_turnover,negative_or_zero,"Negative or zero annual turnover",211400
vat_registered_count_by_turnover,1_to_threshold,"GBP 1 to VAT registration threshold annual turnover",683700
vat_registered_count_by_turnover,threshold_to_150k,"VAT registration threshold to GBP 150,000 annual turnover",280400
vat_registered_count_by_turnover,150k_to_300k,"GBP 150,000 to GBP 300,000 annual turnover",338600
vat_registered_count_by_turnover,300k_to_500k,"GBP 300,000 to GBP 500,000 annual turnover",186700
vat_registered_count_by_turnover,500k_to_1m,"GBP 500,000 to GBP 1,000,000 annual turnover",184100
vat_registered_count_by_turnover,1m_to_10m,"GBP 1,000,000 to GBP 10,000,000 annual turnover",240500
vat_registered_count_by_turnover,greater_than_10m,"Greater than GBP 10,000,000 annual turnover",45800
vat_registered_count_by_turnover,unknown,"Unknown annual turnover",159300
vat_liability_by_turnover,negative_or_zero,"Negative or zero annual turnover",-2910
vat_liability_by_turnover,1_to_threshold,"GBP 1 to VAT registration threshold annual turnover",-300
vat_liability_by_turnover,threshold_to_150k,"VAT registration threshold to GBP 150,000 annual turnover",2420
vat_liability_by_turnover,150k_to_300k,"GBP 150,000 to GBP 300,000 annual turnover",4830
vat_liability_by_turnover,300k_to_500k,"GBP 300,000 to GBP 500,000 annual turnover",3970
vat_liability_by_turnover,500k_to_1m,"GBP 500,000 to GBP 1,000,000 annual turnover",6840
vat_liability_by_turnover,1m_to_10m,"GBP 1,000,000 to GBP 10,000,000 annual turnover",29520
vat_liability_by_turnover,greater_than_10m,"Greater than GBP 10,000,000 annual turnover",132800
23 changes: 23 additions & 0 deletions db/data/hmrc/vat_firm_targets_2024_25/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
source_id: hmrc-vat-firm-targets-2024-25
source_name: HMRC Annual UK VAT Statistics 2024 to 2025
publisher: HM Revenue and Customs
source_page: https://www.gov.uk/government/statistics/value-added-tax-vat-annual-statistics
files:
2024:
filename: hmrc_vat_firm_targets_2024_25.csv
source_url: https://www.gov.uk/government/statistics/value-added-tax-vat-annual-statistics
source_table: Annual UK VAT Statistics 2024 to 2025 VAT trader population and net VAT liability by turnover band
sha256: 8bea6fdc9a5e397950fbc5bc58b6f26586e02ff76622b21b949592520a7d6d79
size_bytes: 1675
storage:
r2:
provider: r2
bucket: arch-raw
key: raw/hmrc/hmrc-vat-firm-targets-2024-25/2024/8bea6fdc9a5e397950fbc5bc58b6f26586e02ff76622b21b949592520a7d6d79/hmrc_vat_firm_targets_2024_25.csv
uri: r2://arch-raw/raw/hmrc/hmrc-vat-firm-targets-2024-25/2024/8bea6fdc9a5e397950fbc5bc58b6f26586e02ff76622b21b949592520a7d6d79/hmrc_vat_firm_targets_2024_25.csv
source_urls:
- https://www.gov.uk/government/statistics/value-added-tax-vat-annual-statistics
notes: >-
Curated national extract from HMRC Annual UK VAT Statistics 2024 to 2025.
Net VAT liability rows retain source values in GBP millions and are scaled
to GBP by the Ledger source package.
22 changes: 22 additions & 0 deletions db/data/ons/uk_business_firm_targets_2025/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
source_id: ons-uk-business-firm-targets-2025
source_name: ONS UK Business, Activity, Size and Location 2025
publisher: Office for National Statistics
source_page: https://www.ons.gov.uk/businessindustryandtrade/business/activitysizeandlocation/datasets/ukbusinessactivitysizeandlocation
files:
2025:
filename: ons_uk_business_firm_targets_2025.csv
source_url: https://www.ons.gov.uk/businessindustryandtrade/business/activitysizeandlocation/datasets/ukbusinessactivitysizeandlocation
source_table: UK Business, Activity, Size and Location 2025 enterprise turnover and employment size bands
sha256: 929717d7cd58dbd615b8383462c3c9da961663f8c50a16a666c58a2d12df0cf3
size_bytes: 900
storage:
r2:
provider: r2
bucket: arch-raw
key: raw/ons/ons-uk-business-firm-targets-2025/2025/929717d7cd58dbd615b8383462c3c9da961663f8c50a16a666c58a2d12df0cf3/ons_uk_business_firm_targets_2025.csv
uri: r2://arch-raw/raw/ons/ons-uk-business-firm-targets-2025/2025/929717d7cd58dbd615b8383462c3c9da961663f8c50a16a666c58a2d12df0cf3/ons_uk_business_firm_targets_2025.csv
source_urls:
- https://www.ons.gov.uk/businessindustryandtrade/business/activitysizeandlocation/datasets/ukbusinessactivitysizeandlocation
notes: >-
Curated national extract from the ONS UK Business 2025 workbook. Rows
retain published enterprise counts by turnover and employment size band.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
target_group,band_id,band_label,value
turnover_band,0_49k,"GBP 0 to GBP 49,999 annual turnover",387285
turnover_band,50_99k,"GBP 50,000 to GBP 99,999 annual turnover",525225
turnover_band,100_249k,"GBP 100,000 to GBP 249,999 annual turnover",873705
turnover_band,250_499k,"GBP 250,000 to GBP 499,999 annual turnover",390055
turnover_band,500_999k,"GBP 500,000 to GBP 999,999 annual turnover",244225
turnover_band,1000_4999k,"GBP 1,000,000 to GBP 4,999,999 annual turnover",232795
turnover_band,5000k_plus,"GBP 5,000,000 or more annual turnover",81325
employment_band,0_4,"0 to 4 employees",2137200
employment_band,5_9,"5 to 9 employees",300645
employment_band,10_19,"10 to 19 employees",156590
employment_band,20_49,"20 to 49 employees",84595
employment_band,50_99,"50 to 99 employees",29335
employment_band,100_249,"100 to 249 employees",14835
employment_band,250_plus,"250 or more employees",11415
Loading
Loading