Comments (19)
Here you go for facets dive:
from IPython.core.display import display, HTML
import pandas as pd
from sklearn.datasets import load_boston
boston_data = load_boston()
df = pd.DataFrame(boston_data['data'], columns=boston_data['feature_names'])
jsonstr = df.to_json(orient='records')
HTML_TEMPLATE = \
"""
<link rel="import" href="/nbextensions/facets-dist/facets-jupyter.html">
<facets-dive id="elem_id" height="600"></facets-dive>
<script>
var data = {jsonstr};
document.querySelector("#elem_id").data = data;
</script>
"""
html = HTML_TEMPLATE.format(jsonstr=jsonstr)
display(HTML(html))
from facets.
These are not examples but a showcase of facets visualization features. I understand examples as instructions on how to use the toolkit locally.
Right now there is too much work to get it up and running tbo and it is easier (for me at least) to shove my data into prewritten R script and plot it. Unless I have a very high need to analyze the dataset samples in the very detail.
from facets.
from facets.
@romulomadu What is the question exactly?
For Facets Overview comparing the two datasets in your screenshot, the code to do that is in the example ipynb notebook file in the facets_overview directory.
from facets.
@jameswex > In the future, we can create some documentation clarifying this.
That would be much appreciated.
I am getting nowhere fast trying to install all the different dependencies, etc., just to set things up (e.g., bazel on windows)0, and then for how to run and view in a web browser, I seem to be hopping all over the place, searching for instructions and finding tidbits here and there.
from facets.
Is there a similar example on how to download, build and view via a web browser? I was able to install bazel and rebuild for Jupyter, but not seeing a path to build and run in a browser. Any help appreciated, this looks useful to me and others I know. Thanks.
from facets.
Right now the best examples of how to embed the visualizations into a website are the demo pages (https://pair-code.github.io/facets/index.html and https://pair-code.github.io/facets/quickdraw.html). The code for those pages can be found in this project's gh-pages branch (https://github.com/PAIR-code/facets/tree/gh-pages)
The basic idea is that you can build facets.html with "bazel build facets:facets" from the top-level directory. Then that facets.html can be imported into another page (such as the index.html and quickdraw.html from the gh-pages branch) and the and polymer elements can then be used in that page.
In the future, we can create some documentation clarifying this.
from facets.
@jameswex i was puzzled by that i had build facets.html,and index.html also imports it, but not only the examples of the index.html did not display but the function of upload csv files didn't work, i'm curious what should i do to make the index.html work smoothly on my computer locally.
from facets.
@jameswex , I have python implementation of facets, but sometime graph are not visible with the same, but if I try from https://pair-code.github.io/facets/, it works fine and load faster for any size of dataset. could you please let me know, how we can solve the problem.
from facets.
@rahulkhul Do you have an example dataset that it is failing with, along with an ipython notebook that shows the issue? Which facets visualization are you seeing this problem with?
Are there are errors in the browser debugging console?
from facets.
Would you be willing to share a csv on which this works and one on which it doesn't work? That would help me debug your issue. Let me know. Thanks!
from facets.
from facets.
I don't see the attached files in the issue. Can you email the csvs to james.[my last name]@gmail.com? Thanks.
from facets.
What is the jupyter HTML template for this one?
from facets.
same here @mg1075 !
from facets.
Facets is great to quickly visualize data except... only the most advance user will manage to get it installed/working.
I wish it would be made available the same way tensorboard is. With tensorboard, it's as simple as typing a single command. The only easy alternative to get quickly going in Facet is to directly use the example demo at https://pair-code.github.io/facets/
from facets.
Check out the new section on using Facets in Google Colaboratory (a free jupyter-based notebook environment): https://github.com/PAIR-code/facets#usage-in-google-colabratoryjupyter-notebooks and the sample notebook here: https://colab.research.google.com/drive/1QrcuNHJnL3TBzcFV-0yw6y3wWmSWv_gM
You can use facets dive and overview on csv or pandas dataframes with no need for any installations. Just a few commands in the notebook.
from facets.
Hi,
I understand how to do everything with text or numeric data, but in what format I may add images to the csv?
(i.e.- how may I implement something similar to the "draw" data- but show my own images instead of faces?)
I want to add a "high dimensional" feature to the csv (some kind of an image).
Many thanks!
from facets.
The image data can't be added to the CSV, but with Facets Dive you can add an atlas image which contains thumbnail images for line in the csv, which is what we did for the draw data.
PR #137 is about to merge in a tool to help create this atlas image for any dataset you have, and then the atlas image can be provided to dive as the atlasUrl parameter as seen here: https://github.com/PAIR-code/facets/tree/master/facets_dive#sprite-properties
from facets.
Related Issues (20)
- Binning | X-Axis selection is not rendering correctly as a dropdown HOT 8
- HTML Imports is deprecated error still here! HOT 5
- Cannot copy text from side panel HOT 2
- Is it possible to increase the max size of the atlas?
- How to load a non local image atlas?
- Questions about Facets structure and dependencies HOT 2
- Facets buttons still too big HOT 1
- Facets as a Data Studio community report HOT 3
- ProtoFromDataFrames fails for dataframes with categorical columns HOT 6
- Can not show column name in jupyter notebook. HOT 3
- How to save the tool outside the jupyter notebook so that the images appear on the display? HOT 4
- Custom stats cut-off with long names
- Why the facets button size is too big to see (again) HOT 2
- Support numpy >= 1.23 HOT 3
- facets dive demo no longer builds HOT 2
- Facet broken under np 1.23
- How to get started with Facets for a simple one-page website? HOT 6
- facets dive is not working in colab HOT 2
- Generate proto files to support protobuf 4.x.x and protoc 3.19.0 HOT 6
- facets_overview is failing with numpy-1.23.5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facets.