{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/1811","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/1811/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/1811/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/1811/events","html_url":"https://github.com/bokeh/bokeh/issues/1811","id":56530099,"number":1811,"title":"Extend crossfilter plugins/chart builder concept for quick general-purpose dashboards","user":{"login":"rothnic","id":452052,"avatar_url":"https://avatars.githubusercontent.com/u/452052?v=3","gravatar_id":"","url":"https://api.github.com/users/rothnic","html_url":"https://github.com/rothnic","followers_url":"https://api.github.com/users/rothnic/followers","following_url":"https://api.github.com/users/rothnic/following{/other_user}","gists_url":"https://api.github.com/users/rothnic/gists{/gist_id}","starred_url":"https://api.github.com/users/rothnic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rothnic/subscriptions","organizations_url":"https://api.github.com/users/rothnic/orgs","repos_url":"https://api.github.com/users/rothnic/repos","events_url":"https://api.github.com/users/rothnic/events{/privacy}","received_events_url":"https://api.github.com/users/rothnic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bokeh/bokeh/labels/type:%20discussion","name":"type: discussion","color":"2659A0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-02-04T14:06:21Z","updated_at":"2015-02-16T11:51:07Z","closed_at":null,"body":"This is something I noticed after reviewing #1735. I think there is a lot of similarities behind the idea of the chart builder (added by #1735) and the crossfilter plugin (added by #1774). They are just marshalling between the user and the plot. The crossfilter plugin is marshaling between the user, the ui, and the plot.\r\n\r\nYou could think of this more generically, that the builder knows the requirements of the plot it is generating, so a more specialized builder could auto-generate a simple interactive UI for a given data source. This feature would be a step towards being able to quickly piece together multiple high level charts into a dashboard that shares the same data source. \r\n\r\nThis would be possibly less efficient than using the low level interface for things like crossfilter, but would provide a method for more quickly building interactive dashboards.\r\n\r\nBelow is a diagram showing the concept:\r\n![image](https://cloud.githubusercontent.com/assets/452052/6041704/860a3c98-ac44-11e4-925f-86fc19eed681.png)\r\n"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/74497614","html_url":"https://github.com/bokeh/bokeh/issues/1811#issuecomment-74497614","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/1811","id":74497614,"user":{"login":"rothnic","id":452052,"avatar_url":"https://avatars.githubusercontent.com/u/452052?v=3","gravatar_id":"","url":"https://api.github.com/users/rothnic","html_url":"https://github.com/rothnic","followers_url":"https://api.github.com/users/rothnic/followers","following_url":"https://api.github.com/users/rothnic/following{/other_user}","gists_url":"https://api.github.com/users/rothnic/gists{/gist_id}","starred_url":"https://api.github.com/users/rothnic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rothnic/subscriptions","organizations_url":"https://api.github.com/users/rothnic/orgs","repos_url":"https://api.github.com/users/rothnic/repos","events_url":"https://api.github.com/users/rothnic/events{/privacy}","received_events_url":"https://api.github.com/users/rothnic/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T11:51:07Z","updated_at":"2015-02-16T11:51:07Z","body":"@fpliger the thing that makes this challenging is supporting multiple data formats. While ggplot has a strange interface, the thing that simplifies their charting interface for quick plotting is by choosing one data input format. I think here, we'd like to not marry ourselves to the python equivalent, pandas DataFrame, but still support it. This eventually led me down the path of looking at blaze, or extending ColumnDataSource with grouping functionality. Yesterday I went looking into data agnostic grouping and posted [this](https://groups.google.com/a/continuum.io/forum/#!topic/blaze-dev/3rilxO4eyyY) to blaze. You'll see matt's response.\r\n\r\nI both looked at using toolz/cytoolz groupby for generic grouping. I then wondered if blaze would be able to do that grouping for us. You give the chart a dict, dataframe, or database, and you'd group and reduce the data to the format needed for plotting. Like matt points out, due to not knowing the size of the data set, you have to do the grouping and reduction in one step. With the boxplot I see three different layers of formatting:\r\n\r\n1. Standard column data source, rows are records, columns are dimensions\r\n2. Indexed (grouped), where you have direct access to the different things to plot\r\n3. Reduced, where you have the iqr, max, min, mean, etc for each group.\r\n\r\nRight now, the input is 2, which is ok to support. I just think most people using a charting library at this point would also like for it to support converting from 1 to 2, as well. What matt gets to is if the data is very large, you really need to go directly from 1 to 3. I suppose you may not want to marry to blaze either, but possibly as an option would make things both data source and size agnostic.\r\n\r\nIf we don't want to utilize blaze or pandas grouping, toolz/cytoolz groupby looks like it would do the job. You'll see in the post how I get from a dataframe to the list of dicts via pandas to_dict(orient='records')."}}