Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where should the dataset be placed in order to run the api locally? #118

Closed
evgakis opened this issue Feb 13, 2020 · 6 comments
Closed

Where should the dataset be placed in order to run the api locally? #118

evgakis opened this issue Feb 13, 2020 · 6 comments

Comments

@evgakis
Copy link

evgakis commented Feb 13, 2020

Hi, to everyone,
I would like to ask about where should I place the dataset which will be downloaded from here
https://open.fda.gov/downloads/

I have downloaded locally the code from this link
https://github.com/FDA/openfda

And there are many folders and subfolders there. Where is the folder where the data should be placed in? For example I would like to call the following url and get results
localhost:8000/drug/event.json?api_key=&search=exists:(patient.drug.openfda.generic_name)+AND+patient.reaction.reactionmeddrapt.exact:("CONFUSIONAL%20STATE")+AND+exists:(patient.reaction.reactionmeddrapt.exact)+AND+receiptdate:([1989-06-30+TO+2020-02-13])&limit=1&skip=0

Right now I have achieved to run the api but I cannot get results as it is shown in the following screenshot.
image

while the api that I run locally produces the following errors while running
image

Another question is if the right place to download the data is from here https://open.fda.gov/downloads/
I see there a lot of files and I don't see a file with the whole info.

for example
image

From what I have understood, I should write code in order to retrieve the data using the following json file?
https://api.fda.gov/download.json

Is there something ready for this?

@beckyconning
Copy link

I'm having this same problem. @dkrylovsb any ideas?

@evgakis
Copy link
Author

evgakis commented Feb 13, 2020

@beckyconning maybe the files should be placed in a folder that should be declared in elasticsearch.yml
for example
path.data: /etc/elasticsearch/data
Could anybody give some additional info if this is correct and how to proceed?

@beckyconning
Copy link

@evgakis did you ever work this out? i couldn't make heads or tails of it.

@evgakis
Copy link
Author

evgakis commented Apr 15, 2020 via email

@dkrylovsb
Copy link
Collaborator

The indexes in Elasticsearch are created and populated by running Python pipelines, source code for which is provided in this repository. The pipelines "know" how to obtain the data they need. However, running all pipelines is currently infeasible because many of the pipelines require data only available to FDA. Only some pipelines can be run by the general public.

@dkrylovsb
Copy link
Collaborator

More information on how to run openFDA locally (select pipelines only) is here: #133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants