I read about data availability on http://open.fda.gov/ Now i want to download data in structured row-column format but all that i am getting is modifying my search query in order to retrieve infomration in JSON format. Can it be downloaded in the form of CSV files.
3 Answers
Joe, we don't support CSV downloads for the time being. Drug adverse event data is highly relational, a format that does not easily lend itself to being represented in a format like CSV. For instance, a given record may have 5-10 different drugs associated with it and an additional 5-10 different reactions, each of which all have their own additional metadata.
If you have a recommendation on how we could easily represent this data in CSV, please do let me know!
The API returns results as JSON by default.
So, you cannot download the data to CSV directly. But if you want to work with CSV you can always convert them from JSON to CSV. Especially if you have a few programming skills.
Take a look here about Python and Open Data file formats.
As a second choice, you can use an online tool like this one, but you cannot be 100% sure that you will have the exact structure that you want.
Without programming, you can use OpenRefine to convert data in JSON format to CSV.
I'm copy/pasting from another site, and you'll have to adapt for your purposes
- Download, install, and open OpenRefine – it opens in your default web browser. Click “Create Project” and then click the “Clipboard” tab.
- Copy the JSON text and paste it into the text box. Then click “Next”.
- OpenRefine then asks you to click on the first row/record of the JSON text. Hover your mouse over the first “{” (curly bracket) after “stationBeanList” (see screenshot 1). OpenRefine then gives you a preview table of your data after you select the first row/record. Give you project a name like “Divvy_2013-10-09 10:49:02 PM” (the timestamp at which you copied the data).
Here is one of many screenshot from the source site: