pyLDAvis
Interactive topic model visualization. Port of the R package.
What it is and what it does
pyLDAvis is a Python port of an R visualization package designed to help you understand and explore topics discovered by LDA (latent Dirichlet allocation) topic modeling. It takes a fitted LDA model and generates an interactive web-based visualization that shows the topics, their key terms, and their relationships—useful for validating model quality and communicating results. The visualization works inside Jupyter notebooks for interactive exploration or can be saved as a standalone HTML file for sharing with others who don't have Python installed.
The package depends on standard data science libraries (numpy, scipy, pandas, scikit-learn, gensim, joblib) and uses Jinja2 to render the interactive HTML interface. It's marked Production/Stable and supports Python 3.9+, but maintenance has slowed since its last release in April 2023. The low install friction and permissive BSD license make it straightforward to add to existing projects.
Use it for:
- Visualize and validate topics from a gensim LDA model to assess model quality before publication or deployment.
- Explore topic distributions across a document corpus interactively in a Jupyter notebook during model development.
- Export topic model results as a standalone HTML file to share findings with non-technical stakeholders.
- Debug and interpret LDA model behavior by examining term-topic relationships and topic similarity.
- Communicate research findings on text corpora by embedding interactive topic visualizations in reports.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pyLDAvis creates interactive web-based visualizations for interpreting topics in fitted LDA (latent Dirichlet allocation) topic models, extracting and displaying model information for exploration in Jupyter notebooks or standalone HTML files.
Yes, if you work with LDA topic models and need to visualize or explore them. The package is stable, has low install friction, carries no known vulnerabilities, and solves a specific problem well. The aging maintenance (last release April 2023) is a minor concern but not a blocker—the core functionality is mature and the repository is not archived. Install it as part of a topic modeling workflow, but verify compatibility with your specific LDA library and Python version before relying on it in production.
Install
pyldavis on PyPI
pip
pip install pyldavisuv
uv add pyldavispoetry
poetry add pyldavisInstalling pyLDAvis
Before you install
Low friction: pure Python wheel, 10 runtime dependencies including common data science libraries (numpy, scipy, pandas, scikit-learn, gensim). Aging maintenance status—last release April 2023—but repository remains active and the package is marked Production/Stable.
License in practice
BSD-3-Clause (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions, provided you retain the license notice.
Quickstart
pip install pyldavis
import pyldavis
# Assuming you have a fitted LDA model from gensim:
# vis = pyldavis.gensim_models.prepare(lda_model, corpus, dictionary)
# vis.show()
Requires a pre-fitted LDA topic model (typically from gensim or another LDA library) and its associated corpus and dictionary objects to visualize.
Verify before relying
- Whether the package works with modern versions of all 10 runtime dependencies without compatibility issues.
- Current state of the Jupyter notebook integration given the aging maintenance status.
- Whether the standalone HTML export feature remains fully functional.
- Repository activity and commit frequency since the last release in April 2023.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — numpy, scipy, pandas, joblib, jinja2, numexpr, funcy, scikit-learn, gensim, setuptools |
| Maintenance | aging — 1,209 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,311/month — #13,602 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyLDAvis-3.4.1-py3-none-any.whl
Keywords: data science, visualization
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
gensimGensim is a Python library for topic modeling,…
copyleft · top 5,000 on PyPI
pygwalkerTurns pandas DataFrames into interactive…
permissive · top 15,000 on PyPI
palmerpenguinsLoads the Palmer penguins dataset—344…
permissive · top 15,000 on PyPI
itablesRenders Pandas and Polars DataFrames as…
permissive · top 5,000 on PyPI
leafmapLeafmap enables interactive geospatial mapping…
permissive · top 15,000 on PyPI
mpld3Converts matplotlib plots to interactive D3.js…
permissive · top 15,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
dtreevizdtreeviz renders decision trees from…
permissive · top 15,000 on PyPI
dtaleD-Tale is a Flask-backed web interface for…
copyleft · top 15,000 on PyPI
pyvisPyvis creates interactive network graph…
permissive · top 5,000 on PyPI