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

Bonus features: Copy/paste text Node; simple graphical visualization Node with options #80

Merged
merged 11 commits into from
May 2, 2020

Conversation

reelmatt
Copy link
Member

@reelmatt reelmatt commented May 2, 2020

This PR adds two new Node to support some of the nice-to-have features brought up in our last customer meeting. Not much has changed on the back-end besides the inclusion of two new Node classes. The front-end adds support for a 'textarea' <SimpleInput> component and adds to the existing <GraphView> to render a <VegaLite> component.

Table Creator Node

Screen Shot 2020-05-02 at 1 56 07 PM

This switches the `file` input from the Read CSV node, into a text area `TextParameter`. This is the same as a `StringParameter` but with a different type to tell the front-end to render a larger space. Same CSV options for `sep` and `header` exist.

Graph Node

Screen Shot 2020-05-02 at 1 55 53 PM

This uses the Altair package to generate a JSON spec on the back-end from an incoming pandas DataFrame. The front-end uses a `loadGraph` function that calls the same `retrieveData` endpoint, but without processing for tabular display. The `` component then handles all the rendering from the JSON file.

This uses the same simple parameters that exist like String and IntegerParameter. The graph_type option could be modified to use a new SelectParameter with a list of supported options (right now area, bar, line, and point graphs are supported). This might conflict with @reddigari's #78 work on form elements, so I kept the customization to a minimum here. It may also make sense to fork the old functionality into a component and keep the new visual/chart display in the <GraphView> component, but provided as-is for now.

@reddigari
Copy link
Collaborator

Absolutely tremendous, worked out of the box for me on the football data.

I actually have a SelectInput ready to go --- do you mind if I push it to this branch and adjust the graph type to use it?

@reelmatt
Copy link
Member Author

reelmatt commented May 2, 2020

Go for it!

Copy link
Collaborator

@diegostruk diegostruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Great job Matt!

@reelmatt reelmatt merged commit e6db2e0 into master May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants