everypolitician / everypolitician-ruby

Ruby gem for easy access to EveryPolitician data
http://everypolitician.org/
MIT License
14 stars 5 forks source link

Provide access to local Popolo #59

Open tmtmtmtm opened 7 years ago

tmtmtmtm commented 7 years ago

Currently you can call legislature.popolo as a bridge to an everypolitician-popolo representation of the data. However this fetches that data from online, using the popolo_url. It would be nice if there were a way to have that fetch from local data as well, if you were to, for example, already have the entire everypolitician-data repo checked out.

At the minute you have to go through a slightly odd indirection of Everypolitician::Popolo.read(legislature.raw_data[:popolo])

davewhiteland commented 7 years ago

:+1: for this being a Nice Thing to want, because I've just hit it independently

(thanks @chrismytton for pointing out this issue existed already, and the workaround @tmtmtmtm mentions; I'd been putting my local EP data behind a local vhost (hence: localhost:xyz) to work like this offline, which was plainly silly)