Coder Social home page Coder Social logo

olhoneles / politicos Goto Github PK

View Code? Open in Web Editor NEW
63.0 9.0 10.0 290 KB

API com todos os candidatos Brasileiros!

Home Page: https://politicos.olhoneles.org

License: GNU Affero General Public License v3.0

Makefile 0.52% Python 84.05% HTML 15.14% Dockerfile 0.29%
politicians political-parties api open-data brazilian politico senadores vereadores prefeitos majors

politicos's Introduction

Olho Neles Code Health Build Status

Tool to monitor Brazilian legislators expenses while in the exercise of their mandates.

Install

  1. Clone the repository:

    git clone https://github.com/olhoneles/olhoneles.git
    
  2. Create a virtualenv:

    cd olhoneles
    mkvirtualenv olhoneles
    
  3. Install dependencies:

    make setup
    
  4. Create your database:

    make data
    
  5. Run it:

    make run
    
  6. Change default configs:

    If you would like to override some settings.py variables, like SECRET_KEY, DATABASES, ALLOWED_HOSTS, please create the olhoneles/local.config file.

Collecting the data

After setting up, you can collect one of the supported legislative houses (cmbh, almg, cmsp, senado) by using the collect command like this:

./manage.py collect <house>

You can add --debug after the name of the house to get a more verbose output. Note that the collection process happens in a transaction and that the expenses are not added to the main Expense table while the collection is running, so you will not see partial data in the site while collecting.

API

Yes, we have an API. The Olho Neles API lets you build tools using all data we have collected from legislative houses. All endpoints, parameters and error messages available to the Olho Neles API are docummented.

Contribute

Join us at the dev-mailing list and at #olhoneles on Freenode.

Fork the repository and send your pull-requests.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

politicos's People

Contributors

clarete avatar marcelometal avatar raelmax avatar vierno avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

politicos's Issues

Criar rotas de pesquisa

Os filtros de pesquisa padrão do tastypie não fazem buscas complexas. Como por exemplo, pesquisar 'dilma rousseff' retorna vazio uma vez que o nome cadastrado é 'dilma vana rousseff'. A ideia é criar uma rota 'search' e usar o operador 'Q' do django.

Models que precisam desse filtro:

  • Politician
  • City
  • Occupation

Refatorar o _base.py

Identificar e mover alguns métodos que tratam da criação de objetos para o modes.py

Linkar os zips no website

Listar os anos com link para baixar os arquivos zipados com os dados 'crus'. Assim qualquer pessoa pode validar nossos dados.

Corrigir rodapé

  • Links quebrados
  • Remover ou colocar algo melhorar no lugar da seção 'Conteúdo'

Diretório de logs dos coletores

O log dos coletores esta ativo por padrão, então é preciso existir o /tmp para que seja criado o error.log. Acredito que não precisa deixar essa opção ativa por padrão.

Melhorar desempenho dos coletores

Eleições com prefeitos e vereadores estão demorando horas, mesmo usando multithreading. Pensar em uma nova estratégia, como fazer inserção em lots.

Escrever testes

  • Integrar com o travis
  • Adicionar badge:
    • Travis
    • coveralls.io

Fotos com URLs quebradas

Verificar se a rota mudou; Talvez fazer um request para cada foto antes de armazenar a rota, caso a rota retorne status >= 400 colocar uma foto padrão? Ou é melhor o próprio sistema armazenar as fotos para não ter que ficar verificando?

Enviar os dados dos políticos para o EveryPolitician.org

O objetivo do http://everypolitician.org/ é formar um banco de dados com todos os políticos do mundo. No Brasil, eles só têm os debutados da 55a legislatura (2015-2019) http://everypolitician.org/brazil/. Eles possuem um tutorial sobre como contribuir dados em http://everypolitician.org/contribute.html

Tendo esses dados em um lugar único, podemos fazer diversos cruzamentos interessantes, por exemplo comparando o perfil dos políticos brasileiros com os do restante da América Latina.

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.