poloclub / wizmap Goto Github PK
View Code? Open in Web Editor NEWExplore and interpret large embeddings in your browser with interactive visualization! 📍
Home Page: https://poloclub.github.io/wizmap/
License: MIT License
Explore and interpret large embeddings in your browser with interactive visualization! 📍
Home Page: https://poloclub.github.io/wizmap/
License: MIT License
When I load the embeddings provided in the demo, it shows empty no matter what I do.
I am trying to add an option for customized stopwords (#6), but struggling to install a local version of the Python widget.
Here is how I try (after changing wizmap.py
):
$ python -m pip install -U -e ../wizmap/notebook-widget
[...]
Successfully built wizmap
Installing collected packages: wizmap
Attempting uninstall: wizmap
Found existing installation: wizmap 0.1.2
Uninstalling wizmap-0.1.2:
Successfully uninstalled wizmap-0.1.2
Successfully installed wizmap-0.1.2
However, when I try to import wizmap in Python, I get this error:
import wizmap
wizmap.visualize(data_url, grid_url)
File [.../wizmap/notebook-widget/wizmap/wizmap.py:847](.../wizmap/notebook-widget/wizmap/wizmap.py:847), in visualize(data_url, grid_url, height)
834 def visualize(data_url, grid_url, height=700):
835 """
836 Render WizMap in the output cell.
837
(...)
845 HTML code with deferred JS code in base64 format
846 """
--> 847 html_str = _make_html(data_url, grid_url)
849 # Randomly generate an ID for the iframe to avoid collision
850 iframe_id = "wizmap-iframe-" + str(int(random.random() * 1e8))
File [.../wizmap/notebook-widget/wizmap/wizmap.py:797](.../wizmap/notebook-widget/wizmap/wizmap.py:797), in _make_html(data_url, grid_url)
794 html_bottom = """</head><body><div id="app"></div></body></html>"""
796 # Read the bundled JS file
--> 797 js_b = pkgutil.get_data(__name__, "wizmap.js")
799 # Read local JS file (for development only)
800 # with open("./wizmap.js", "r") as fp:
801 # js_string = fp.read()
802 # js_b = bytes(js_string, encoding="utf-8")
803
804 # Encode the JS & CSS with base 64
805 js_base64 = base64.b64encode(js_b).decode("utf-8")
File [/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/pkgutil.py:640](https://file+.vscode-resource.vscode-cdn.net/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/pkgutil.py:640), in get_data(package, resource)
638 parts.insert(0, os.path.dirname(mod.__file__))
639 resource_name = os.path.join(*parts)
--> 640 return loader.get_data(resource_name)
File :1130, in get_data(self, path)
FileNotFoundError: [Errno 2] No such file or directory: '.../wizmap/notebook-widget/wizmap/wizmap.js'
Note: I have replaced the full path to my local wizmap
repository by ...
in the output above for brevity.
This works fine with the wizmap
version 0.1.2 installed with pip install wizmap
.
Is there anything else I need to run for building the Python package locally?
point can switch "true" and "gene" points respectively
however, the blue contour cover all the points region
What should be used to start local services in order to pass data into wizmap.
Hello!
Is there an opportunity to mark different points with different colors?
For future fixing 🙂
Workaround: remove spaces from group string names on Python side when generating Wizmap files.
Hello!
I have a small request: could you please give an example of accessing files via localhost-URLs? I have a notebook running on localhost:8888, from within the "wizmap" folder. I have tried to use the following URLs for my data:
http://localhost:8888/view/example/smaller_data.ndjson
file:///Users/alexsend57/Documents/wizmap/example/smaller_data.ndjson
However, in both cases the visualisation does not work (points are not appearing). I have checked that there is no problem with the data itself by uploading it on GitHub and running the visualisation with public URLs -- it worked perfectly.
I am running locally WizMap but only contours are visible, see below showing the DiffusionDB example. I am running WizMap in the command line:
❯ npm run dev
> [email protected] dev
> vite --port 3000
VITE v3.2.7 ready in 182 ms
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
10:50:36 AM [vite-plugin-svelte] /src/components/mapview/MapView.svelte:70:0 Unused CSS selector ".main-app-container.hidden"
10:50:36 AM [vite-plugin-svelte] /src/components/footer/Footer.svelte:250:0 Unused CSS selector "dialog[open] .row-block .row-name"
Hello! Thank you for a useful tool!
I have a problem while running the example notebook "imdb.ipynb". When I run the last cell with "wizmap.visualize", I receive this error:
FileNotFoundError: [Errno 2] No such file or directory: '../notebook-widget/wizmap/wizmap.js'
Indeed, there is no such file. What actions should I perform in order to obtain it?
I am trying to use my own embeddings with texts, but i keep getting empty graph. I tried wizmap.visualize() and online visualization - no use.
What can cause such behavior?
We created a visualisation and have a link. We want to showcase the visualisation in our website and tried to use iframe for the same but the visualisation is not loading.
Is there a way we can load the visualisations on our own website?
I would like to display an image for each data point, can you please provide an example code how to do that? Thank you!
使用什么启动本地服务才能将数据传入wizmap。
Does this tool support Chinese
When I load the embeddings provided in the demo, it shows empty no matter what I do.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.