Code Monkey home page Code Monkey logo

allincomefoods's Introduction

SnapFresh Build Status Code Climate

Installation and Setup

Install Dependencies

Dependencies

  • Postgres
  • Git
  • Ruby

For Ruby and Git, a good tutorial can be found at Jumpstart Lab Tutorials

For Postgres, see install options depending on your operating system below and follow the instructions.

Setup

$ git clone [email protected]:ysiadf/AllIncomeFoods.git
$ cd AllIncomeFoods
$ bundle install
$ cp config/database.yml.example config/database.yml
$ bundle exec rake db:nuke_pave

Installing Postgres

Mac Users

Recommended installation is with Postgress.app or Homebrew. See relative sites for instructions on installation.

Window Users

Download and follow the instructions from Postgres. When promoted, you will want to install the local version, not the remote server.

Linux

For Fedora:

$ sudo yum install postgresql-server postgresql-client postgresql-docs postgresql-devel

Database Configuration

For Mac users, be sure to add the following to config/database.yml in order to avoid port errors.

development:
  host: localhost

test:
  host: localhost

You may need to add or modify additional configurations in database.yml depending on how Postgres is setup.

A for develoment purposes, a username and password are not required unless Postgres is setup to require them. The fields can either be left blank or removed.

Development Data

If you only want data for development purposes, then db:sample will load a small amount (200 records) that will probably be sufficient for development purposes.

$ rake db:sample

Production Data

Download a new data set and load into the database.

$ rake db:datarefresh

A line should print out every 10K rows that are refreshed - this way you can check on the progress of the script which takes at least 10 min to run.

Alternate Production Data Load

Alternate way to load the full data (if above steps dont work for some reason):

  1. Run ruby db/cronjob.rb to fetch all data files, unzip and then produce a single CSV file called "all.csv".

  2. Bulk-load into postgres, using this command.

$ grep -v '"NULL"' all.csv | psql allincomefoods_dev -c "copy retailers (name, lon, lat, street, city, state, zip, zip_plus_four) from stdin null as 'NULL' csv;"
  1. Remove all the .zip and .csv files that were created as part of the download process.

//00T! You should be all installed and stuff now.

Contribution Guidelines

  1. Create a feature branch from develop: git checkout -b feature/myfeature develop or git flow feature start myfeature
  2. Commit and push your changes
  3. Submit a pull request to the develop branch

License/Copyright

License INFO: - Note, this license applies to all files within the ysiadf/AllIncomeFoods repo. It is an OSI approved license.

Copyright [2011] [Ysiad Ferreiras, Aaron Bannert, Jeremy Canfield and Michelle Koeth]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

See LICENSE for details.

allincomefoods's People

Contributors

abannert avatar davidx avatar jwieringa avatar mabundo avatar michellekoeth avatar onezerojeremy avatar shrtlist avatar ysiadf avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kwals zr2d2

allincomefoods's Issues

Add basic responsive design

Should display as mobile site on mobile vs being desktop style site on mobile phone (Bootstrap or similar?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.