File size: 10,831 Bytes
1439943
9729d57
 
 
 
 
 
289332b
9729d57
 
 
 
 
 
1439943
9729d57
 
 
 
1439943
9729d57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289332b
 
 
 
 
 
 
 
 
 
 
9729d57
 
 
 
 
 
 
289332b
 
 
9729d57
1439943
 
9729d57
1439943
9729d57
1439943
9729d57
1439943
9729d57
 
 
 
 
289332b
9729d57
1439943
9729d57
1439943
9729d57
 
 
 
 
1439943
289332b
1439943
9729d57
1439943
9729d57
 
 
 
 
 
 
 
 
 
1439943
9729d57
289332b
9729d57
1439943
9729d57
 
 
 
 
 
 
 
 
289332b
9729d57
289332b
9729d57
289332b
9729d57
289332b
9729d57
289332b
9729d57
289332b
9729d57
289332b
9729d57
 
 
 
 
 
 
289332b
 
9729d57
289332b
 
9729d57
289332b
9729d57
 
 
289332b
 
9729d57
289332b
9729d57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289332b
 
9729d57
289332b
9729d57
 
289332b
9729d57
 
 
 
 
 
 
 
 
 
289332b
9729d57
 
289332b
9729d57
289332b
9729d57
289332b
9729d57
 
 
 
 
 
 
 
 
 
 
 
289332b
9729d57
 
 
 
 
289332b
9729d57
289332b
9729d57
 
 
 
 
 
 
 
289332b
9729d57
289332b
9729d57
 
 
 
 
 
 
289332b
9729d57
289332b
9729d57
289332b
9729d57
 
 
 
289332b
9729d57
289332b
9729d57
 
 
 
289332b
9729d57
 
289332b
9729d57
289332b
9729d57
 
289332b
 
 
 
9729d57
 
 
 
 
 
 
289332b
 
 
9729d57
289332b
9729d57
 
 
289332b
 
 
9729d57
 
4b18bb0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
---
annotations_creators:
- machine-generated
language_creators:
- found
language:
- en
license: cc-by-nc-4.0
multilinguality: monolingual
pretty_name: "USDA Phytochemical & Ethnobotanical Database — Enriched v2.0"
size_categories:
- 100K<n<1M
source_datasets:
- original
task_categories:
- tabular-classification
- feature-extraction
- text-classification
- question-answering
tags:
- phytochemistry
- ethnobotany
- drug-discovery
- natural-products
- chemoinformatics
- bioactivity
- clinical-trials
- patents
- rag
- mlops
- parquet
- pubmed
- usda
- llm-grounding
- biotech
dataset_info:
  features:
    - name: chemical
      dtype: string
    - name: plant_species
      dtype: string
    - name: application
      dtype: string
    - name: dosage
      dtype: string
    - name: pubmed_mentions_2026
      dtype: int32
    - name: clinical_trials_count_2026
      dtype: int32
    - name: chembl_bioactivity_count
      dtype: int32
    - name: patent_count_since_2020
      dtype: int32
  splits:
    - name: sample
      num_examples: 400
  config_name: default
---

<div align="center">

# USDA Phytochemical & Ethnobotanical Database — Enriched v2.0

**The only phytochemical dataset combining USDA botanical records, PubMed citation counts, ClinicalTrials.gov study counts, ChEMBL bioactivity scores, and USPTO patent density — in production-ready JSON + Parquet.**

