BadFood shows a map of restaurants in Sydney that have been given a penalty from The Department of Primary Industries Food Authority, specifically from this public penalty notice list.
Data is scraped using a spider with python's
scrapy and stored in a remote mongodb and served as a NodeJs+Express+EJS server on Heroku.
pip install scrapy
nvm install && npm install
Crawl the data and output it as JSON, run the spider:
scrapy runspider spider.py -o output.json
Import the data to a remote host:
mongoimport -h mongohost -d dbname -c collection -u username -p password --file output.json --jsonArray
Export the google maps API URL (Including the key) as an environment variable (or as a config var on Heroku):
and similarly the mongodb url, for example with
- Pull requests are accepted.
- Thanks to Deedee lee for the BadFood emoji logo