Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aatmunbaxi/orgroamtools

Helper library for data analysis of org-roam collections
https://github.com/aatmunbaxi/orgroamtools

data-science emacs exploratory-data-analysis library org-roam personal-knowledge-management python

Last synced: 2 months ago
JSON representation

Helper library for data analysis of org-roam collections

Awesome Lists containing this project

README

        

#+title: orgroamtools 📓🔬

[[file:viz/COVER.svg]]

=orgroamtools= is a Python library to assist in data analysis of =org-roam= collection, written in as close to pure Python as possible.
It can pull various bits of information out of your =org-roam=, including some body-text based information like source blocks and LaTeX snippets.
The information you extract about the natural graph structure of your collection can be used for many types of exploratory data analysis involving graph neural networks, natural language processing, and topological data analysis.

To use it, all you need is a healthy =org-roam v2= database!
Take a minute to locate the database by inspecting the value of =(org-roam-db-location)= in Emacs, then make sure it is up to date by running =(org-roam-db-sync)=.

* Getting Started
Install the library, putting it in a virtual environment if desired:
#+begin_src sh
python -m pip install orgroamtools
#+end_src
Import the library and pass in your database path:
#+begin_src python
from orgroamtools.data import RoamGraph
collection = RoamGraph(PATH_TO_ORG_ROAM_DB)
#+end_src

You can extract the graph structure via adjacency lists for use in graph data analysis methods like GNNs and TDA:
#+begin_src python
graph = collection.adjacency_list
#+end_src
Or you can extract the body texts of the nodes for text preprocessing for NLP:
#+begin_src python
node_bodies = collection.body_index
#+end_src

Full documentation of functions and features for the library can be read [[https://aatmunbaxi.github.io/orgroamtools][here]].
* Dependencies
- Python 3.10+
- =networkx=: a graph analysis library for Python
- =orgparse=: a Python library for parsing =org-mode= files
* Related
- =obsidiantools=