BILLING_PROVIDER_NPI_NUM string | SERVICING_PROVIDER_NPI_NUM string | HCPCS_CODE string | CLAIM_FROM_MONTH string | TOTAL_UNIQUE_BENEFICIARIES int64 | TOTAL_CLAIMS int64 | TOTAL_PAID float64 |
|---|---|---|---|---|---|---|
1376609297 | 1376609297 | T1019 | 2024-07 | 39,765 | 1,205,701 | 118,887,675.31 |
1376609297 | 1376609297 | T1019 | 2024-08 | 39,677 | 1,152,534 | 115,561,066.11 |
1376609297 | 1376609297 | T1019 | 2024-05 | 39,678 | 1,157,235 | 112,823,255.3 |
1376609297 | 1376609297 | T1019 | 2024-06 | 39,834 | 1,164,582 | 111,449,173.13 |
1376609297 | 1376609297 | T1019 | 2024-09 | 39,527 | 1,099,808 | 111,199,832.57 |
1376609297 | 1376609297 | T1019 | 2023-12 | 35,011 | 1,126,059 | 108,654,424.08 |
1376609297 | 1376609297 | T1019 | 2024-10 | 38,705 | 1,049,751 | 107,690,814.77 |
1376609297 | 1376609297 | T1019 | 2023-05 | 39,160 | 1,202,398 | 107,504,894.55 |
1376609297 | 1376609297 | T1019 | 2023-03 | 38,858 | 1,218,388 | 107,350,444.62 |
1376609297 | 1376609297 | T1019 | 2024-01 | 35,029 | 1,127,389 | 107,097,709.23 |
1376609297 | 1376609297 | T1019 | 2024-03 | 38,160 | 1,087,063 | 104,727,513.47 |
1376609297 | 1376609297 | T1019 | 2023-10 | 34,860 | 1,064,642 | 103,630,659.12 |
1376609297 | 1376609297 | T1019 | 2022-05 | 38,456 | 1,180,315 | 103,075,855 |
1376609297 | 1376609297 | T1019 | 2023-04 | 38,987 | 1,148,650 | 102,695,845.07 |
1376609297 | 1376609297 | T1019 | 2022-08 | 38,230 | 1,177,425 | 102,535,435.35 |
1376609297 | 1376609297 | T1019 | 2024-04 | 35,952 | 1,039,887 | 102,524,798.67 |
1376609297 | 1376609297 | T1019 | 2022-07 | 38,344 | 1,201,576 | 102,046,918.74 |
1376609297 | 1376609297 | T1019 | 2023-07 | 35,171 | 1,116,597 | 101,493,876.67 |
1376609297 | 1376609297 | T1019 | 2023-08 | 35,191 | 1,093,176 | 101,253,721.85 |
1376609297 | 1376609297 | T1019 | 2022-01 | 37,841 | 1,056,979 | 101,079,555 |
1376609297 | 1376609297 | T1019 | 2023-09 | 35,096 | 1,050,555 | 100,054,621.4 |
1376609297 | 1376609297 | T1019 | 2022-06 | 38,438 | 1,144,931 | 99,853,690 |
1376609297 | 1376609297 | T1019 | 2023-01 | 36,552 | 1,133,460 | 99,041,713.07 |
1376609297 | 1376609297 | T1019 | 2022-04 | 38,219 | 1,134,813 | 98,812,845 |
1376609297 | 1376609297 | T1019 | 2022-03 | 38,098 | 1,013,674 | 98,713,611.08 |
1376609297 | 1376609297 | T1019 | 2022-10 | 37,981 | 1,120,009 | 98,339,631.52 |
1376609297 | 1376609297 | T1019 | 2023-11 | 34,495 | 1,020,888 | 98,269,821.56 |
1376609297 | 1376609297 | T1019 | 2024-02 | 38,017 | 1,022,012 | 97,899,274.65 |
1376609297 | 1376609297 | T1019 | 2022-09 | 38,238 | 1,107,628 | 96,631,527.72 |
1376609297 | 1376609297 | T1019 | 2023-06 | 38,599 | 1,046,043 | 94,937,006.53 |
1376609297 | 1376609297 | T1019 | 2022-11 | 34,438 | 1,071,071 | 93,439,759.64 |
1376609297 | 1376609297 | T1019 | 2023-02 | 38,497 | 1,054,313 | 92,928,567.51 |
1376609297 | 1376609297 | T1019 | 2022-12 | 34,293 | 1,036,060 | 91,520,744.99 |
1376609297 | 1376609297 | T1019 | 2022-02 | 37,787 | 928,488 | 90,176,965 |
1376609297 | 1376609297 | T1019 | 2024-11 | 31,676 | 787,315 | 84,814,419.88 |
1922467554 | 1922467554 | T1019 | 2024-07 | 28,053 | 546,207 | 82,917,536.32 |
1922467554 | 1922467554 | T1019 | 2024-05 | 26,940 | 532,679 | 80,004,885.61 |
1922467554 | 1922467554 | T1019 | 2024-04 | 26,665 | 511,360 | 77,215,261.03 |
1922467554 | 1922467554 | T1019 | 2024-06 | 27,527 | 500,538 | 75,926,938.59 |
1922467554 | 1922467554 | T1019 | 2024-01 | 25,255 | 502,099 | 75,363,400.77 |
1922467554 | 1922467554 | T1019 | 2024-03 | 26,149 | 499,197 | 75,238,132.72 |
1922467554 | 1922467554 | T1019 | 2024-11 | 29,317 | 504,374 | 71,010,282.91 |
1922467554 | 1922467554 | T1019 | 2024-02 | 25,618 | 473,076 | 70,935,310.69 |
1922467554 | 1922467554 | T1019 | 2024-10 | 28,894 | 502,214 | 70,308,663.84 |
1922467554 | 1922467554 | T1019 | 2023-10 | 24,276 | 473,832 | 69,646,988.13 |
1922467554 | 1922467554 | T1019 | 2023-12 | 24,923 | 474,531 | 69,575,418.86 |
1922467554 | 1922467554 | T1019 | 2023-11 | 24,671 | 473,860 | 69,338,817.96 |
1922467554 | 1922467554 | T1019 | 2023-08 | 23,303 | 454,631 | 66,164,474.42 |
1922467554 | 1922467554 | T1019 | 2023-09 | 23,676 | 442,659 | 64,469,103.67 |
1922467554 | 1922467554 | T1019 | 2023-05 | 21,944 | 442,643 | 63,921,904.82 |
1922467554 | 1922467554 | T1019 | 2023-07 | 22,842 | 435,741 | 63,398,304.57 |
1376609297 | 1376609297 | T1019 | 2021-12 | 36,985 | 710,618 | 61,969,545 |
1922467554 | 1922467554 | T1019 | 2023-06 | 22,526 | 427,428 | 61,866,353.91 |
1922467554 | 1922467554 | T1019 | 2023-03 | 20,994 | 416,735 | 60,215,547.19 |
1922467554 | 1922467554 | T1019 | 2023-04 | 21,435 | 396,370 | 57,191,893.29 |
1922467554 | 1922467554 | T1019 | 2023-01 | 20,162 | 394,511 | 57,035,988.52 |
1417262056 | 1417262056 | T1019 | 2024-09 | 34,818 | 597,907 | 55,056,558.57 |
1922467554 | 1922467554 | T1019 | 2022-12 | 19,717 | 385,714 | 54,956,784.5 |
1417262056 | 1417262056 | T1019 | 2024-08 | 34,690 | 599,234 | 54,781,914.5 |
1417262056 | 1417262056 | T1019 | 2024-07 | 34,337 | 644,264 | 54,761,232.8 |
1417262056 | 1417262056 | T1019 | 2024-10 | 34,486 | 590,591 | 53,809,750.65 |
1417262056 | 1417262056 | T1019 | 2024-05 | 33,732 | 595,379 | 53,401,322.33 |
1922467554 | 1922467554 | T1019 | 2022-11 | 19,299 | 372,499 | 53,324,574.8 |
1417262056 | 1417262056 | T1019 | 2024-06 | 34,074 | 581,629 | 53,250,080.13 |
1417262056 | 1417262056 | T1019 | 2024-01 | 33,875 | 603,803 | 52,946,668.11 |
1922467554 | 1922467554 | T1019 | 2023-02 | 20,465 | 362,504 | 52,487,083 |
1417262056 | 1417262056 | T1019 | 2023-11 | 33,363 | 597,700 | 52,417,283.45 |
1417262056 | 1417262056 | T1019 | 2023-10 | 33,142 | 607,495 | 52,416,359.25 |
1417262056 | 1417262056 | T1019 | 2024-04 | 33,504 | 597,705 | 52,277,254.98 |
1417262056 | 1417262056 | T1019 | 2024-02 | 33,819 | 580,015 | 52,132,534.47 |
1417262056 | 1417262056 | T1019 | 2024-03 | 33,071 | 601,225 | 51,473,263.69 |
1922467554 | 1922467554 | T1019 | 2024-09 | 21,308 | 370,898 | 51,425,984.24 |
1922467554 | 1922467554 | T1019 | 2022-10 | 18,828 | 353,523 | 50,622,691.57 |
1417262056 | 1417262056 | T1019 | 2023-09 | 32,630 | 581,215 | 50,235,951.33 |
1376609297 | 1376609297 | T1019 | 2021-07 | 18,533 | 580,324 | 49,654,522.21 |
1376609297 | 1376609297 | T1019 | 2021-08 | 18,575 | 559,574 | 49,237,837.4 |
1417262056 | 1417262056 | T1019 | 2023-08 | 31,728 | 575,778 | 49,046,808.31 |
1417262056 | 1417262056 | T1019 | 2023-07 | 31,597 | 571,180 | 48,767,700.55 |
1417262056 | 1417262056 | T1019 | 2023-12 | 33,331 | 547,426 | 48,729,988.28 |
1417262056 | 1417262056 | T1019 | 2023-06 | 31,559 | 586,553 | 48,554,673.73 |
1417262056 | 1417262056 | T1019 | 2023-03 | 30,828 | 578,980 | 48,047,103.65 |
1417262056 | 1417262056 | T1019 | 2023-05 | 30,756 | 577,903 | 48,028,831.56 |
1417262056 | 1417262056 | T1019 | 2023-04 | 31,068 | 568,351 | 46,853,006.04 |
1417262056 | 1417262056 | T1019 | 2023-02 | 30,257 | 557,742 | 46,628,399.56 |
1922467554 | 1922467554 | T1019 | 2022-08 | 17,959 | 355,577 | 46,252,616.5 |
1417262056 | 1417262056 | T1019 | 2022-12 | 29,808 | 558,276 | 46,125,624.97 |
1922467554 | 1922467554 | T1019 | 2022-09 | 18,500 | 352,828 | 45,989,971.99 |
1376609297 | 1376609297 | T1019 | 2021-10 | 19,001 | 502,129 | 45,984,100 |
1922467554 | 1922467554 | T1019 | 2024-08 | 18,101 | 330,406 | 45,703,229.53 |
1376609297 | 1376609297 | T1019 | 2021-11 | 19,403 | 506,103 | 45,523,887.49 |
1417262056 | 1417262056 | T1019 | 2022-11 | 29,457 | 549,751 | 45,374,745.42 |
1417262056 | 1417262056 | T1019 | 2023-01 | 29,982 | 571,769 | 45,310,028.42 |
1417262056 | 1417262056 | T1019 | 2022-10 | 29,135 | 555,342 | 45,082,618.49 |
1376609297 | 1376609297 | T1019 | 2021-09 | 18,732 | 495,367 | 44,298,937.8 |
1922467554 | 1922467554 | T1019 | 2022-06 | 17,916 | 351,934 | 44,083,025.79 |
1922467554 | 1922467554 | T1019 | 2022-07 | 18,097 | 348,109 | 43,970,867.85 |
1376609297 | 1376609297 | T1019 | 2020-07 | 18,210 | 515,973 | 43,798,993.07 |
1417262056 | 1417262056 | T1019 | 2022-08 | 28,481 | 553,632 | 43,723,874.8 |
1417262056 | 1417262056 | T1019 | 2022-09 | 28,862 | 543,161 | 43,667,639.44 |
1922467554 | 1922467554 | T1019 | 2022-05 | 17,481 | 354,591 | 43,550,197.55 |
Medicaid Provider Spending
This dataset packages:
- the raw Medicaid Provider Spending dataset (as published on HHS Open Data), and
- the derived identifier-resolution artifacts produced by this repository when extracting and resolving the unique NPIs and HCPCS/CPT codes found in the raw spending data.
Source Data
- Medicaid Provider Spending (public dataset published by HHS/Open Data): opendata.hhs.gov/datasets/medicaid-provider-spending
- CMS NPPES bulk dissemination files + CMS NPI Registry API (for NPI/provider metadata)
- NLM Clinical Tables HCPCS API (for HCPCS/CPT code metadata)
Source Repository
Project code, build scripts, and pipeline logic live at: ToadResearch/Medicaid_Provider_Spending.
Data Splits
These are exposed on Hugging Face as three dataset configurations (spending, npi, hcpcs)
because each has a different schema (the Hub viewer and datasets expect a consistent schema within a single config).
| split | contents |
|---|---|
spending |
Raw Medicaid Provider Spending parquet (as downloaded; unmodified) from HHS Open Data. |
npi |
Derived NPI resolution artifacts: one row per unique NPI in the spending dataset (deduped). Populated primarily from bulk NPPES dissemination files; the CMS NPI Registry API is used only as fallback for bulk misses. Includes provenance (URL/params), error message, and a raw-or-synthetic JSON payload matching the NPI Registry API response shape. |
hcpcs |
Derived HCPCS/CPT resolution artifacts: one row per unique code in the spending dataset (deduped). Populated from the resolved mapping cache (Clinical Tables API and/or local CPT/HCPCS fallback). Includes provenance (URL/params), error message, and a raw-or-synthetic JSON payload matching the Clinical Tables response shape. |
Usage
from datasets import load_dataset
spending = load_dataset("mkieffer/Medicaid-Provider-Spending", "spending")["spending"]
npi = load_dataset("mkieffer/Medicaid-Provider-Spending", "npi")["npi"]
hcpcs = load_dataset("mkieffer/Medicaid-Provider-Spending", "hcpcs")["hcpcs"]
Split Schemas
spending
| column | type | description |
|---|---|---|
BILLING_PROVIDER_NPI_NUM |
string | Billing provider NPI |
SERVICING_PROVIDER_NPI_NUM |
string | Servicing provider NPI |
HCPCS_CODE |
string | HCPCS/CPT code |
CLAIM_FROM_MONTH |
string | Claim month (YYYY-MM-01) |
TOTAL_UNIQUE_BENEFICIARIES |
int64 | Unique beneficiaries |
TOTAL_CLAIMS |
int64 | Total claims |
TOTAL_PAID |
float64 | Total paid (USD) |
npi
All columns in this split are string (some are JSON-encoded strings).
| column | type | description |
|---|---|---|
npi |
string | NPI |
basic |
string (JSON) | results[0].basic |
addresses |
string (JSON) | results[0].addresses |
practice_locations |
string (JSON) | results[0].practiceLocations |
taxonomies |
string (JSON) | results[0].taxonomies |
identifiers |
string (JSON) | results[0].identifiers |
other_names |
string (JSON) | results[0].other_names |
endpoints |
string (JSON) | results[0].endpoints |
url |
string | Request URL when an API call happened; otherwise a bulk sentinel like nppes_bulk:* |
error_message |
string (nullable) | Error message if lookup failed |
api_run_id |
string | Local pipeline run id |
requested_at_utc |
string | Request timestamp (UTC) or bulk-export generation timestamp |
request_params |
string (JSON) | Request params / provenance captured by the pipeline |
results |
string (JSON) | Full results array |
response_json |
string (JSON) | Full raw API JSON payload when an API call happened; otherwise a synthetic payload in the same shape |
hcpcs
All columns in this split are string (some are JSON-encoded strings).
| column | type | description |
|---|---|---|
hcpcs_code |
string | HCPCS/CPT code |
ef_short_desc |
string (JSON) | extra_fields.short_desc (list) |
ef_long_desc |
string (JSON) | extra_fields.long_desc (list) |
ef_add_dt |
string (JSON) | extra_fields.add_dt (list) |
ef_act_eff_dt |
string (JSON) | extra_fields.act_eff_dt (list) |
ef_term_dt |
string (JSON) | extra_fields.term_dt (list) |
ef_obsolete |
string (JSON) | extra_fields.obsolete (list) |
ef_is_noc |
string (JSON) | extra_fields.is_noc (list) |
response_codes |
string (JSON) | Codes array returned by the API |
response_display |
string (JSON) | Display array returned by the API |
response_extra_fields |
string (JSON) | Extra fields object returned by the API |
url |
string | Request URL when an API call happened; otherwise a cache/fallback sentinel like hcpcs_cache:* |
error_message |
string (nullable) | Error message if lookup failed |
api_run_id |
string | Local pipeline run id |
requested_at_utc |
string | Request timestamp (UTC) or cache-export generation timestamp |
request_params |
string (JSON) | Request params / provenance captured by the pipeline |
response_json |
string (JSON) | Full raw API JSON payload when an API call happened; otherwise a synthetic payload in the same shape |
Parquet Null / Empty-List Audit
Auto-generated by ./build_datasets.sh (or cargo run --release --manifest-path build_datasets/Cargo.toml -- --null-check).
- Generated at (unix seconds): 1771173117
- NPI parquet:
data/output/npi.parquet - HCPCS parquet:
data/output/hcpcs.parquet
Notes:
null_countcounts actual Parquet nulls.empty_list_countcounts the literal string value"[]"(JSON-encoded empty list).
NPI (data/output/npi.parquet)
| column | rows_total | null_count | null_pct | empty_list_count | empty_list_pct |
|---|---|---|---|---|---|
| error_message | 1802136 | 1799569 | 99.86% | 0 | 0.00% |
| other_names | 1802136 | 4176 | 0.23% | 1657485 | 91.97% |
| endpoints | 1802136 | 4176 | 0.23% | 1591727 | 88.32% |
| practice_locations | 1802136 | 4176 | 0.23% | 1480277 | 82.14% |
| identifiers | 1802136 | 4176 | 0.23% | 1208848 | 67.08% |
| addresses | 1802136 | 4176 | 0.23% | 20097 | 1.12% |
| taxonomies | 1802136 | 4176 | 0.23% | 20097 | 1.12% |
| basic | 1802136 | 4176 | 0.23% | 0 | 0.00% |
| results | 1802136 | 4065 | 0.23% | 111 | 0.01% |
| response_json | 1802136 | 2567 | 0.14% | 0 | 0.00% |
| api_run_id | 1802136 | 0 | 0.00% | 0 | 0.00% |
| npi | 1802136 | 0 | 0.00% | 0 | 0.00% |
| request_params | 1802136 | 0 | 0.00% | 0 | 0.00% |
| requested_at_utc | 1802136 | 0 | 0.00% | 0 | 0.00% |
| url | 1802136 | 0 | 0.00% | 0 | 0.00% |
HCPCS (data/output/hcpcs.parquet)
| column | rows_total | null_count | null_pct | empty_list_count | empty_list_pct |
|---|---|---|---|---|---|
| error_message | 10881 | 6271 | 57.63% | 0 | 0.00% |
| ef_act_eff_dt | 10881 | 0 | 0.00% | 4610 | 42.37% |
| ef_add_dt | 10881 | 0 | 0.00% | 4610 | 42.37% |
| ef_is_noc | 10881 | 0 | 0.00% | 4610 | 42.37% |
| ef_long_desc | 10881 | 0 | 0.00% | 4610 | 42.37% |
| ef_obsolete | 10881 | 0 | 0.00% | 4610 | 42.37% |
| ef_short_desc | 10881 | 0 | 0.00% | 4610 | 42.37% |
| ef_term_dt | 10881 | 0 | 0.00% | 4610 | 42.37% |
| response_codes | 10881 | 0 | 0.00% | 4610 | 42.37% |
| response_display | 10881 | 0 | 0.00% | 4610 | 42.37% |
| api_run_id | 10881 | 0 | 0.00% | 0 | 0.00% |
| hcpcs_code | 10881 | 0 | 0.00% | 0 | 0.00% |
| request_params | 10881 | 0 | 0.00% | 0 | 0.00% |
| requested_at_utc | 10881 | 0 | 0.00% | 0 | 0.00% |
| response_extra_fields | 10881 | 0 | 0.00% | 0 | 0.00% |
| response_json | 10881 | 0 | 0.00% | 0 | 0.00% |
| url | 10881 | 0 | 0.00% | 0 | 0.00% |
Unmapped / Unresolved Identifier Counts
For the build that produced this dataset:
- NPI: 24,272 unique NPIs were not successfully mapped/resolved (15,012 request errors; 9,260
not_found).Many of these were invalid NPI identifiers (4,111 unique): 2,928 non-numeric, 971 wrong-length, 205 checksum-invalid (Luhn), and 7 placeholders.
Some NPIs have been inactive/deactivated in NPPES/NPI Registry (status can change over time); when present, check the registry payload for an active/inactive status (and/or NPPES deactivation fields) before treating an NPI as current.
Full format breakdown from triage:
inferred type count % meaning npi_luhn_valid20,161 83.06% looks like a well-formed NPI (10 digits + valid check digit) non_numeric2,928 12.06% contains non-digits (often needs upstream cleaning) numeric_wrong_len971 4.00% all digits but not 10 digits long npi_luhn_invalid205 0.84% 10 digits, but invalid Luhn check digit placeholder_or_invalid7 0.03% placeholder-like values (e.g., all zeros)
- HCPCS/CPT: 4,610 unique codes were not successfully mapped/resolved (4,608
not_found; 2 request errors).Full resolved/unresolved pattern breakdown from triage:
pattern family count % CPT_or_HCPCS_L1_5digit(5-digit CPT/HCPCS)2,169 47.05% HCPCS_level_II(A0000style)474 10.28% CDT(D####)449 9.74% CPT_category_II(####F)358 7.77% alphanum_5char_unknown310 6.72% revenue_code_4digit272 5.90% 4digit_plus_letter_other124 2.69% CPT_PLA(####U)110 2.39% CPT_category_III(####T)96 2.08% word_or_flag78 1.69% unknown57 1.24% HCPCS_L2_plus_modifier39 0.85% CPT_5digit_plus_modifier24 0.52% drg_like_3digit15 0.33% icd10pcs_like_7char11 0.24% modifier_2char7 0.15% numeric_6to8_unknown7 0.15% placeholder_or_invalid6 0.13% CDT_plus_suffix4 0.09% 458 unique codes were flagged by triage as "needs review" (e.g., flags/words, placeholders, or unknown alphanumeric patterns).
The 2 request errors are included in
unknown(for exampleH)015,NT/WKN).
- Downloads last month
- 70