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

Embed facets-overview onto web #226

Open
nehruperumalla opened this issue Sep 14, 2020 · 3 comments
Open

Embed facets-overview onto web #226

nehruperumalla opened this issue Sep 14, 2020 · 3 comments

Comments

@nehruperumalla
Copy link

Unable to embed facets-overview onto web. Unable to identify how to convert the data to protoInput before passing it to facet-overview tag. Help me embedding it onto web.

@jameswex
Copy link
Collaborator

Thanks for reaching out. What format is your data in that you want to pass to facets-overview? You'll need to take your input data and run analysis on it to get the dataset statistics proto.

In our web demo (facets.dev), we create the proto from a dataset in javascript using our JS method (https://github.com/PAIR-code/facets/blob/gh-pages/index.html#L268).

For use in notebooks, we get the stats proto using a python function, serialize it to string and pass that to the frontend and set that stringified proto on the facets-overview (https://github.com/PAIR-code/facets/blob/master/facets_overview/Overview_demo.ipynb)

@nehruperumalla
Copy link
Author

My data is in excel/CSV format. What to do after converting the data to dataset statistics proto, to embed that data onto web facets-overview.

@jameswex
Copy link
Collaborator

You should be able to set the protoInput attribute on the facets-overview html element to the proto you have created, as shown in those two links above. The first link sets the protoInput attribute to the proto after it is created in javascript. The second link sets the protoInput attribute to the string of the serialized proto, after it was passed from python to the front-end. Either format for the proto that is set on the elements protoInput attribute should work.

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

No branches or pull requests

2 participants