Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using Popolo engine #334

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

using Popolo engine #334

wants to merge 36 commits into from

Conversation

lfalvarez
Copy link
Member

oye @rezzo way of using

bundle exec rails c

> require './lib/scrapers/person_scraper'
> runner = Pupa::Runner.new(CongresoAbiertoScrapers::PersonScraper)
> runner.run([])

# ahora las mociones del último mes

> require './lib/scrapers/motion_scrapper'
> runner = Pupa::Runner.new(CongresoAbiertoScrapers::MotionScraper)
> runner.run([])

@lfalvarez
Copy link
Member Author

And then if you want to see how someone voted in what way:

require 'popolo'
person = Popolo::Person.first() #uses mongoid http://mongoid.org/en/mongoid/docs/querying.html
# Utilizando un popit_id
# p = Popolo::Person.where(_id:"5330369ed0c05d8b737b6c86").first
# es este loco es este de acá https://pmocl.popit.mysociety.org/persons/5330369ed0c05d8b737b6c86
puts person.votes.first.vote_event.motion.text, person.votes.first.option

Felipe Álvarez added 7 commits December 31, 2014 12:18
==================================
Estamos haciendo el siguiente razonamiento lógico:

Vamos a buscar al servicio [Listado de proyectos que han tenido movimiento a partir de una fecha ](http://www.senado.cl/wspublico/invoca_tramitacion_fecha.html). En base a esto lo que hacemos es revisar cada uno y crear una votación en local y a la vez ir a buscarlo a la cámara.

Acá tengo una duda. Este servicio me muestra aquellos proyectos que tuvieron votaciones en la cámara de diputados también?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants