{"id":21558084,"url":"https://github.com/koopjs/koop-fda","last_synced_at":"2025-03-18T03:28:05.543Z","repository":{"id":34240713,"uuid":"38110409","full_name":"koopjs/koop-fda","owner":"koopjs","description":"A Koop provider for the FDA's food recall enforcement data (experimental).","archived":false,"fork":false,"pushed_at":"2022-12-09T21:38:48.000Z","size":527,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-05T00:39:13.610Z","etag":null,"topics":["koop-provider"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koopjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-26T12:41:06.000Z","updated_at":"2019-07-08T23:08:36.000Z","dependencies_parsed_at":"2023-01-15T05:32:33.979Z","dependency_job_id":null,"html_url":"https://github.com/koopjs/koop-fda","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-fda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-fda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-fda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koopjs%2Fkoop-fda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koopjs","download_url":"https://codeload.github.com/koopjs/koop-fda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243769987,"owners_count":20345217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["koop-provider"],"created_at":"2024-11-24T08:13:58.096Z","updated_at":"2025-03-18T03:28:05.509Z","avatar_url":"https://github.com/koopjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![npm version][npm-img]][npm-url][![Build Status](https://travis-ci.org/koopjs/koop-fda.svg?branch=master)](https://travis-ci.org/koopjs/koop-fda)[![Code Climate](https://codeclimate.com/github/koopjs/koop-fda/badges/gpa.svg)](https://codeclimate.com/github/koopjs/koop-fda)[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n\n# koop-fda\n\n\u003e A FDA Food Recall Enforcement provider for Koop \n\n## How it works\n1. All the data is requested from the [Open FDA](https://open.fda.gov/) food recalls enforcement API in pages\n2. States affected are parsed out of the distribution_pattern.\n3. Geometries are added to match the states from step 2 and merged into a single shape covering the area of the recall\n4. All results are converted into GeoJSON\n5. GeoJSON is loaded into Postgres\n6. [Koop](http://github.com/esri/koop) handles conversions to Esri Feature Services, KML, Shapefile, GeoJSON and CSV\n\n\n## Usage\n\n- To download the full dataset simply append your requested file type to the end of this URL: http://koop.dc.esri.com/FDA\n  - Options are: `[csv, zip, kml, geojson]`\n- If you wish to filter the data, append `?where=` followed by a [URI Encoded](http://www.w3schools.com/tags/ref_urlencode.asp) SQL string \n  - [See this](http://meyerweb.com/eric/tools/dencoder/) for an easy in browser encoder\n  - The full list of available parameters is here: https://open.fda.gov/food/enforcement/\n\n- Example: accessing a feature service\n```\nhttp://koop.dc.esri.com/FDA/FeatureServer/0\n```\nNote: the first time you run this it may kick off a very long process\n\n- Example requesting GeoJSON of all the zucchini recalls ever: `where=product_description like '%zucchini%'`\n```\nhttp://koop.dc.esri.com/FDA.geojson?where=product_description%20like%20%27%25zucchini%25%27\n```\n\n- Example requesting a CSV of listeria cases in 2015: `where=reason_for_recall like '%listeria%' AND recall_initiation_date \u003e= 20150101`\n```\nhttp://koop.dc.esri.com/FDA.csv?where=reason_for_recall%20like%20%27%25listeria%25%27%20AND%20recall_initiation_date%20%3E%3D%2020150101\n```\n\n- Example requesting a shapefile of all recalls of products originating in Texas: `state = TX`\n  - Note: Make sure to capitalize the state or you will get no results\n```\nhttp://koop.dc.esri.com/FDA.zip?where=state%20%3D%20TX\n```\n\n- Example requesting kml of all ongoing class III recalls: `where=status = Ongoing AND classification = 'Class III'`\n```\nhttp://koop.dc.esri.com/FDA.kml?where=status%20%3D%20Ongoing%20AND%20classification%20%3D%20%27Class%20III%27\n```\n\n## Installation\n1. In your [Koop app](https://github.com/koopjs/koop-sample-app) register the koop-fda provider\n2. [Get an API key from the FDA](https://open.fda.gov/api/reference/#your-api-key)\n3. Add this to your koop config/default.json\n```json\n{\n  \"fda\":\n    {\n      \"key\": \"your key\"\n    }\n}\n```\n\n## Contributing\n\nEsri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).\n\n## License\n\nCopyright 2015 Esri\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\u003e http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nA copy of the license is available in the repository's [license.txt](license.txt) file.\n\n[npm-img]: https://img.shields.io/npm/v/koop-fda.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/koop-fda\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoopjs%2Fkoop-fda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoopjs%2Fkoop-fda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoopjs%2Fkoop-fda/lists"}