We need to check if the XML has other metadata such as coordinates and add them to the data output.
|
params = {'codEstacao':station, 'dataInicio':start_date, 'dataFim':end_date, |
|
'tipoDados':data_type, 'nivelConsistencia':consistency_level} |
|
server = 'http://telemetriaws1.ana.gov.br/ServiceANA.asmx/HidroSerieHistorica' |
|
response = requests.get(server, params) |
|
|
|
tree = ET.ElementTree(ET.fromstring(response.content)) |
|
root = tree.getroot() |
|
data, consistency, dates = extract_data(root, data_type) |
We need to check if the XML has other metadata such as coordinates and add them to the data output.
pyHidroWeb/pyHidroWeb.py
Lines 116 to 123 in b82933e