Skip to content

Instantly share code, notes, and snippets.

View HansNelsen's full-sized avatar

Hans Nelsen HansNelsen

View GitHub Profile
@HansNelsen
HansNelsen / histogram_from_drug_event_example.py
Created June 27, 2016 18:46
Example of looping over openFDA drug event zip files.
#!/usr/bin/env python
''' Simple example of reading all of the zip files from the openFDA download
and doing something with them. In this case, we are building an index
of all the medicinalproduct and drugcharacterization values and a count
of how often each occurred.
'''
from collections import defaultdict
import czipfile as zipfile