I tried to think as a student to figure out the easiest way to use this library.
You can see that I changed the output of the functions to avoid using repetition.
Example: To get observations, we would do:
x.Fred.Series.Observations.Observations, I think this might confuse students.
Also, in this case, I thought, what do we really want from this function (the data and the value), so despite saying that getting the JSON values is interesting, I think that having so many fields might be tricky for students.
So I did:
|> Seq.map(fun obs ->
{
Date = obs.Date
Value = obs.Value
})
If you want to see these changes to the different functions, use control + F with - Davide Costa to find the comments.
I tried to think as a student to figure out the easiest way to use this library.
You can see that I changed the output of the functions to avoid using repetition. Example: To get observations, we would do:
x.Fred.Series.Observations.Observations
, I think this might confuse students.Also, in this case, I thought, what do we really want from this function (the data and the value), so despite saying that getting the JSON values is interesting, I think that having so many fields might be tricky for students. So I did:
If you want to see these changes to the different functions, use
control + F
with- Davide Costa
to find the comments.