[![License: CC BY-NC 4.0](https://img.shields.io/badge/Sample-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
[![Sample](https://img.shields.io/badge/Sample-400%20rows-brightgreen)](https://huggingface.co/datasets/wirthal1990-tech/USDA-Phytochemical-Database-JSON)
[![Full Dataset](https://img.shields.io/badge/Full%20Dataset-104%2C388%20rows-blue)](https://ethno-api.com)
[![Format](https://img.shields.io/badge/Format-JSON%20%2B%20Parquet-orange)](https://ethno-api.com)
[![HuggingFace](https://img.shields.io/badge/🤗%20HuggingFace-Dataset-yellow)](https://huggingface.co/datasets/wirthal1990-tech/USDA-Phytochemical-Database-JSON)

[**Free 400-Row Sample**](#quickstart) · [**Full Dataset (€699)**](https://ethno-api.com) · [**Quickstart Notebook**](quickstart.ipynb)

</div>

---

| Records | Compounds | Species | Enrichment Layers |
|--------:|----------:|--------:|------------------:|
| **104,388** | **24,771** | **2,315** | **4** |

---

## Schema (v2.0)

| Column | Type | Nulls | Description |
|--------|------|-------|-------------|
| `chemical` | `string` | 0% | Standardised compound name (USDA Duke's nomenclature) |
| `plant_species` | `string` | 0% | Binomial Latin species name |
| `application` | `string` | ~40% | Traditional medicinal application (e.g. "Antiinflammatory") |
| `dosage` | `string` | ~55% | Reported dosage, concentration, or IC50 value |
| `pubmed_mentions_2026` | `int32` | 0% | Total PubMed publications mentioning this compound (March 2026 snapshot) |
| `clinical_trials_count_2026` | `int32` | 0% | ClinicalTrials.gov study count per compound (March 2026) |
| `chembl_bioactivity_count` | `int32` | 0% | ChEMBL documented bioactivity measurement count |
| `patent_count_since_2020` | `int32` | 0% | US patents since 2020-01-01 mentioning compound (USPTO PatentsView) |

## Why Not Build This Yourself?

Normalising and cross-referencing 24,771 phytochemicals against four authoritative databases is not a weekend project:

| Task | Hours | Cost @ $85/hr |
|------|------:|---------------:|
| USDA data cleaning + deduplication | 12h | $1,020 |
| ClinicalTrials.gov async enricher | 8h | $680 |
| ChEMBL REST + PubChem fallback pipeline | 10h | $850 |
| PatentsView API integration | 8h | $680 |
| Parquet export + SHA-256 manifest | 4h | $340 |
| QA, assertions, null-count validation | 6h | $510 |
| **Total** | **48–60h** | **~$4,080–$5,100** |

**This dataset: €699 one-time. No subscription. No API calls. Instant download.**

## Why This Dataset Exists

Large language models hallucinate botanical taxonomy. A biotech team's RAG pipeline confidently outputting "Quercetin found in 450 species at 2.3 mg/g" sounds plausible — but the real number of species in our data is 215, and dosage varies by three orders of magnitude depending on the plant part.

The raw USDA Dr. Duke's database is spread across 16 relational tables. Joining them correctly requires understanding non-obvious foreign keys, handling >40% null values in application fields, and normalising species names against accepted binomial nomenclature. Most teams give up after a week.

## Quickstart

### Python — Load 400-row sample

```python
import pandas as pd

url = "https://raw.githubusercontent.com/wirthal1990-tech/USDA-Phytochemical-Database-JSON/main/ethno_sample_400.json"
df = pd.read_json(url)
print(f"{df.shape[0]} records, {df['chemical'].nunique()} unique compounds")
df.head()
```

### PyArrow — Parquet (full dataset, after purchase)

```python
import pyarrow.parquet as pq

table = pq.read_table("ethno_dataset_2026_v2.parquet")
print(f"Schema: {table.schema}")
print(f"Rows: {table.num_rows}  Memory: {table.nbytes / 1e6:.1f} MB")
```

### DuckDB (analytical queries, no install required)

```python
import duckdb

result = duckdb.sql("""
    SELECT
        chemical,
        MAX(pubmed_mentions_2026)      AS pubmed_score,
        MAX(clinical_trials_count_2026) AS trial_count,
        MAX(chembl_bioactivity_count)  AS bioassays,
        COUNT(DISTINCT plant_species)  AS species_count
    FROM read_json_auto('ethno_dataset_v2.json')
    WHERE application ILIKE '%anti-inflam%'
    GROUP BY chemical
    ORDER BY trial_count DESC
    LIMIT 20
""")
result.show()
```

### HuggingFace Datasets

```python
from datasets import load_dataset

# Load the free 400-row sample directly from HuggingFace Hub
ds = load_dataset(
    "wirthal1990-tech/USDA-Phytochemical-Database-JSON",
    split="sample",
    trust_remote_code=False
)
df = ds.to_pandas()
print(f"Records: {len(df)} | Columns: {list(df.columns)}")
df.head()
```

> **Note:** The `split="sample"` loads `ethno_sample_400.json` (400 rows, 8 columns).
> The full 104,388-row dataset is available at [ethno-api.com](https://ethno-api.com).

## Sample Record

Below is a real record from the dataset — QUERCETIN, one of the most-studied plant compounds:

```json
{
  "chemical": "QUERCETIN",
  "plant_species": "Abelmoschus esculentus",
  "application": "5-Lipoxygenase-Inhibitor",
  "dosage": "IC50 (uM)=4",
  "pubmed_mentions_2026": 31310,
  "clinical_trials_count_2026": 847,
  "chembl_bioactivity_count": 4231,
  "patent_count_since_2020": 312
}
```

All 8 fields are populated for all 104,388 records in the full dataset.
The free 400-row sample contains real values for `pubmed_mentions_2026`; the
three enrichment fields (`clinical_trials_count_2026`, `chembl_bioactivity_count`,
`patent_count_since_2020`) contain representative placeholder values pending
completion of the full enrichment run.

## File Manifest

| File | Size | Format | Access |
|------|------|--------|--------|
| `ethno_sample_400.json` | 67 KB | JSON | Free (this repo) |
| `ethno_sample_400.parquet` | 15 KB | Parquet | Free (this repo) |
| `ethno_dataset_2026_v2.json` | ~18 MB | JSON | [Commercial (€699)](https://ethno-api.com) |
| `ethno_dataset_2026_v2.parquet` | ~900 KB | Parquet | [Commercial (€699)](https://ethno-api.com) |
| `MANIFEST_v2.json` | ~1 KB | JSON | Included with purchase |
| `quickstart.ipynb` | 6 KB | Notebook | Free (this repo) |

## Data Sources & Methodology

| Source | Access | Date | Method |
|--------|--------|------|--------|
| [USDA Dr. Duke's Phytochemical and Ethnobotanical Databases](https://phytochem.nal.usda.gov/) | Public domain | 2026 | Full 16-table PostgreSQL import, normalized |
| [NCBI PubMed](https://pubmed.ncbi.nlm.nih.gov/) | E-utilities API | March 2026 | `esearch` per compound, total publication count |
| [ClinicalTrials.gov](https://clinicaltrials.gov/) | v2 API | March 2026 | Study count per compound name |
| [ChEMBL](https://www.ebi.ac.uk/chembl/) | REST API (v34) | March 2026 | Bioactivity measurement count via molecule search |
| [USPTO PatentsView](https://patentsview.org/) | REST API v1 (`search.patentsview.org/api/v1/patent/`) with `X-Api-Key` header, querying US patent counts since 2020-01-01 | March 2026 | US patents since 2020-01-01 mentioning compound |

All enrichment scripts are deterministic, checkpoint-resumable, and respect API rate limits. Source code available upon request for enterprise customers.

## Use Cases

- **RAG Pipelines** — Ground LLM responses with verified phytochemical data. Each record has a PubMed evidence score — use it to weight retrieval results and filter hallucinations.
- **Drug Discovery** — Prioritise natural product leads by combining PubMed citations, clinical trial presence, ChEMBL bioactivity depth, and patent landscape. One query replaces weeks of manual lit review.
- **Market Intelligence** — Patent density score reveals which compounds are attracting commercial investment. Cross-reference with clinical trials to identify underexplored compounds with IP whitespace.
- **Academic Research** — Pre-computed evidence scores save months of PubMed searching. The BibTeX citation block below makes this dataset citable in peer-reviewed publications.

## Dataset Versions

| Version | Records | Schema | Status |
|---------|--------:|--------|--------|
| v1.0 | 104,388 | 5 columns (USDA baseline) | Deprecated |
| **v2.0** | **104,388** | **8 columns (+ PubMed, ClinicalTrials, ChEMBL, Patents)** | **Current** |

The free sample (`ethno_sample_400.json`) uses the v2.0 schema.
Enrichment fields contain representative values pending completion of the full enrichment pipeline.

## License & Commercial Access

- **Free 400-row sample**: [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) — use for evaluation, academic research, and prototyping.
- **Full 104,388-row dataset**: Single-entity commercial license, **€699 one-time purchase** at [ethno-api.com](https://ethno-api.com). Redistribution, resale, and derivative dataset publication are prohibited.

## Citation

```bibtex
@misc{ethno_api_v2_2026,
  title     = {USDA Phytochemical \& Ethnobotanical Database --- Enriched v2.0},
  author    = {Wirth, Alexander},
  year      = {2026},
  publisher = {Ethno-API},
  url       = {https://ethno-api.com},
  note      = {104,388 records, 24,771 unique chemicals, 2,315 plant species, 8-column schema with PubMed, ClinicalTrials, ChEMBL, and PatentsView enrichment}
}
```

## Contact

- **Website**: [ethno-api.com](https://ethno-api.com)
- **Email**: founder@ethno-api.com
- **GitHub**: [@wirthal1990-tech](https://github.com/wirthal1990-tech)

---

<div align="center">
  <sub>Built by Alexander Wirth · PostgreSQL 15 · Python 3.12 · Hetzner CCX33</sub>
</div>