Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix numeric charts so they display on appropriate chart #29

Closed
jasonlally opened this issue Apr 30, 2016 · 5 comments
Closed

Fix numeric charts so they display on appropriate chart #29

jasonlally opened this issue Apr 30, 2016 · 5 comments

Comments

@jasonlally
Copy link
Collaborator

No description provided.

@jasonlally jasonlally added this to the 0.1 - Testable release milestone May 3, 2016
@jasonlally jasonlally self-assigned this May 7, 2016
@jasonlally jasonlally added the bug label May 7, 2016
@jasonlally
Copy link
Collaborator Author

So C3 doesn't have a straightforward way for handling histograms/distribution charts, so we may have to generate bins of data from the return based on whether the column type is a number or not. I'm going to backburner this one to do a little more research on an appropriate approach here. In an abstract sense, this is straightforward:

Data (from API call) -> Transform (binning function) -> Output (to chart)

But there are different nuances about how to deal with outliers, and other aspects of dynamically generated data, that I'd like to make sure we pick an approach that makes sense.

There's an issue on c3 that indicates a feature coming at some point related to creating histogram charts. It's unclear if the scope includes just displaying data and/or transforming inputs for display.

@jasonlally
Copy link
Collaborator Author

So I've been doing some research here and I think I have an approach that can be quick and dirty and just use some of d3's native binning functions for histograms to handle basic transforms and then pass to c3 as data prepared for a chart. I'm going to map it out a bit more before digging in, but it should at least be minimally viable.

In doing this research I think we should consider using vega to power our visualizations. The nice thing about it is that it's a spec that encapsulates charts in a standard json object.

The tradeoff here is that vega is a bit lower level than C3, but what we gain is consistency in charting by using a declarative, standard grammar that defines a chart. This could also make reasoning about what's going on with a chart easier to do in code and make the charts super portable.

And it handles map based data as well. There's a great visualization explorer with examples on the site and there's a pretty detailed react/redux/vega tutorial here: https://medium.com/@pbesh/react-and-vega-an-alternative-visualization-example-cd76e07dc1cd#.jqeiot7dx

Anyway, not going to pull out C3, but after the sprint we should do a quick planning session to go over some technical architecture choices and make sure we balance flexibility and speed.

@jasonlally
Copy link
Collaborator Author

Also: this https://www.mapbox.com/blog/stickshift/ uses react + vega for charting as well

@jasonlally
Copy link
Collaborator Author

Alternatively NVD3 is pretty well developed and NuCivic has a react wrapper around it here: https://github.com/NuCivic/react-nvd3 which it looks like they use for their dashboards built on top of DKAN (Drupal for CKAN).

@jasonlally
Copy link
Collaborator Author

Addressed by #65

Additional smaller bugs and issues logged, but our approach here will likely shift if we switch our charting approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant