Open fccoelho opened 11 months ago
Hi Flávio, I believe the exception is caused by an incorrect geocode. If you pass geocode=3334557, it seems you intended to use geocode=3304557:
url='https://apisidra.ibge.gov.br/values/t/200/n6/3334557/p/last/c2/all'
Unidade territorial 3334557 do nível territorial Município inexistente ou extinta
A good approach for using the API in get_sidra_table
would be to insert some validations to check the parameters before forming the URL.
We use pd.DataFrame(response.json())
in the following functions: get_sidra_table
, list_agregados
, localidades_por_agregado
, lista_periodos
inside the IBGE.py module.
Flávio, can we close this issue?
generates the following exception:
we probably need to use pd.read_json here instead of passing the JSON directly to the DataFrame constructor.