All Projects → okfn-brasil → Perfil Politico

okfn-brasil / Perfil Politico

Licence: gpl-3.0
A platform for profiling public figures in Brazilian politics

Projects that are alternatives of or similar to Perfil Politico

Automating Your Data Pipeline With Apache Airflow
Automating Your Data Pipeline with Apache Airflow
Stars: ✭ 19 (-83.76%)
Mutual labels:  hacktoberfest, jupyter-notebook
Algorithms
🍣 Implementations of fundamental algorithms and data structures. Happy Hacktoberfest!
Stars: ✭ 41 (-64.96%)
Mutual labels:  hacktoberfest, jupyter-notebook
Hacktoberfest2020
beginner-friendly project to help you in open-source contributions. Made specifically for contributions in HACKTOBERFEST 2020! Hello World Programs in any language and C and Cpp program , Please leave a star ⭐ to support this project! ✨
Stars: ✭ 31 (-73.5%)
Mutual labels:  hacktoberfest, jupyter-notebook
Challenges
PyBites Code Challenges
Stars: ✭ 604 (+416.24%)
Mutual labels:  hacktoberfest, jupyter-notebook
Python Cheatsheet
Basic Cheat Sheet for Python (PDF, Markdown and Jupyter Notebook)
Stars: ✭ 1,334 (+1040.17%)
Mutual labels:  hacktoberfest, jupyter-notebook
H1st
The AI Application Platform We All Need. Human AND Machine Intelligence. Based on experience building AI solutions at Panasonic: robotics predictive maintenance, cold-chain energy optimization, Gigafactory battery mfg, avionics, automotive cybersecurity, and more.
Stars: ✭ 697 (+495.73%)
Mutual labels:  hacktoberfest, jupyter-notebook
Ibmi Oss Examples
A set of examples for using open source tools on IBM i
Stars: ✭ 41 (-64.96%)
Mutual labels:  hacktoberfest, jupyter-notebook
Monk v1
Monk is a low code Deep Learning tool and a unified wrapper for Computer Vision.
Stars: ✭ 480 (+310.26%)
Mutual labels:  hacktoberfest, jupyter-notebook
Hacktoberfest2020
Contribute for hacktoberfest 2020
Stars: ✭ 72 (-38.46%)
Mutual labels:  hacktoberfest, jupyter-notebook
Hacktoberfest2020 Expert
Hacktoberfest 2020. Don't forget to spread love and if you like give me a ⭐️
Stars: ✭ 67 (-42.74%)
Mutual labels:  hacktoberfest, jupyter-notebook
Data Structures Using Python
This is my repository for Data Structures using Python
Stars: ✭ 546 (+366.67%)
Mutual labels:  hacktoberfest, jupyter-notebook
Lab Workshops
Materials for workshops on text mining, machine learning, and data visualization
Stars: ✭ 112 (-4.27%)
Mutual labels:  hacktoberfest, jupyter-notebook
Notebooks
code for deep learning courses
Stars: ✭ 522 (+346.15%)
Mutual labels:  hacktoberfest, jupyter-notebook
Nbstripout
strip output from Jupyter and IPython notebooks
Stars: ✭ 738 (+530.77%)
Mutual labels:  hacktoberfest, jupyter-notebook
Pangeo
Pangeo website + discussion of general issues related to the project.
Stars: ✭ 500 (+327.35%)
Mutual labels:  hacktoberfest, jupyter-notebook
Innovative Hacktober
Make a pull request. Let's hack the ocktober in an innovative way.
Stars: ✭ 34 (-70.94%)
Mutual labels:  hacktoberfest, jupyter-notebook
Monk object detection
A one-stop repository for low-code easily-installable object detection pipelines.
Stars: ✭ 437 (+273.5%)
Mutual labels:  hacktoberfest, jupyter-notebook
Practical rl
A course in reinforcement learning in the wild
Stars: ✭ 4,741 (+3952.14%)
Mutual labels:  hacktoberfest, jupyter-notebook
Al Go Rithms
🎵 Algorithms written in different programming languages - https://zoranpandovski.github.io/al-go-rithms/
Stars: ✭ 1,036 (+785.47%)
Mutual labels:  hacktoberfest, jupyter-notebook
Hello World
Add any Program in any language you like or add a hello world Program ❣️ if you like give us ⭐
Stars: ✭ 1,464 (+1151.28%)
Mutual labels:  hacktoberfest, jupyter-notebook

Travis CI Codecov Code Climate Apoia.se

Perfil Político

A platform for profiling candidates in Brazilian 2018 General Election, based entirely on open data.

Install

This project requires Docker and Docker Compose.

Settings

To run the API, you must copy the .env.sample to a .env file. You can edit it accordingly if you want run in a production env.

Creating the container

You need to create the docker container:

$ docker-compose up -d

Database initial setup

You should create your database by applying migrations:

$ docker-compose run django ./manage.py migrate

Running

To run the project locally, you can simply use this command:

$ docker-compose up

The website and API will be available at localhost:8000 and the Jupyter at localhost:8888.

Bringing data in your database

Your local data/ directory is mapped, inside the container, to /mnt/data. Each command uses a CSV (compressed as .xz or not) from a public and available source. Use --help for more info. Yet some extra data can be generated with some Django custom commands.

Once you have download the datasets to data/, the roadmap is:

$ docker-compose run django python manage.py load_affiliations /mnt/data/filiacao.csv
$ docker-compose run django python manage.py load_candidates /mnt/data/candidatura.csv
$ docker-compose run django python manage.py link_affiliations_and_candidates
$ docker-compose run django python manage.py link_politicians_and_election_results
$ docker-compose run django python manage.py load_assets /mnt/data/bemdeclarado.csv
$ docker-compose run django python manage.py load_bills /mnt/data/senado.csv
$ docker-compose run django python manage.py load_bills /mnt/data/camara.csv

API

GET /api/candidate/<year>/<state>/<post>/

List all candidates from a certain state to a given post. For example:

/api/candidate/2018/df/deputado-distrital/

Post options for 2018 are:

  • 1o-suplente
  • 2o-suplente
  • deputado-distrital
  • deputado-estadual
  • deputado-federal
  • governador
  • presidente
  • senador
  • vice-governador
  • vice-presidente

State options are the abbreviation of the 27 Brazilian states, plus br for national election posts.

GET /api/candidate/<pk>/

Returns the details of a given candidate.

GET /api/stats/<year>/<post>/<characteristic>/

Get national statistics for a given characteristic in a elected post.

Post options are:

  • deputado-distrital
  • deputado-estadual
  • deputado-federal
  • governador
  • prefeito
  • senador
  • vereador

Characteristic options are:

  • age
  • education
  • ethnicity
  • gender
  • marital_status
  • occupation
  • party

GET /api/stats/<state>/<year>/<post>/<characteristic>/

Same as above but aggregated by state.

Tests

$ docker-compose run django py.test
$ docker-compose run django black . --check
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].