Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Lex to LIVES

A Ruby script that takes Lexington Health Department restaurant inspection scores to the LIVES standard.

Assembled by OpenLexington for Code Across America 2013

It is deployed on Heroku (app name: lives-etl), which runs a scheduled job each day to look for new health dept scores.

The health scores data generated by this script is stored in a separate GitHub repo

To convert health department food scores manually

mv .env-sample .env Add your GitHub creds (or use a dummy GitHub account for automation)

  • extracts scores from health department site
  • transforms them to lives format
  • loads to github repo

bundle exec ruby lives_etl.rb

Deploy to Heroku for automation

Install buildpack to enable rugged gem

$ heroku create my-etl-app
$ heroku buildpacks:set
$ heroku config:set GITHUB_USER=foo
$ heroku config:set GITHUB_PASS=bar
$ git push heroku master
$ heroku run bundle exec irb

irb(main):001:0> require 'rugged'
=> true

Warning: The buildpack succeeds on initial deploy and then fails on later deploys. This fixes the issue:

heroku plugins:install
heroku repo:purge_cache -a my-etl-app

Enable automated ETL

Add Heroku Scheduler add-on to Heroku instance

set to run daily:

bundle exec ruby lives_etl.rb <permalinik to health scores>

eg bundle exec ruby lives_etl.rb ""

To check when scores have changed on the Health Dept page


That way you get a notification that the scores have changed and the automation should have kicked off.


Lexington Health Dept. Health Inspection data to LIVES format



No releases published


No packages published

Contributors 4