RubyIntelligence commited on
Commit
83d166b
·
verified ·
1 Parent(s): 4b21ec1

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +152 -0
README.md ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FDA Facility Compliance Intelligence
2
+ **Version:** 1.0.0 | **Records:** 132,080 | **Price:** $3,500 | **Source:** FDA (public domain)
3
+
4
+ ## Dataset Summary
5
+ **The dataset's core signal — whether a facility's inspections escalated to a Warning Letter — tracks FDA's own severity classifications: facilities whose most recent inspection was OAI have escalated to a Warning Letter 65.7% of the time, versus 2.5% for NAI — a ~26× relationship you can reproduce directly from this file (`GROUP BY most_recent_classification_code`, averaging `ever_escalated_to_wl`).**
6
+
7
+ Complete facility-level regulatory intelligence for every FDA-regulated establishment with an inspection on record — 132,080 facilities. Each row rolls up a facility's entire FDA history: inspection outcomes (OAI/VAI/NAI), Warning Letters, recalls, import refusals, citation analytics, 510(k) device clearances, and a computed escalation summary, condensed into a transparent 0–100 risk score. Built for pharma/medtech regulatory affairs and quality (RA/QA) teams, supplier-qualification and auditing groups, due-diligence analysts, and investors who need to know a facility's compliance posture at a glance.
8
+
9
+ Current through 2026 — the dataset includes FDA inspections from the most recent regulatory cycles
10
+ (5,713 facilities inspected in 2026, 14,845 in 2025), not a historical snapshot. Quarterly refreshes
11
+ keep it current.
12
+
13
+ ## What This Replaces
14
+ Comparable facility-level FDA regulatory intelligence from incumbent enterprise
15
+ platforms requires annual contracts and enterprise procurement. This dataset
16
+ delivers the same facility-level regulatory history and escalation analytics as a
17
+ one-time, analysis-ready download — no contract, no seat licenses, no platform
18
+ lock-in.
19
+
20
+ ## Source
21
+ All data derives from U.S. FDA public records:
22
+ - **FDA Data Dashboard API** — inspections, inspection citations, inspection classifications,
23
+ compliance actions (Warning Letters / Injunctions / Seizures), and import refusals.
24
+ - **openFDA** — 510(k) device clearances, establishment registrations, device & drug recall
25
+ enforcement reports, and device classification.
26
+ - All sources are U.S. Government works in the **public domain (CC0)**. No PII is included
27
+ (no patient, reporter, or individual-inspector identities).
28
+
29
+ ## The Premium Fields
30
+ The value of this dataset is the **computed regulatory intelligence**, not the raw counts:
31
+
32
+ - **`facility_risk_score` (0–100)** — a transparent composite of a facility's regulatory exposure.
33
+ The full formula is published (see Methodology) so you can audit every point or recompute with
34
+ your own weights from the underlying counts, which are all included.
35
+ - **`ever_escalated_to_wl` / `fastest_escalation_days`** — whether, and how quickly, this facility's
36
+ inspections have historically escalated to Warning Letters. Directionality is enforced: an action
37
+ only counts if it post-dates the inspection.
38
+ - **`repeat_citation_flag` / `most_cited_cfr` / `distinct_cfr_codes`** — citation analytics that
39
+ surface chronic, repeated deficiencies (the same CFR cited across multiple inspections).
40
+ - **Raw counts alongside every signal** — `oai_count`, `warning_letter_count`, `recall_count`,
41
+ `import_refusal_count`, etc. are all present so you are never locked into our thresholds.
42
+
43
+ ## Methodology
44
+ - **Entity resolution.** Records are joined on the FDA **FEINumber** (Facility Establishment
45
+ Identifier), normalized to a trimmed string across every source. 510(k) clearances and import
46
+ refusals carry an FEI directly.
47
+ - **Escalation matching.** For each inspection, the dataset finds compliance actions at the *same
48
+ FEI* whose action date is **strictly after** the inspection end date, and keeps the **nearest**
49
+ one (smallest positive day gap). Directionality is enforced in the join itself, so a Warning
50
+ Letter that predates an inspection can never be counted as escalation. Escalation actions are
51
+ Warning Letters (the canonical case) plus the stronger judicial actions Injunction and Seizure;
52
+ the action type is retained so you can restrict to Warning-Letter-only.
53
+ - **Risk score.** Computed from each facility's history with a published formula:
54
+
55
+ ```
56
+ facility_risk_score = min(100,
57
+ oai_count × 15
58
+ + warning_letter_count × 20
59
+ + recall_count × 10
60
+ + min(import_refusal_count × 2, 20) (import-refusal contribution capped at 20)
61
+ + (repeat_citation_flag ? 10 : 0)
62
+ + (most_recent_classification == OAI ? 15 : 0)
63
+ + recency_factor)
64
+
65
+ recency_factor (awarded only when the most recent inspection outcome was OAI or VAI):
66
+ +10 if that inspection was within 1 year, +5 if within 3 years, +2 if within 5 years
67
+ (evaluated as of the 2026-06-23 build date)
68
+ ```
69
+
70
+ - **Recall attribution.** Recall enforcement reports carry no FEI, so recalls are matched to
71
+ facilities by **normalized firm name** (uppercased, punctuation and common legal suffixes
72
+ removed). The match is deliberately restricted to **unambiguous 1:1 names** — a normalized name
73
+ owned by exactly one facility — to prevent a multi-site chain's recalls from being falsely
74
+ attributed to every location that shares its name.
75
+
76
+ ## Validation
77
+ - **Escalation signal validated (reproducible from this file).** Grouping the shipped rows by
78
+ `most_recent_classification_code` and averaging `ever_escalated_to_wl`, facilities whose most
79
+ recent inspection was OAI (Official Action Indicated) have escalated to a Warning Letter at
80
+ **65.7%**, VAI at **6.0%**, and NAI (No Action Indicated) at **2.5%** — a monotone OAI > VAI > NAI
81
+ ordering (~26× OAI-vs-NAI) confirming the computed escalation fields correlate correctly with
82
+ inspection severity. (If escalation were a join artifact, NAI and OAI would escalate at similar
83
+ rates.)
84
+ - **Directionality enforced.** Zero inspections have a negative inspection→action day gap; every
85
+ Warning Letter counted as escalation post-dates its inspection.
86
+ - **No orphaned escalations.** Every recorded escalation action type exists in the source
87
+ compliance-action data.
88
+ - **Recall attribution restricted** to unambiguous 1:1 facility-name matches to prevent false
89
+ attribution (see Methodology).
90
+ - **Completeness.** Row counts reconcile exactly to the validated master tables.
91
+
92
+ ## Known Limitations
93
+ - **Citation coverage.** Inspection citations cover electronically generated, finalized
94
+ inspections; some manually prepared Form 483s are not present in the FDA citations dataset.
95
+ - **Recall attribution (~35%).** Only recalls with an unambiguous 1:1 firm-name match are
96
+ attributed; multi-site chains that share a normalized name are deliberately excluded to avoid
97
+ false attribution, so recall counts are conservative (under- rather than over-counted).
98
+ - **Inspector-level detail not included.** The FDA citations API does not expose individual
99
+ inspector identity, so inspector-level fields are out of scope for this version.
100
+ - **Risk score is a heuristic.** `facility_risk_score` is a transparent composite indicator, **not**
101
+ an official FDA designation or prediction. All underlying counts are included so you can recompute
102
+ it with your own weights.
103
+ - **Warning Letter coverage.** Warning Letters are attributed to facilities that appear in the
104
+ inspection record; Warning Letters issued to firms without an inspection in the dataset are not
105
+ rolled into a facility row.
106
+ - **Null-by-design escalation timing.** The `fastest_escalation_days` field is null by design for
107
+ facilities that never escalated to a Warning Letter (`ever_escalated_to_wl` = false). This covers
108
+ ~95% of facilities, reflecting that most FDA inspections do not lead to enforcement.
109
+ - **Null-by-design citation field.** The `most_cited_cfr` field is null for facilities with no
110
+ posted citations on record (~64% of facilities). This is accurate — many inspections,
111
+ particularly those classified NAI, result in no citations. All citation counts are included so
112
+ this is transparent.
113
+
114
+ ## Field Definitions
115
+ | Field | Type | Description |
116
+ |-------|------|-------------|
117
+ | `fei_number` | string | FDA Facility Establishment Identifier (FEI) — the cross-source join key. |
118
+ | `legal_name` | string | Facility legal name, taken from its most recent inspection record. |
119
+ | `city` | string | Facility city (most recent inspection record). |
120
+ | `state` | string | Facility state/province (most recent inspection record). |
121
+ | `country` | string | Facility country (most recent inspection record). |
122
+ | `product_types` | list<string> | Distinct FDA product areas inspected at this facility (e.g. Drugs, Devices, Foods). |
123
+ | `total_inspections` | integer | Count of distinct FDA inspections on record for this facility. |
124
+ | `oai_count` | integer | Inspections classified Official Action Indicated (OAI) — the most serious outcome. |
125
+ | `vai_count` | integer | Inspections classified Voluntary Action Indicated (VAI). |
126
+ | `nai_count` | integer | Inspections classified No Action Indicated (NAI). |
127
+ | `most_recent_inspection_date` | date | End date of the facility's most recent inspection. |
128
+ | `most_recent_classification` | string | Classification of the most recent inspection (full text). |
129
+ | `most_recent_classification_code` | string | Classification code of the most recent inspection (NAI/VAI/OAI). |
130
+ | `warning_letter_count` | integer | Count of Warning Letter compliance actions issued to this FEI. |
131
+ | `recall_count` | integer | Count of device + drug recalls attributed to this facility. Recalls carry no FEI, so they are matched by unambiguous 1:1 normalized firm name (see Methodology). |
132
+ | `import_refusal_count` | integer | Count of FDA import refusals recorded against this FEI. |
133
+ | `total_citations` | integer | Total inspection citations (483 observations) recorded across all inspections. |
134
+ | `distinct_cfr_codes` | integer | Number of distinct CFR codes cited across the facility's inspections. |
135
+ | `repeat_citation_flag` | boolean | True if the same CFR code was cited across 2+ distinct inspections. |
136
+ | `most_cited_cfr` | string | The CFR code cited across the most distinct inspections at this facility. Null for facilities with no posted citations on record (~64% of facilities). |
137
+ | `ever_escalated_to_wl` | boolean | True if any inspection at this facility was followed by a Warning Letter (or stronger). |
138
+ | `fastest_escalation_days` | integer | Shortest observed gap (days) from an inspection end to a subsequent Warning Letter; null by design when the facility never escalated (`ever_escalated_to_wl` = false), which covers ~95% of facilities. |
139
+ | `has_510k_clearance` | boolean | True if the facility holds at least one 510(k) device clearance. |
140
+ | `count_510k` | integer | Number of 510(k) device clearances linked to this facility's FEI. |
141
+ | `facility_risk_score` | float | Composite regulatory-risk score, 0–100 (higher = more regulatory exposure). Heuristic, not an official FDA designation. Formula: min(100, oai_count*15 + warning_letter_count*20 + recall_count*10 + min(import_refusal_count*2,20) + repeat_citation_flag*10 + (recent OAI)*15 + recency_factor). |
142
+
143
+ ## Update Cadence
144
+ Quarterly, tracking FDA Data Dashboard refreshes.
145
+
146
+ ## License
147
+ Derived entirely from U.S. federal government public records (FDA Data Dashboard, openFDA), which
148
+ are in the public domain. This structured, enriched version is provided under **CC BY 4.0** —
149
+ attribution required.
150
+
151
+ ## How to Access the Full Dataset
152
+ Full dataset available at [Ruby Intelligence on Gumroad](https://rubyintelligence.gumroad.com/l/izpoe).