Metadata-Version: 2.4
Name: temporal-mapper
Version: 1.2.0
Summary: Implementation of density-based Mapper for temporal topic modelling.
Author-email: Kaleb D Ruscitti <kaleb.ruscitti@uwaterloo.ca>
License: BSD-3-Clause
Project-URL: Homepage, https://github.com/TutteInstitute/temporal-mapper
Project-URL: Repository, https://github.com/TutteInstitute/temporal-mapper
Project-URL: Documentation, https://temporal-mapper.readthedocs.io
Keywords: mapper,tda,morse theory,temporal topic modeling
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: adjustText
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: pandas
Requires-Dist: plotly
Requires-Dist: tqdm
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: networkx
Requires-Dist: datamapplot
Requires-Dist: datashader
Requires-Dist: vectorizers
Dynamic: license-file

<img
align="left" width="200" height="120" 
src="./docs/icon.png" alt="Temporal Mapper Logo">
## Temporal Mapper

### V.1.2.0 - February 15 2026
-----------------------------------------------
This is a library for using the Mapper for temporal topic modelling.
Though things broadly work now, the edge cases have not been throughly 
tested.

Direct questions to Kaleb D. Ruscitti: kaleb.ruscitti at uwaterloo.ca .

Complete documentation is under construction on [Read The Docs](
https://temporal-mapper.readthedocs.io/en/latest/).

### Example:
#### arXiv Papers 
From the arXiv API, we can retrieve ~500,000 article titles and abstracts,
use `SBERT` to embed them, and then UMAP to reduce to 2D.

Using [DataMapPlot](https://github.com/tutteinstitute/datamapplot) and
[TopicNaming](https://github.com/tutteinstitute/topicnaming) we can
produce a static plot of this data:

![A DataMapPlot of ArXiV papers](./docs/arxiv_static.png 
"A DataMapPlot of ArXiV Papers")

Now, using this repository we can additionally analyse the temporal
information. Using the Mapper algorithm with time as our lens
function, we create a *temporal graph* of the topics (clusters)
through time. The code includes two types of plots to visualize this
graph:

Centroid Plot             |  Temporal-Semantic Plot
:-------------------------:|:-------------------------:
![](./docs/arxiv_centroids.png)  |  ![](./docs/arxiv_time.png)

### Installation
Install from PyPI:
`pip install temporal-mapper`

Or, clone the repo and install: 

`git clone https://github.com/TutteInstitute/temporal-mapper.git`

`cd temporal-mapper && pip install .`

### Development Instructions
#### Getting set up
(Mostly for my future self...)

Clone the repo:
`git clone https://github.com/TutteInstitute/temporal-mapper.git`

Then make a virtual environment and install the package and pytest.

`cd temporal-mapper && python -m venv .venv`

`source .venv/bin/activate`

`pip install -r requirements.txt && pip install -e .`

Before making any changes, check that the tests run successfully:

`cd tests && python -m pytest mapper.py`
