Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

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
Contributor

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
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants