Warning
This project has been archived because we are not actively maintaining nor using it. It hasn't seen activity since November 2015 and may have known security vulnerabilities that have not been addressed. If you would like to move this work forward, please do! If we get enough interest, we might reconsider working on this again. You can always donate to provide us with more resources.
Note: I (@benrfairless) used AI to assist with the process of archiving this repository, however I reviewed the decision myself before taking action.
A little Sinatra app to output Popolo data from the morph.io API. It currently only supports vote data.
First, install Gem dependencies with the bundle command.
The server expects two environment variables, MORPH_API_KEY and MORPH_SCRAPER_NAME.
MORPH_API_KEY is your key from http://morph.io/api
MORPH_SCRAPER_NAME is the name of the scraper we're extracting data from. This was built against a specific scraper so you'll want to be scraping data in a similar format.
Then you can run it with:
MORPH_API_KEY=my_sekret_key MORPH_SCRAPER_NAME=openaustralia/ukraine_verkhovna_rada_votes be bundle exec rackup
Given the identifier of the vote_event you want is "3106" you'll be able to access Popolo vote data at:
http://localhost:9292/vote_event/3106
You can also get all votes on a day:
http://localhost:9292/vote_events/2015-07-14
Deploy it to Heroku:
heroku create
heroku config:set MORPH_API_KEY=my_sekret_key MORPH_SCRAPER_NAME=openaustralia/ukraine_verkhovna_rada_votes
git push heroku master
heroku open
Then in your browser you'll need to append the right path to your opened app. Something like: