rcchen/cs210-stockholm

Update visualization API to return data in Google Charts format

Opened this issue · 9 comments

Update visualization API to return data in Google Charts format

Should have this done by the end of the night. I'll keep you posted.

Is it worth changing the way we store a dataset's attrs value to optimize this, or should I just process from the JSON hash to the google charts mandated format?

Whatever you think works best. I'm leaning towards changing the way we store a dataset's attrs and in the process rethink how we should store worksheets as well. Your call; we don't really have any migration process in place.

If we're going to use GoogleCharts, I think that migrating the dataset.attrs to be the description of the cols: field of the native Charts DataTable will make things easier throughout.

Also, assuming you are grabbing data using the dataurl option, then we can specify filters in the url in the query language found here (https://developers.google.com/chart/interactive/docs/querylanguage right? Does that mean we can bypass all the filtering we do in the api controller? It will increase network traffic but make the coding easier I think

I'll be in Mirrilees later today if you want to hack this out in person

Network traffic is cheap in our case, if we can do it on their servers let's go for it

As of now, the way our database stores dataset information and individual rows has been completely re-worked to eliminate redundancies in storage (important if this is going to be a large scale solution, like Compuverde requires).

The generic api endpoint (simpy returns the whole set to display in a table) has been retro-fitted to the new format, but the other endpoints require some re-organization.

👍

Bar charts is working, and has been improved from our D3 version in that it can support multiple x-series now!

Change will be ported to line graphs shortly.