You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of having 50 or 100 or more fields on the daily population summary as we do presently, we ought to simply have a fields param. For instance the present field "males_booked_bk" becomes a call to this URI:
/dailypopulation?fields=males,bk,booked
This would make having an additional parameter, "in_jail" (see #280) much easier. It would further imply, or could imply, several things. For instance, it would allow us to lazily evaluate the daily population changes. But perhaps that would be bad for our summary, so we could do something like cache it.
Plenty of things would also be up in the air, like what happens if you hit this API without supplying fields. I also can't think of how best to implement this presently, but I do think it would make our API easier to work with, and thus would be worth working out. One disadvantage of this approach is that multiple calls to our API would have to be made to get the same amount of information.
I see this as a nice to have. It is easy to program in Javascript using
pluck to extract the field you are interested in and the data
transmission costs are low.
Doing an incremental summary calculation for a few days takes about 4
seconds. Once made,all subsequent calls are immediate.
This can be added at any time.
On Tue, May 20, 2014 at 10:48 PM, Brian Everett Peterson < [email protected]> wrote:
Instead of having 50 or 100 or more fields on the daily population summary
as we do presently, we ought to simply have a fields param. For instance
the present field "males_booked_bk" becomes:
/dailypopulation?fields=male,bk,booked
This would make having an additional parameter, "in_jail" (see #280#280)
much easier. It would further imply, or could imply, several things. For
instance, it would allow us to lazily evaluate the daily population
changes. But perhaps that would be bad, so we could do something like cache
it.
courtesy of the mind of @eads:
Instead of having 50 or 100 or more fields on the daily population summary as we do presently, we ought to simply have a fields param. For instance the present field "males_booked_bk" becomes a call to this URI:
This would make having an additional parameter, "in_jail" (see #280) much easier. It would further imply, or could imply, several things. For instance, it would allow us to lazily evaluate the daily population changes. But perhaps that would be bad for our summary, so we could do something like cache it.
Plenty of things would also be up in the air, like what happens if you hit this API without supplying fields. I also can't think of how best to implement this presently, but I do think it would make our API easier to work with, and thus would be worth working out. One disadvantage of this approach is that multiple calls to our API would have to be made to get the same amount of information.
Whatever we want to go with, it needs to be decided pretty urgently! @wilbertom, @nwinklareth, @derekeder, @fgregg, what do y'all think?
The text was updated successfully, but these errors were encountered: