Comments (12)
I broke this out into a new project for our use. It's a branch here:
https://github.com/hopshadoop/facets/tree/pip_install
The pip package is here (package name is 'hopsfacets'):
https://pypi.python.org/pypi/hopsfacets/0.0.2
pip install hopsfacets
Then code looks like this:
from hopsfacets.generic_feature_statistics_generator import GenericFeatureStatisticsGenerator
import base64
gfsg = GenericFeatureStatisticsGenerator()
proto = gfsg.ProtoFromDataFrames([{'name': 'train', 'table': train_data},
{'name': 'test', 'table': test_data}])
protostr = base64.b64encode(proto.SerializeToString()).decode("utf-8")
from IPython.core.display import display, HTML
HTML_TEMPLATE = """
<script>
document.querySelector("#elem").protoInput = "{protostr}";
</script>"""
html = HTML_TEMPLATE.format(protostr=protostr)
display(HTML(html))
from facets.
Noob here..
When i try to install using what @jimdowling has provided i get :
---->No matching distribution found for tensorflow (from hopsfacets)
Update :works after I did it using anaconda prompt.
But my new error is:
ImportError Traceback (most recent call last)
in ()
----> 1 from hopsfacets.generic_feature_statistics_generator import GenericFeatureStatisticsGenerator
2 import base64
3
4 gfsg = GenericFeatureStatisticsGenerator()
5 proto = gfsg.ProtoFromDataFrames([{'name': 'train', 'table': train_data},
C:\Users\Varun\Anaconda3\lib\site-packages\hopsfacets\generic_feature_statistics_generator.py in ()
19
20 import warnings
---> 21 from base_generic_feature_statistics_generator import BaseGenericFeatureStatisticsGenerator
22 import feature_statistics_pb2 as fs
23
@jimdowling ImportError: No module named 'base_generic_feature_statistics_generator'
from facets.
Following up on this. Should be an easy fix.
from facets.
Any plans to create an official PyPI package? It seems that the latest version provided by @jimdowling is broken and the one before that is over a year old.
from facets.
I did this for https://github.com/PAIR-code/saliency. You can copy setup.cfg
and make small edits to setup.py
from that repo. Then follow instructions in https://packaging.python.org/en/latest/distributing.html
from facets.
It would also be great to make the python code also available in the default Conda repository. That way we can use the Jupyter extension with our version of Jupyter that doesn't store notebooks on the local filesystem.
from facets.
+1 to a pip install version. Issue #15 recommends a bad user experience for using this in a notebook: no one wants to write html to plot a dataframe.
from facets.
+1 for a conda package.. It is the main way many Data scientists are managing their environments.. I'm staring at the instructions now and trying to figure out where to put the git clone and how to proceed and for instance whether to installation only to my base coda env (which I use to run the notebook itself or to install in my py36 environment which actually runs most notebooks (while the server runs the base jupyter environment) Any guidance? In short without better install instructions and better example notebooks, I can't even start, specifically with Jupyter notebooks (using Anaconda), which is my primary environment. Is suspect that this may be holding up many others as well.
from facets.
this would be great.
from facets.
@kvalev - our version works with python 2.7. Need to fix it to work with python 3.
from facets.
Sorry that this issue hasn't been resolved. I've been putting most of my effort into the What-If Tool which is pip-installable and includes the Facets visualizations (but not the python code to generate statistics for Facets Overview).
I would like to create an official pip package for Facets for py2 and py3, but haven't had the bandwidth to take it on yet.
from facets.
Created facets-overview pip package, uploaded demo notebooks and readme for its usage. Works in py2 and py3. Sorry for the huge delay in this.
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 4
- 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.