예제 #1
0
파일: test_download.py 프로젝트: jvfe/mais
def test_read_table():

    assert isinstance(
        read_table(dataset_id="br_basedosdados_diretorios_brasil",
                   table_id="municipios",
                   limit=10),
        pd.DataFrame,
    )
예제 #2
0
def test_read_table():

    assert isinstance(
        read_table(
            dataset_id="br_ibge_pib",
            table_id="municipios",
            billing_project_id=TEST_PROJECT_ID,
            limit=10,
        ),
        pd.DataFrame,
    )
예제 #3
0
def test_read_table():

    assert isinstance(
        read_table(dataset_id="br_suporte", table_id="diretorio_municipios", limit=10),
        pd.DataFrame,
    )
예제 #4
0
  base_transp = pd.DataFrame(base_transp.to_records())
  base_transp = base_transp.iloc[:,1:]

  df_central = base_transp.groupby(base_transp.columns[1]).mean()
  base_transp_central = pd.DataFrame(df_central.to_records())
  base_transp_central = base_transp_central.round(3)

  return base_transp_central


#acionamento das funções


#extrair base ideb do bd
df_ideb = bd.read_table(dataset_id='br_inep_ideb', 
                            table_id='escola',
                            billing_project_id='meu-tcc-308320')

#extrair base idesp do bd
df_idesp = bd.read_table(dataset_id='br_sp_seduc_idesp', 
                             table_id='escola',
                             billing_project_id='meu-tcc-308320')
 
 #extrair base do fluxo escolar do bd 
df_fluxo = bd.read_table(dataset_id='br_sp_seduc_fluxo_escolar', 
                             table_id='escola',
                             billing_project_id='meu-tcc-308320')    

#extrair base inse do bd
df_inse = bd.read_table(dataset_id='br_sp_seduc_inse', 
                            table_id='escola',