...
To obtain all the metadata for all locations and their attributes, the locations element in the JSON response will need to be parsed. Running the python script will produce two csv files. Part : locations.csv and attributes.csv.
Note that the parsing of the main location information interprets all elements as the 'type' text. Part of an example output is presented below.
locations.csv
locationId | shortName | lat | lon | x | y | z |
locA | Location A | 56.677 | -93.641 | -93.641 | 56.677 | 0 |
locB | Location B | 49.861 | -99.962 | -99.962 | 49.861 | 0 |
locC | Location C | 51.565 | -101.917 | -101.917 | 51.565 | 0 |
locD | Location D | 49.868 | -97.405 | -97.405 | 49.868 | 0 |
...
Note that the parsing of the main location information interprets all elements as attributes takes the 'type' text. (text, number, boolean) into account
attributes.csv
locationId | operating_agency | province | hydro_station | Q_softmax | Q_hardmax | Q_softmin |
locA | Agency X | AA | Y | 80 | 1000 | 0.5 |
locB | Agency Y | BB | Y | |||
locC | Agency X | AA | Y | |||
locD | Agency X | MM | Y |
...