Alexander Wirth commited on
Commit ·
ab2b707
1
Parent(s): 3e3e98a
v2.3.1: Complete channel sync — all files v2.3.1, 12 cols, English-only, pretty-printed samples
Browse files- MANIFEST_v2.json +4 -0
- METHODOLOGY.md +7 -3
- README.md +10 -10
- UPDATE_POLICY.md +10 -2
- ethno_sample_400.json +0 -0
- generate_samples_v23.py +90 -0
- llms.txt +8 -6
- noise_exclusion_list.txt +3 -3
- quickstart.ipynb +2 -2
MANIFEST_v2.json
CHANGED
|
@@ -6,6 +6,10 @@
|
|
| 6 |
"unique_species": 2313,
|
| 7 |
"sha256_parquet": "6f72ab8e13437bd04b5a84a22539216191486b477bc4abb009b24ad2ba933910",
|
| 8 |
"sha256_json": "3b042206b5c65ef9b051fff7f891ca09197be447bf715313ff290008b0de2136",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
"file_sizes_mb": {
|
| 10 |
"parquet": 1.423,
|
| 11 |
"json": 27.765
|
|
|
|
| 6 |
"unique_species": 2313,
|
| 7 |
"sha256_parquet": "6f72ab8e13437bd04b5a84a22539216191486b477bc4abb009b24ad2ba933910",
|
| 8 |
"sha256_json": "3b042206b5c65ef9b051fff7f891ca09197be447bf715313ff290008b0de2136",
|
| 9 |
+
"filenames": {
|
| 10 |
+
"json": "ethno_dataset_2026_v2.3.1.json",
|
| 11 |
+
"parquet": "ethno_dataset_2026_v2.3.1.parquet"
|
| 12 |
+
},
|
| 13 |
"file_sizes_mb": {
|
| 14 |
"parquet": 1.423,
|
| 15 |
"json": 27.765
|
METHODOLOGY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
# Methodology — Ethno-API Phytochemical Dataset v2.3
|
| 2 |
|
| 3 |
-
> **Schema v2.3 · 76,907 records · 24,746 compounds · 2,313 species ·
|
| 4 |
|
| 5 |
---
|
| 6 |
|
|
@@ -188,6 +188,7 @@ All enrichment scripts are available in the repository:
|
|
| 188 |
| v2.1 | 2026-03 | 10 (+pubchem_cid, canonical_smiles) | 76,907 | PubChem CID + SMILES enrichment (10,484 chemicals resolved, 71.8% record coverage — corrected to 42.4% in v2.2) |
|
| 189 |
| v2.2 | 2026-03 | 10 (same schema) | 76,907 | Stereo-prefix normalization for CT matching (+2 compounds), corrected SMILES coverage reporting (42.4% of unique chemicals), local CT XML matching replaces API |
|
| 190 |
| **v2.3** | **2026-03** | **10 (same schema)** | **76,907** | **CTS synonym enrichment: 997 compounds resolved via PubChem name variants (hyphen→space normalization), PubChem CID coverage 42.4%→46.4% unique / 71.8%→75.4% records** |
|
|
|
|
| 191 |
|
| 192 |
---
|
| 193 |
|
|
@@ -204,4 +205,7 @@ All enrichment scripts are available in the repository:
|
|
| 204 |
| `ethno_dataset_2026_v2.3.json` | 25.6 MB | `956cd7b08d279792e132629ce608ab72eb9249b09ac84ed9c60bd108acb5057e` |
|
| 205 |
| `ethno_dataset_2026_v2.3.parquet` | 1,211 KB | `4b7351048db025cbf575b4538e66afd70729c327b8a0b48ead87d5546a39762e` |
|
| 206 |
|
| 207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Methodology — Ethno-API Phytochemical Dataset v2.3.1
|
| 2 |
|
| 3 |
+
> **Schema v2.3.1 · 76,907 records · 24,746 compounds · 2,313 species · 12 fields**
|
| 4 |
|
| 5 |
---
|
| 6 |
|
|
|
|
| 188 |
| v2.1 | 2026-03 | 10 (+pubchem_cid, canonical_smiles) | 76,907 | PubChem CID + SMILES enrichment (10,484 chemicals resolved, 71.8% record coverage — corrected to 42.4% in v2.2) |
|
| 189 |
| v2.2 | 2026-03 | 10 (same schema) | 76,907 | Stereo-prefix normalization for CT matching (+2 compounds), corrected SMILES coverage reporting (42.4% of unique chemicals), local CT XML matching replaces API |
|
| 190 |
| **v2.3** | **2026-03** | **10 (same schema)** | **76,907** | **CTS synonym enrichment: 997 compounds resolved via PubChem name variants (hyphen→space normalization), PubChem CID coverage 42.4%→46.4% unique / 71.8%→75.4% records** |
|
| 191 |
+
| **v2.3.1** | **2026-04** | **12 (+compound_type, patent_count_method)** | **76,907** | **CID audit, compound classification, patent method transparency, RESIN/RESINS CID correction, inorganic/generic reclassification** |
|
| 192 |
|
| 193 |
---
|
| 194 |
|
|
|
|
| 205 |
| `ethno_dataset_2026_v2.3.json` | 25.6 MB | `956cd7b08d279792e132629ce608ab72eb9249b09ac84ed9c60bd108acb5057e` |
|
| 206 |
| `ethno_dataset_2026_v2.3.parquet` | 1,211 KB | `4b7351048db025cbf575b4538e66afd70729c327b8a0b48ead87d5546a39762e` |
|
| 207 |
|
| 208 |
+
| `ethno_dataset_2026_v2.3.1.json` | 27.8 MB | `3b042206b5c65ef9b051fff7f891ca09197be447bf715313ff290008b0de2136` |
|
| 209 |
+
| `ethno_dataset_2026_v2.3.1.parquet` | 1,458 KB | `6f72ab8e13437bd04b5a84a22539216191486b477bc4abb009b24ad2ba933910` |
|
| 210 |
+
|
| 211 |
+
Export timestamp: `2026-04-11T22:47:02Z` (v2.3.1 final)
|
README.md
CHANGED
|
@@ -126,7 +126,7 @@ Full methodology is documented in `METHODOLOGY.md`. Known limitations are listed
|
|
| 126 |
| `chembl_bioactivity_count` | `int32` | 0% | ChEMBL documented bioactivity measurement count |
|
| 127 |
| `patent_count_since_2020` | `int32` | ~0.9% | US patents since 2020-01-01 mentioning compound (USPTO PatentsView) |
|
| 128 |
| `pubchem_cid` | `int64` | ~28.2% | PubChem Compound ID (CID) — resolved via PubChem PUG REST (March 2026) |
|
| 129 |
-
| `canonical_smiles` | `string` | ~28.2% | Canonical SMILES notation — molecular structure from PubChem (75.4% of unique compounds resolved in v2.3) |
|
| 130 |
| `compound_type` | `string` | 0% | Classification: `discrete_phytochemical`, `substance_class`, `complex_mixture`, `inorganic_element`, `generic_ambiguous` — added in v2.3.1 |
|
| 131 |
| `patent_count_method` | `string` | ~0.9% | Query methodology: `name_based_with_cid`, `name_based_no_cid`, `name_based_invalidated`, `NULL` — added in v2.3.1 |
|
| 132 |
|
|
@@ -136,11 +136,11 @@ Full methodology is documented in `METHODOLOGY.md`. Known limitations are listed
|
|
| 136 |
|
| 137 |
| Tier | Price | Includes | Purchase |
|
| 138 |
|------|-------|----------|----------|
|
| 139 |
-
| **Single Entity** | **€699**
|
| 140 |
-
| **Team** | **€1,349**
|
| 141 |
-
| **Enterprise** | **€1,699**
|
| 142 |
|
| 143 |
-
>
|
| 144 |
|
| 145 |
---
|
| 146 |
|
|
@@ -246,18 +246,18 @@ Below is a real record from the dataset — QUERCETIN, one of the most-studied p
|
|
| 246 |
}
|
| 247 |
```
|
| 248 |
|
| 249 |
-
All 76,907 records contain all 12 schema fields. The 4 enrichment columns are always non-null; `pubchem_cid` and `canonical_smiles` are filled for 75.4% of unique compounds (18,675 of 24,746 resolved via PubChem PUG REST in v2.3); `compound_type` and `patent_count_method` are populated for all records; `application` (~50% null) and `dosage` (~87% null) reflect USDA source gaps. Unresolved compounds are phytochemical trivial names, mixture descriptions, or non-specific ethnobotanical terms not indexed in PubChem by name.
|
| 250 |
The free 400-row sample contains real, final enrichment values across all five layers.
|
| 251 |
|
| 252 |
## File Manifest
|
| 253 |
|
| 254 |
| File | Size | Format | Access |
|
| 255 |
|------|------|--------|--------|
|
| 256 |
-
| `ethno_sample_400.json` |
|
| 257 |
| `ethno_sample_400.parquet` | 20 KB | Parquet | Free (this repo) |
|
| 258 |
| `quickstart.ipynb` | 9 KB | Notebook | Free (this repo) |
|
| 259 |
-
| `ethno_dataset_2026_v2.3.json` | ~28 MB | JSON | Included in all tiers |
|
| 260 |
-
| `ethno_dataset_2026_v2.3.parquet` | ~1.5 MB | Parquet | Included in all tiers |
|
| 261 |
| `MANIFEST_v2.json` (SHA-256) | ~1 KB | JSON | Included in all tiers |
|
| 262 |
| `duckdb_queries.sql` (20 Queries) | ~13 KB | SQL | Team + Enterprise |
|
| 263 |
| `compound_priority_score.py` | ~5 KB | Python | Team + Enterprise |
|
|
@@ -330,7 +330,7 @@ Ethno-API is the deterministic answer to these pipeline requirements.
|
|
| 330 |
- **Team License — €1,349** one-time: [**Buy →**](https://buy.stripe.com/dRm7sK9cP1Wj0v06Y0ebu03?utm_source=github&utm_medium=readme&utm_campaign=launch_2026_03) — all employees of 1 legal entity, unlimited internal users, includes analytics toolkit.
|
| 331 |
- **Enterprise License — €1,699** one-time: [**Contact for Enterprise →**](mailto:founder@ethno-api.com?subject=Enterprise%20License%20Inquiry) — multi-entity / group use, internal product integration rights, full RAG integration toolkit.
|
| 332 |
|
| 333 |
-
>
|
| 334 |
|
| 335 |
```bibtex
|
| 336 |
@misc{ethno_api_v23_2026,
|
|
|
|
| 126 |
| `chembl_bioactivity_count` | `int32` | 0% | ChEMBL documented bioactivity measurement count |
|
| 127 |
| `patent_count_since_2020` | `int32` | ~0.9% | US patents since 2020-01-01 mentioning compound (USPTO PatentsView) |
|
| 128 |
| `pubchem_cid` | `int64` | ~28.2% | PubChem Compound ID (CID) — resolved via PubChem PUG REST (March 2026) |
|
| 129 |
+
| `canonical_smiles` | `string` | ~28.2% | Canonical SMILES notation — molecular structure from PubChem (75.4% of unique compounds resolved in v2.3/v2.3.1) |
|
| 130 |
| `compound_type` | `string` | 0% | Classification: `discrete_phytochemical`, `substance_class`, `complex_mixture`, `inorganic_element`, `generic_ambiguous` — added in v2.3.1 |
|
| 131 |
| `patent_count_method` | `string` | ~0.9% | Query methodology: `name_based_with_cid`, `name_based_no_cid`, `name_based_invalidated`, `NULL` — added in v2.3.1 |
|
| 132 |
|
|
|
|
| 136 |
|
| 137 |
| Tier | Price | Includes | Purchase |
|
| 138 |
|------|-------|----------|----------|
|
| 139 |
+
| **Single Entity** | **€699** net | JSON + Parquet + SHA-256 Manifest. 1 legal entity, internal use. Perpetual license. | [**Buy Now →**](https://buy.stripe.com/00w6oGgFh58v6Toeqsebu02?utm_source=github&utm_medium=readme&utm_campaign=launch_2026_03) |
|
| 140 |
+
| **Team** | **€1,349** net | Everything in Single + `duckdb_queries.sql` (20 queries, 5 categories) + `compound_priority_score.py` + 4 pre-computed views (Top-500 by PubMed, Trials, Patent Density, Anti-Inflammatory Panel). Unlimited internal users within 1 legal entity. | [**Buy Now →**](https://buy.stripe.com/dRm7sK9cP1Wj0v06Y0ebu03?utm_source=github&utm_medium=readme&utm_campaign=launch_2026_03) |
|
| 141 |
+
| **Enterprise** | **€1,699** net | Everything in Team + `snowflake_load.sql` + `chromadb_ingest.py` + `pinecone_ingest.py` + `embedding_guide.md` (ClinicalBERT, RAG pipelines) + Compound Opportunity Matrix + Clinical Pipeline Gaps CSV + Pre-chunked RAG JSONL. Multi-entity / group use, internal product integration permitted. | [**Contact for Enterprise →**](mailto:founder@ethno-api.com?subject=Enterprise%20License%20Inquiry) |
|
| 142 |
|
| 143 |
+
> No VAT charged (German small business exemption, §19 UStG). All prices net. One-time purchase — no subscription, no recurring costs.
|
| 144 |
|
| 145 |
---
|
| 146 |
|
|
|
|
| 246 |
}
|
| 247 |
```
|
| 248 |
|
| 249 |
+
All 76,907 records contain all 12 schema fields. The 4 enrichment columns are always non-null; `pubchem_cid` and `canonical_smiles` are filled for 75.4% of unique compounds (18,675 of 24,746 resolved via PubChem PUG REST in v2.3/v2.3.1); `compound_type` and `patent_count_method` are populated for all records; `application` (~50% null) and `dosage` (~87% null) reflect USDA source gaps. Unresolved compounds are phytochemical trivial names, mixture descriptions, or non-specific ethnobotanical terms not indexed in PubChem by name.
|
| 250 |
The free 400-row sample contains real, final enrichment values across all five layers.
|
| 251 |
|
| 252 |
## File Manifest
|
| 253 |
|
| 254 |
| File | Size | Format | Access |
|
| 255 |
|------|------|--------|--------|
|
| 256 |
+
| `ethno_sample_400.json` | 179 KB | JSON | Free (this repo) |
|
| 257 |
| `ethno_sample_400.parquet` | 20 KB | Parquet | Free (this repo) |
|
| 258 |
| `quickstart.ipynb` | 9 KB | Notebook | Free (this repo) |
|
| 259 |
+
| `ethno_dataset_2026_v2.3.1.json` | ~28 MB | JSON | Included in all tiers |
|
| 260 |
+
| `ethno_dataset_2026_v2.3.1.parquet` | ~1.5 MB | Parquet | Included in all tiers |
|
| 261 |
| `MANIFEST_v2.json` (SHA-256) | ~1 KB | JSON | Included in all tiers |
|
| 262 |
| `duckdb_queries.sql` (20 Queries) | ~13 KB | SQL | Team + Enterprise |
|
| 263 |
| `compound_priority_score.py` | ~5 KB | Python | Team + Enterprise |
|
|
|
|
| 330 |
- **Team License — €1,349** one-time: [**Buy →**](https://buy.stripe.com/dRm7sK9cP1Wj0v06Y0ebu03?utm_source=github&utm_medium=readme&utm_campaign=launch_2026_03) — all employees of 1 legal entity, unlimited internal users, includes analytics toolkit.
|
| 331 |
- **Enterprise License — €1,699** one-time: [**Contact for Enterprise →**](mailto:founder@ethno-api.com?subject=Enterprise%20License%20Inquiry) — multi-entity / group use, internal product integration rights, full RAG integration toolkit.
|
| 332 |
|
| 333 |
+
> No VAT charged (German small business exemption, §19 UStG).
|
| 334 |
|
| 335 |
```bibtex
|
| 336 |
@misc{ethno_api_v23_2026,
|
UPDATE_POLICY.md
CHANGED
|
@@ -12,9 +12,17 @@ Next scheduled update: Q1 2027.
|
|
| 12 |
- PubChem PUG REST API (CID + Canonical SMILES)
|
| 13 |
|
| 14 |
## Versioning
|
| 15 |
-
Current version: v2.3 (
|
| 16 |
All versions are tagged in this repository.
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
## v2.3 Changelog
|
| 19 |
- PubChem CID/SMILES coverage: 75.4% (up from 71.8% in v2.2)
|
| 20 |
- CTS worker resolved 997 additional compounds via PubChem PUG-REST name-to-CID
|
|
@@ -23,7 +31,7 @@ All versions are tagged in this repository.
|
|
| 23 |
|
| 24 |
## Buyer Notifications
|
| 25 |
All dataset buyers receive email notification when a new version is available.
|
| 26 |
-
Buyers of v2.0, v2.1, or v2.
|
| 27 |
|
| 28 |
## Breaking Changes
|
| 29 |
Schema changes are announced minimum 30 days in advance via GitHub Discussions.
|
|
|
|
| 12 |
- PubChem PUG REST API (CID + Canonical SMILES)
|
| 13 |
|
| 14 |
## Versioning
|
| 15 |
+
Current version: v2.3.1 (April 2026)
|
| 16 |
All versions are tagged in this repository.
|
| 17 |
|
| 18 |
+
## v2.3.1 Changelog
|
| 19 |
+
- Added compound_type column (5 categories: discrete_phytochemical, substance_class, complex_mixture, inorganic_element, generic_ambiguous)
|
| 20 |
+
- Added patent_count_method column (query methodology transparency)
|
| 21 |
+
- RESIN/RESINS CID correction (CID 133110026 was alpha-Copaene, set to NULL)
|
| 22 |
+
- Forensic audit corrections for inorganic/generic compounds
|
| 23 |
+
- PubChem CID/SMILES coverage: 75.4% (unchanged from v2.3)
|
| 24 |
+
- DOI: 10.5281/zenodo.19265853
|
| 25 |
+
|
| 26 |
## v2.3 Changelog
|
| 27 |
- PubChem CID/SMILES coverage: 75.4% (up from 71.8% in v2.2)
|
| 28 |
- CTS worker resolved 997 additional compounds via PubChem PUG-REST name-to-CID
|
|
|
|
| 31 |
|
| 32 |
## Buyer Notifications
|
| 33 |
All dataset buyers receive email notification when a new version is available.
|
| 34 |
+
Buyers of v2.0, v2.1, v2.2, or v2.3 receive the v2.3.1 update free of charge.
|
| 35 |
|
| 36 |
## Breaking Changes
|
| 37 |
Schema changes are announced minimum 30 days in advance via GitHub Discussions.
|
ethno_sample_400.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
generate_samples_v23.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
generate_samples_v23.py
|
| 4 |
+
Generates ethno_sample_400.json and ethno_sample_400.parquet
|
| 5 |
+
from the v2.3 master dataset. Guarantees 100% schema integrity.
|
| 6 |
+
"""
|
| 7 |
+
import json
|
| 8 |
+
import pathlib
|
| 9 |
+
|
| 10 |
+
MASTER = pathlib.Path("/opt/ethno-enrichment/delivery/ethno_dataset_2026_v2.3.json")
|
| 11 |
+
OUT_DIR = pathlib.Path(__file__).parent
|
| 12 |
+
SAMPLE_SIZE = 400
|
| 13 |
+
|
| 14 |
+
# Canonical field order (matches MANIFEST_v2.json)
|
| 15 |
+
FIELD_ORDER = [
|
| 16 |
+
"chemical",
|
| 17 |
+
"plant_species",
|
| 18 |
+
"application",
|
| 19 |
+
"dosage",
|
| 20 |
+
"pubmed_mentions_2026",
|
| 21 |
+
"clinical_trials_count_2026",
|
| 22 |
+
"chembl_bioactivity_count",
|
| 23 |
+
"patent_count_since_2020",
|
| 24 |
+
"pubchem_cid",
|
| 25 |
+
"canonical_smiles",
|
| 26 |
+
]
|
| 27 |
+
|
| 28 |
+
print(f"Loading master: {MASTER}")
|
| 29 |
+
with open(MASTER) as f:
|
| 30 |
+
master = json.load(f)
|
| 31 |
+
|
| 32 |
+
print(f"Master records: {len(master):,}")
|
| 33 |
+
assert len(master) == 76_907, f"Expected 76,907, got {len(master)}"
|
| 34 |
+
|
| 35 |
+
# Extract first 400, normalize field order and types
|
| 36 |
+
sample = []
|
| 37 |
+
for rec in master[:SAMPLE_SIZE]:
|
| 38 |
+
row = {}
|
| 39 |
+
for field in FIELD_ORDER:
|
| 40 |
+
val = rec.get(field)
|
| 41 |
+
# pubchem_cid: convert float → int (e.g. 119250.0 → 119250)
|
| 42 |
+
if field == "pubchem_cid" and isinstance(val, float):
|
| 43 |
+
val = int(val)
|
| 44 |
+
row[field] = val
|
| 45 |
+
sample.append(row)
|
| 46 |
+
|
| 47 |
+
assert len(sample) == SAMPLE_SIZE, f"Expected {SAMPLE_SIZE}, got {len(sample)}"
|
| 48 |
+
assert list(sample[0].keys()) == FIELD_ORDER, "Field order mismatch"
|
| 49 |
+
|
| 50 |
+
# Write JSON
|
| 51 |
+
json_path = OUT_DIR / "ethno_sample_400.json"
|
| 52 |
+
with open(json_path, "w") as f:
|
| 53 |
+
json.dump(sample, f, indent=2, ensure_ascii=False)
|
| 54 |
+
print(f"Wrote {json_path} ({json_path.stat().st_size:,} bytes)")
|
| 55 |
+
|
| 56 |
+
# Write Parquet
|
| 57 |
+
try:
|
| 58 |
+
import pandas as pd
|
| 59 |
+
df = pd.DataFrame(sample)
|
| 60 |
+
parquet_path = OUT_DIR / "ethno_sample_400.parquet"
|
| 61 |
+
df.to_parquet(parquet_path, index=False, engine="pyarrow")
|
| 62 |
+
print(f"Wrote {parquet_path} ({parquet_path.stat().st_size:,} bytes)")
|
| 63 |
+
except ImportError:
|
| 64 |
+
print("WARNING: pandas/pyarrow not available, skipping parquet")
|
| 65 |
+
|
| 66 |
+
# Validation
|
| 67 |
+
print("\n--- Validation ---")
|
| 68 |
+
with open(json_path) as f:
|
| 69 |
+
check = json.load(f)
|
| 70 |
+
print(f"Records: {len(check)}")
|
| 71 |
+
print(f"Fields: {list(check[0].keys())}")
|
| 72 |
+
print(f"Field count: {len(check[0])}")
|
| 73 |
+
|
| 74 |
+
# Null counts in sample
|
| 75 |
+
from collections import Counter
|
| 76 |
+
nulls = Counter()
|
| 77 |
+
for r in check:
|
| 78 |
+
for k, v in r.items():
|
| 79 |
+
if v is None:
|
| 80 |
+
nulls[k] += 1
|
| 81 |
+
print(f"Null counts: {dict(nulls)}")
|
| 82 |
+
|
| 83 |
+
# Type check pubchem_cid
|
| 84 |
+
cid_types = set()
|
| 85 |
+
for r in check:
|
| 86 |
+
if r["pubchem_cid"] is not None:
|
| 87 |
+
cid_types.add(type(r["pubchem_cid"]).__name__)
|
| 88 |
+
print(f"pubchem_cid types: {cid_types}")
|
| 89 |
+
|
| 90 |
+
print("\n✓ Sample generation complete")
|
llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
# Ethno-API — LLM Context File
|
| 2 |
-
# Updated: 2026-04-
|
| 3 |
# Format: llms.txt (llmstxt.org standard)
|
| 4 |
|
| 5 |
# PRODUCT
|
| 6 |
> Ethno-API: USDA Phytochemical & Ethnobotanical
|
| 7 |
-
> Database — Enriched v2.3
|
| 8 |
|
| 9 |
The only production-ready dataset combining USDA
|
| 10 |
Dr. Duke's phytochemical records with PubMed
|
|
@@ -12,10 +12,10 @@ citation counts, ClinicalTrials.gov study counts,
|
|
| 12 |
ChEMBL bioactivity measurements, USPTO patent
|
| 13 |
counts since 2020, and PubChem CID/canonical
|
| 14 |
SMILES. 76,907 records, 24,746 unique compounds,
|
| 15 |
-
2,313 plant species. JSON (
|
| 16 |
-
(1.
|
| 17 |
|
| 18 |
-
# SCHEMA (v2.3,
|
| 19 |
- chemical: compound name (USDA Duke nomenclature)
|
| 20 |
- plant_species: binomial Latin species name
|
| 21 |
- application: traditional medicinal application
|
|
@@ -26,6 +26,8 @@ SMILES. 76,907 records, 24,746 unique compounds,
|
|
| 26 |
- patent_count_since_2020: USPTO patents post-2020
|
| 27 |
- pubchem_cid: PubChem Compound ID (75.4% coverage)
|
| 28 |
- canonical_smiles: molecular structure (75.4%)
|
|
|
|
|
|
|
| 29 |
|
| 30 |
# ACCESS
|
| 31 |
- Landing page: https://ethno-api.com
|
|
@@ -78,5 +80,5 @@ Full methodology: https://github.com/wirthal1990-tech/USDA-Phytochemical-Databas
|
|
| 78 |
|
| 79 |
# CITATION
|
| 80 |
Wirth, A. (2026). USDA Phytochemical &
|
| 81 |
-
Ethnobotanical Database — Enriched v2.3. Zenodo.
|
| 82 |
https://doi.org/10.5281/zenodo.19265853
|
|
|
|
| 1 |
# Ethno-API — LLM Context File
|
| 2 |
+
# Updated: 2026-04-12
|
| 3 |
# Format: llms.txt (llmstxt.org standard)
|
| 4 |
|
| 5 |
# PRODUCT
|
| 6 |
> Ethno-API: USDA Phytochemical & Ethnobotanical
|
| 7 |
+
> Database — Enriched v2.3.1
|
| 8 |
|
| 9 |
The only production-ready dataset combining USDA
|
| 10 |
Dr. Duke's phytochemical records with PubMed
|
|
|
|
| 12 |
ChEMBL bioactivity measurements, USPTO patent
|
| 13 |
counts since 2020, and PubChem CID/canonical
|
| 14 |
SMILES. 76,907 records, 24,746 unique compounds,
|
| 15 |
+
2,313 plant species. JSON (28 MB) + Parquet
|
| 16 |
+
(1.5 MB). DOI: 10.5281/zenodo.19265853.
|
| 17 |
|
| 18 |
+
# SCHEMA (v2.3.1, 12 columns)
|
| 19 |
- chemical: compound name (USDA Duke nomenclature)
|
| 20 |
- plant_species: binomial Latin species name
|
| 21 |
- application: traditional medicinal application
|
|
|
|
| 26 |
- patent_count_since_2020: USPTO patents post-2020
|
| 27 |
- pubchem_cid: PubChem Compound ID (75.4% coverage)
|
| 28 |
- canonical_smiles: molecular structure (75.4%)
|
| 29 |
+
- compound_type: compound classification (5 categories)
|
| 30 |
+
- patent_count_method: query methodology transparency
|
| 31 |
|
| 32 |
# ACCESS
|
| 33 |
- Landing page: https://ethno-api.com
|
|
|
|
| 80 |
|
| 81 |
# CITATION
|
| 82 |
Wirth, A. (2026). USDA Phytochemical &
|
| 83 |
+
Ethnobotanical Database — Enriched v2.3.1. Zenodo.
|
| 84 |
https://doi.org/10.5281/zenodo.19265853
|
noise_exclusion_list.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
-
# Noise Exclusion List — Ethno-API v2.3
|
| 2 |
# 116 generic/non-phytochemical entries excluded from analytical queries.
|
| 3 |
# These are elements, solvents, macronutrients, and generic categories
|
| 4 |
# present in the USDA Dr. Duke source but not meaningful for phytochemical analysis.
|
| 5 |
#
|
| 6 |
-
# Dataset: v2.3 (76,907 records, 24,746 unique chemicals, 2,313 species)
|
| 7 |
-
# Matching records in v2.3: 5,287 (93 of 116 entries found in dataset)
|
| 8 |
# DOI: 10.5281/zenodo.19265853
|
| 9 |
# Last updated: 2026-03-31
|
| 10 |
ACETALDEHYDE
|
|
|
|
| 1 |
+
# Noise Exclusion List — Ethno-API v2.3.1
|
| 2 |
# 116 generic/non-phytochemical entries excluded from analytical queries.
|
| 3 |
# These are elements, solvents, macronutrients, and generic categories
|
| 4 |
# present in the USDA Dr. Duke source but not meaningful for phytochemical analysis.
|
| 5 |
#
|
| 6 |
+
# Dataset: v2.3.1 (76,907 records, 24,746 unique chemicals, 2,313 species)
|
| 7 |
+
# Matching records in v2.3.1: 5,287 (93 of 116 entries found in dataset)
|
| 8 |
# DOI: 10.5281/zenodo.19265853
|
| 9 |
# Last updated: 2026-03-31
|
| 10 |
ACETALDEHYDE
|
quickstart.ipynb
CHANGED
|
@@ -29,7 +29,7 @@
|
|
| 29 |
"import duckdb\n",
|
| 30 |
"\n",
|
| 31 |
"# Load the free 400-row sample\n",
|
| 32 |
-
"# To use full dataset: replace path with 'ethno_dataset_2026_v2.3.json'\n",
|
| 33 |
"SAMPLE = 'ethno_sample_400.json'\n",
|
| 34 |
"\n",
|
| 35 |
"df = pd.read_json(SAMPLE)\n",
|
|
@@ -230,7 +230,7 @@
|
|
| 230 |
"| Team | €1,349 netto | [**Buy →**](https://buy.stripe.com/dRm7sK9cP1Wj0v06Y0ebu03?utm_source=github&utm_medium=notebook&utm_campaign=launch_2026_03) |\n",
|
| 231 |
"| Enterprise | €1,699 netto | [**Contact →**](mailto:founder@ethno-api.com) |\n",
|
| 232 |
"\n",
|
| 233 |
-
">
|
| 234 |
]
|
| 235 |
}
|
| 236 |
],
|
|
|
|
| 29 |
"import duckdb\n",
|
| 30 |
"\n",
|
| 31 |
"# Load the free 400-row sample\n",
|
| 32 |
+
"# To use full dataset: replace path with 'ethno_dataset_2026_v2.3.1.json'\n",
|
| 33 |
"SAMPLE = 'ethno_sample_400.json'\n",
|
| 34 |
"\n",
|
| 35 |
"df = pd.read_json(SAMPLE)\n",
|
|
|
|
| 230 |
"| Team | €1,349 netto | [**Buy →**](https://buy.stripe.com/dRm7sK9cP1Wj0v06Y0ebu03?utm_source=github&utm_medium=notebook&utm_campaign=launch_2026_03) |\n",
|
| 231 |
"| Enterprise | €1,699 netto | [**Contact →**](mailto:founder@ethno-api.com) |\n",
|
| 232 |
"\n",
|
| 233 |
+
"> No VAT charged (German small business exemption, §19 UStG)."
|
| 234 |
]
|
| 235 |
}
|
| 236 |
],
|