示例#1
0
def _importexecucao():
    """Import execucao data to the database"""
    from utils import (import_execucao, geocode_execucao,
                       update_execucao_year_info)

    # Execucao
    folder = '../gastos_abertos_dados/Orcamento/execucao/'
    import_execucao.insert_all(db, path=folder)
    data_folder = 'utils/geocoder/data'
    terms_folder = 'utils/geocoder/terms'
    geocode_execucao.geocode_all(db, data_folder, terms_folder)
    update_execucao_year_info.update_all_years_info(db)
示例#2
0
def _importexecucao():
    """Import execucao data to the database"""
    from utils import (import_execucao, geocode_execucao,
                       update_execucao_year_info)

    # Execucao
    folder = '../gastos_abertos_dados/Orcamento/execucao/'
    import_execucao.insert_all(db, path=folder)
    data_folder = 'utils/geocoder/data'
    terms_folder = 'utils/geocoder/terms'
    geocode_execucao.geocode_all(db, data_folder, terms_folder)
    update_execucao_year_info.update_all_years_info(db)
示例#3
0
def importdata():
    """Import the data to the database"""
    from utils.import_revenue_codes import import_codes
    from utils import (import_revenue, import_contrato, import_execucao,
                       geocode_execucao)

    # Revenue
    import_codes(db)
    import_revenue.insert_all(db, csv_file='data/receitas_min.csv')
    # insert_all(db, csv_file='data/receitas_min.csv', lines_per_insert=80)

    # Contratos
    import_contrato.insert_all(db, csv_file='data/contratos-2014.xls')

    # Execucao
    folder = '../gastos_abertos_dados/Orcamento/execucao/'
    import_execucao.insert_all(db, folder=folder)
    data_folder = 'utils/geocoder/data'
    terms_folder = 'utils/geocoder/terms'
    geocode_execucao.geocode_all(db, data_folder, terms_folder)
示例#4
0
def importdata():
    """Import the data to the database"""
    from utils.import_revenue_codes import import_codes
    from utils import (import_revenue, import_contrato,
                       import_execucao, geocode_execucao)

    # Revenue
    import_codes(db)
    import_revenue.insert_all(db, csv_file='data/receitas_min.csv')
    # insert_all(db, csv_file='data/receitas_min.csv', lines_per_insert=80)

    # Contratos
    import_contrato.insert_all(db, csv_file='data/contratos-2014.xls')

    # Execucao
    folder = '../gastos_abertos_dados/Orcamento/execucao/'
    import_execucao.insert_all(db, path=folder)
    data_folder = 'utils/geocoder/data'
    terms_folder = 'utils/geocoder/terms'
    geocode_execucao.geocode_all(db, data_folder, terms_folder)