bradata.tse package


bradata.tse.candidatos module

class bradata.tse.candidatos.Candidatos[source]

Bases: object

Download, organize and pre-process candidatos data from TSE

download(type=None, year=None)[source]

Download a certain type of data from a year in the Candidatos option

You can also get several years or types, just pass a list

Types can be:
  • candidatos
  • bens
  • legendas
  • vagas

This method covers the following years: 2016, 2014

So, to download candidatos data from 2014, just put download(type=’candidatos’, ano=2015)

  • type – str or list with the type of the data
  • year – str or int or list with a year

Returns: Saves data to a local data file as ../bradata/tse/[state]/candidatos_[type]_[year].csv

bradata.tse.utils_tse module

bradata.tse.utils_tse.aggregate_tse(path, type, year)[source]
bradata.tse.utils_tse.unzip_tse(result, current_path)[source]

Module contents

class bradata.tse.Tse[source]

Bases: object

Gets content from infraero website. It provides a mapping to content types. statistics This is the preferred (and only supported) way to get access to those classes and their methods. You can initialize your connection class by:

camara = bradata.Infraero()

and you’ll be ready to use the API on your Python projetct.