Four main JSON files:
json_data/fda_reports.json(48KB) - 33 vaccine entries with FDA adverse events from package insertsjson_data/vaers_subset.json(77MB) - 51,976 VAERS reports filtered to only FDA-matching vaccinesjson_data/symptom_mappings.json(70KB) - 352 AI-powered mappings between VAERS and FDA terminologyjson_data/vaers_categorization.json(21MB) - Categorizes each VAERS report by symptom matching status
We now categorize each VAERS report based on how well its symptoms match FDA documentation:
- fully_matched (0.04%) - ALL symptoms are in FDA package insert
- not_mapped (86.95%) - None of the symptoms have been processed yet
- mapped_not_matched (0.87%) - Symptoms are mapped but not in FDA list
- Mixed categories (12.14%) - Various combinations of the above
// 1. Get a vaccine's official FDA adverse events
const fdaReports = await fetch('json_data/fda_reports.json').then(r => r.json());
const shingrix = fdaReports.find(v => v.vaccine_name === 'ZOSTER (SHINGRIX)');
console.log(shingrix.adverse_events); // ["pain", "redness", "swelling", ...]
// 2. Find VAERS reports for that vaccine
const vaersReports = await fetch('json_data/vaers_subset.json').then(r => r.json());
const shingrixReports = vaersReports.filter(report =>
report.VAX_NAME_list.includes('ZOSTER (SHINGRIX)')
);
// 3. Check report categorization
const categorization = await fetch('json_data/vaers_categorization.json').then(r => r.json());
const reportCategory = categorization.reports.find(r => r.VAERS_ID === someId);
console.log(reportCategory.category); // e.g., "fully_matched_and_not_mapped"Four datasets working together:
- FDA Reports: Official adverse events from vaccine package inserts
- VAERS Subset: Real-world reports filtered to only include FDA-matching vaccines
- Symptom Mappings: AI crosswalk between VAERS terminology and FDA terminology
- Report Categorization: Analysis of how well each report matches FDA documentation
{
"vaccine_name": "ZOSTER (SHINGRIX)", // VAERS-compatible name
"vax_name": "SHINGRIX (ZOSTER VACCINE...)", // Original FDA name
"vax_manu": "GLAXOSMITHKLINE BIOLOGICALS",
"adverse_events": ["pain", "redness", "swelling", "myalgia", "fatigue", ...],
"vaers_vaccine_names": ["ZOSTER (SHINGRIX)"], // All VAERS names that map here
// ... more fields
}{
"VAERS_ID": 2547732,
"AGE_YRS": 38.0,
"SEX": "female", // Mapped from M/F/U
"DIED": false, // Boolean (was Y/null)
"L_THREAT": false, // Boolean
"ER_VISIT": false, // Boolean
"HOSPITAL": false, // Boolean
"DISABLE": false, // Boolean
"RECOVD": "yes", // String: yes/no/unknown (was Y/N/U)
"VAX_NAME_list": ["COVID19 (COVID19 (MODERNA BIVALENT))"],
"symptom_list": ["Injury associated with device"],
// ... more fields
}{
"vaers_symptom": "Injection site vasculitis",
"fda_adverse_events": ["cellulitis", "erythema", "injection site reactions"]
}{
"metadata": { /* category definitions */ },
"summary": {
"total_reports": 51469,
"category_counts": { /* counts by category */ },
"category_percentages": { /* percentages */ }
},
"reports": [
{
"VAERS_ID": "2547732",
"vaccine": "COVID19 (COVID19 (MODERNA))",
"category": "fully_matched_and_not_mapped",
"total_symptoms": 5,
"symptom_breakdown": {
"fully_matched": 1,
"mapped_not_matched": 0,
"not_mapped": 4
}
}
]
}- Vaccines: 19 unique vaccines in VAERS subset (all match FDA reports)
- Reports: 51,976 VAERS reports (filtered from ~1.7M to only FDA-matching vaccines)
- Symptom Mappings: 352 VAERS symptoms mapped to FDA terminology
- Match Rate: Only 0.5% of symptom instances are FDA-documented (95.2% unmapped)
- Extract FDA Data: Parse adverse events from package insert PDFs
- Map Vaccine Names: Create VAERS-compatible names for FDA vaccines
- Filter VAERS: Keep only reports for vaccines in FDA list
- Map Symptoms: Use Claude AI to map VAERS→FDA terminology
- Categorize Reports: Analyze each report's symptom matching status
pip install pandas requests python-dotenv duckdb
export ANTHROPIC_API_KEY=your_key_herefix_vaccine_mappings.py- Maps FDA vaccine names to VAERS formatcreate_proper_vaers_subset.py- Creates filtered VAERS subsetcreate_real_symptom_mappings.py- AI-powered symptom mappingcreate_vaers_categorization.py- Categorizes reports by match statusdatabase_fixed.py- Loads data into DuckDB for analysis
# 1. Fix vaccine name mappings
python code/fix_vaccine_mappings.py
# 2. Create VAERS subset (only FDA-matching vaccines)
python code/create_proper_vaers_subset.py
# 3. Create symptom mappings (uses Claude AI)
python code/create_real_symptom_mappings.py
# 4. Analyze and categorize reports
python code/database_fixed.py
python code/create_vaers_categorization.pyWe create a DuckDB database for efficient analysis:
# Load all data into DuckDB
python code/database_fixed.py
# Get sample analysis
python code/sample_vaers_analysis.py- Fully Matched: Symptoms documented in FDA package insert
- Mapped but Not Matched: Mapped to FDA terms but not in that vaccine's list
- Not Mapped: Symptoms we haven't processed yet
hackathon/
├── README.md
├── code/ # Processing scripts
├── json_data/ # Output JSON files (what you need!)
│ ├── fda_reports.json
│ ├── vaers_subset.json
│ ├── symptom_mappings.json
│ └── vaers_categorization.json
├── KEY_INFO/ # Data schemas
├── duckdb/ # Analysis database
└── vaers_data/ # Raw VAERS CSVs (gitignored)
- Vaccine Names: We use VAERS naming convention (e.g., "ZOSTER (SHINGRIX)")
- Boolean Fields: DIED, L_THREAT, ER_VISIT, HOSPITAL, DISABLE are now true/false
- Large Files: Only vaers_subset.json uses Git LFS (77MB)
- Match Rate: Low (0.5%) because most symptoms aren't mapped yet
The json_data/unmapped_symptom_examples.json file contains 22 examples of frequent unmapped symptoms with manual analysis of whether they should match FDA adverse events:
- VAERS_ID 2547752 - "Pyrexia" → FDA has "chills" (similar fever symptoms)
- VAERS_ID 2548069 - "Injection site erythema" → FDA has "redness" (exact match)
- VAERS_ID 2548844 - "Chills" → FDA has "shivering" (synonymous)
- VAERS_ID 2547752 - "Nausea" → FDA has "nausea/vomiting" (exact match)
- VAERS_ID 2548071 - "Pyrexia" → Text: "Fever of 101" (clear fever description)
- VAERS_ID 2547752 - "Asthenia" → Text: "too weak to stand", "lethargy" (weakness/fatigue)
- VAERS_ID 2547741 - "Pain in extremity" → Text: "throbbing pain in various areas" (pain symptoms)
- VAERS_ID 2548256 - "Malaise" → Text: "generalized malaise, fatigue" (matches fatigue)
- VAERS_ID 2547741 - "Pain" → FDA has "pain at injection site" + Text: "throbbing pain"
- VAERS_ID 2548069 - "Injection site pain" → FDA has "pain" + Text: "soreness"
- VAERS_ID 2549437 - "Pain in extremity" → FDA has "pain" + Text: "sore arm"
- VAERS_ID 2548827 - "Herpes zoster" → Disease the vaccine prevents, not adverse event
- VAERS_ID 2551623 - "Rash" → Text describes shingles disease rash, not vaccine reaction
- VAERS_ID 2547752 - "Dizziness" → Not in FDA adverse events, text unclear on causation
- VAERS_ID 2547959 - "Incomplete course of vaccination" → Administrative issue, not medical symptom
- VAERS_ID 2548813 - "Cough" → Text shows COVID infection symptoms, not vaccine effects
To improve the system:
- Map more symptoms (currently only 352 of thousands)
- Add more vaccines (currently 33 entries for 19 unique vaccines)
- Improve mapping quality with better prompts
- Add temporal analysis (dates are available)