Closed MichaelHopwood closed 2 years ago
Hi Michael,
There's actually only one entry for extra_parameters
here for the observation, the second set of extra_parameters
is a part of the nested Site
object. It's a little bit confusing for our reference dataset, because often the Observation
's site field has the same extra_parameters
as the observation. This is because the api only returns the site_id
field where having the redundant information is useful. The APISession
tries to be helpful and load all of the metadata of the associated Site
object.
The extra parameters field is meant to be an open-format string field. In this case, we've used the extra parameters to store some json for consumption by the solarforecastarbiter.io.reference_observations sub-package. It should not generally be considered parsable as a json object.
Thanks for using the library and opening issues, it is much appreciated.
My mistake!
The
Observation
object (e.g. one below) contains duplicate entries forextra_parameters
. Additionally, the dictionary is a string which could be converted to a dictionary byast.literal_eval
.This is likely an easy fix (revolving the output of the request in the
APISession
class) so it could probably be labeled as agood first issue
.