Code Monkey home page Code Monkey logo

logseq-graph-analysis's Introduction

Logseq Graph Analysis

Learn more about the relationships between between your notes using network analysis algorithms.

demo

Installation

  • Download a released version assets from Github.
  • Unzip it.
  • Click Load unpacked plugin, and select destination directory to the unzipped folder.

Usage

  • Click the graph icon to go into graph analysis mode.
  • There are 3 modes to play with
    • Navigate - Clicking a node will open it in logseq to edit.
    • Shortest Path - Find the shortest path between 2 notes. Click a note to select it.
    • Adamic Adar - Find secret connections between your notes. Click a note to learn which notes the algorithm thinks are linked
    • CoCitation - Checks how alike documents are by looking at how close their shared references are
  • Shift-click node to add it to sidebar
  • If there are nodes you wish to hide from your graph add the page property graph-hide:: true or exclude-from-graph-view:: true
    • graph-hide:: true hides nodes from this plugin's graph analysis mode
    • exclude-from-graph-view:: true hides nodes from both this plugin and Logseq's native global graph view, see the Logseq documentation
    • If you are interested in seeing suprising paths in your notes its a good idea to add this to notes that have lots of connections.

Search and filters

Fv8yH2eWYBYBcNH.mp4

You can use Search to highlight page on grapg by title. filter checkbox will keep only found pages + n neighbours

Filters allows you to color nodes by search query.

Both search and queries supports text search and regexp. Use q: {your query} to search using logseq quries

Settings

  • journal: show journal pages on your graph. may be slower. default false

Development

  1. yarn
  2. yarn build
  3. Load the unpacked plugin

Icon

Algorithm icons created by Becris - Flaticon

Thank You

Huge thanks to obsidian graph analysis for the inspiration and implementation of the adar algorithm!

logseq-graph-analysis's People

Contributors

ajk68 avatar hhornburg avatar millironx avatar mrparalon avatar trashhalo avatar yu000jp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

logseq-graph-analysis's Issues

graph not loading

Hi! I am having issues loading the graph. The following error is seen in the console:

3index.6754c062.js:10 Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value).map is not a function
    at Ta (index.6754c062.js:10:129879)
    at Jt (index.6754c062.js:10:129076)

image

Any recommendations about this issue?

Include journals page?

Thanks for the amazing plugin! I use it a lot and love it! The graph analysis plugin was the only reason i was still using obsidian.

Not an issue, but a feature request. My graph has the vast amount of blocks in the Journals. I have commented out the lines where you exclude the journals pages in stores.ts, which makes the graph far more useful for me. It is a bit slower on first load, but still very usable once loaded.

I've tried to add a checkbox to include journals pages, but failed. Would be great if this was an option, so i can use the marketplace version of the plugin.

add a filter mode for search

nmartin84 — Today at 12:39 PM
I'm loving the CoCitation algorithm.. Question though, is it possible to add a filter option to the graph? Keyword based, and it limits the visible nodes that match the keyword entered?

Stephen Solka — Today at 1:28 PM
To clarify, are you saying that like you put into a search box, the word cow and only notes that have the word cow in their name would be visible? Would their connections be visible as well? It might help if you say what's the use case like maybe you have too many notes and it's hard to read or something

nmartin84 — Today at 1:40 PM
Correct, only nodes that match the keyword, and their connections.

Stephen Solka — Today at 1:42 PM
I can do that. Do you want connections of connections etc too? A->B->C , A B and C would be visible if you search A

nmartin84 — Today at 1:42 PM
That would be great, and yeah connections of connections, or maybe even an option to choose "how many hops away?" so the user can tweak as they like?

Shaking nodes, shaking graph

Nodes won't stop shaking/moving. Holding any of modifier keys doesnt help. Clicking on the nodes doesnt prevent them from moving either.

1111.mp4

Honoring "exclude-from-graph-view::"

Hello,

Graph-analysis fills a gap left by the built-in graph view. To see the connections better, excluding non-informative pages tagged by "exclude-from-graph-view:: true" for the built-in graph view has been effective. Can graph-analysis honor this flag as well?

Thanks!

Blank graph.

Obviously my part of issue #38 has a different background.

video-graph-analysis-240.mp4

Here's what I just did:
Virgin KDE Plasma account for userb
downloaded and started Logseq-linux-x64-0.9.8.appimage
added new graph /home/userb/logseq/
installed graph analysis 0.10.2 plugin
exit Logseq
copied assets, journals and pages from /home/usera/logseq to /home/userb/logseq
started started Logseq-linux-x64-0.9.8.appimage
reindexed graph
started graph analysis 0.10.2 plugin
graph remains all white and blank

Whatever causes the plugin to remain blank, it must be stored somewhere in the files from journals or pages.
Any special characters? Perhaps too large file (largest journal-file is 54,7 KiB)?

Using with gnome and don't see icon

Hi, thanks for this wonderful software that runs well on my osx system.

On my manjaro linux system with gnome I do not see the icon when I'm in logseq. Maybe this is a problem with the dimensions or format of the file that displays the icon...

graph goes blank/white after a while

The graph goes blank/white around every 5 times I check it. It can be fixed by restarting logseq or reindexing the graph (which is much slower than simply restarting the program).
My friend tried the add-on on his laptop and it would go blank immediately at all times, never functioning.
Does anyone have any idea? It's not a disaster to have to restart, but having to do it every couple of minutes can get a bit grating.

github

Filters not persistent across logseq restarts

Hi,

I noticed that the filters are all removed when logseq is restarted. Would it be possible to make them persistent? It would save me from re-copying the queries and colors everytime I reopen logseq.

Thanks!

I'm using Logseq 0.10.5 with Graph Analysis 0.11.0

Bug: Filtering with n hops can lead to an irreversible blank graph

When I filter my graph it works at first. But if I bring the n hops slider down, reversing it doesn't do anything.

Steps to replicate

  • Search for a node with filter ticked
  • Bring the n hops down: should work and you slowly only see so many hops from your search term.
  • Try to increase n hops again: Nodes do not appear again and the only thing displayed is your one node

Only way out of this is to exit the plugin and reopen it.

link up nodes inside the graph

It would be awesome to be able to create new connections from the graph view (maybe drag a line between nodes to add a connection) and to be able to save a configuration. I like to rearrange the visual so I can see the connections more clearly, but if I click out of the graph and back in my structuring work is gone and the graph is reverted to a jumble of nodes.

compatible with obsidian

hey i am quite new to this whole obsidian & logseq community and don't know if we can install, use the same plug ins which are developed for obsidian or logseq ...

A non-existent link between pages appears

A non-existent link between two unlinked pages appears in the graph if there is a third page that has links to both pages in the same block. If these links are in different blocks, no non-existent link appears.

This is what it looks like in Logseq's graph view:

изображение

This is how the bug looks in the Logseq Graph Analysis:

изображение

The bug occurs when two links are in the same block in a linking page:

изображение

If you place two links in different blocks in the linking page, the bug goes away:

изображение
изображение

In my opinion, this is a serious bug, because the whole point of the plugin is lost because of this bug: how to analyze the graph if a bunch of non-existent links are shown?

Logseq version — 0.10.9
Logseq Graph Analysis version — 0.11.3

"Keep only found" removes all nodes

When I search for nodes using queries, the graph correctly highlights me all the found nodes. However, if I check "Keep only found", all of the nodes dissapear, no matter where the "keep n hops" slider is. Is this a bug?

I'm using Logseq 0.10.5 with Graph Analysis 0.11.0

graph queries

  • add a way to bulk change the appearance of pages in graph by using simple queries.
  • persist them into a page
    • each block a query
    • block properties control node changes
  • options to change
    • icon
    • color
    • visible
  • consider a in graph interface for adding new queries, think obsidian

Adjusting any setting resets the graph view

It seems that as of the latest version, clicking on any of the settings or nodes resets the zoom of the graph back to default. This makes navigating since the user looses their focus any time a setting is adjusted. I believe in previous versions this was not the case.

Thank you so much for this plugin though. It's really interesting and I'm very excited to see how it continues to develop!

Semantic relatedness

It would be really interesting to see graph connections based on a semantic relatedness threshold using embeddings from something like google's Universal Sentence Encoder.

Feature request: Select node instead of search

The plugin is really helpful. It would be nice, if one could also click on a node to see the reduced graph with n links. This can be achieved by the search box which is a bit cumbersome. It would be nice if one could click on the node and the search box would be populated with the name of the node. Since the click currently opens the page, one would probably need to use e.g. the right-click or holding the Shift, Ctrl or Cmd key while clicking. This would make the discovery of concepts even easier.

Graph analysis button don't show up in toolbar after updated to v0.10.4

Hi!
I updated last night to latest version and now the button to display the graph is not showing up any more.
Please see below the error. I'm running LogSeq on mac os.

Screenshot 2023-10-29 at 16 07 49

Below you can see where the error is getting thrown.

Screenshot 2023-10-29 at 16 13 08

Please let me know if is there anything else I can do to help.

Thanks,
Max

draggable nodes

draggable nodes (drag to move, then the node is pinned to the new location... that would mean double click to go to page instead of single click)

Add stop button for stopping node movements

There are plenty of nodes in my graph and because of that they are keep moving forever when i open the graph page. Could you please add a stop movement option in the right bar ?

Help with queries

Hi there,

I need a little help with queries in the logseq-graph-analysis plugin. I can’t figure out how to make them work (in searches or filters).

The documentation says to use q: {your query}. I tried different versions but no luck so far (it doesn’t seem to affect the graph in any way).

The query {{query (page-property :type "Zettelkasten")}} works in a block but q: (page-property :type "Zettelkasten") doesn’t work in logseq-graph-analysis.

What am I missing ? Is it a bug ?

Many thanks!

graph-hide for namespaces

RFC: Wouldn't it be useful to hide all pages beneath a certain namespace at once (say through a different -all property)?

'This plugin #logseq-graph-analysis takes too long to load, ...'

When starting, a message that says 'This plugin #logseq-graph-analysis takes too long to load, affecting the application startup time and potentially causing other plugins to fail to load.' and gives an only option 'Disable now'. The plugin does not load. This happens on M1 Mac Version 0.8.11 (Monterey 12.6.1), and Linux version 0.8.10 (Mint, XFCE, 20.3) exactly same.

Thanks for the great plugin!

Feature request: Ability to rotate the graph

Being able to rotate the graph would help in the exploring of the graph. One can already move and zoom into the graph but not rotate it (third order of freedom). This leaves current graph less flexible. Since thinking is a somewhat spatial process, having the ability to rotate the graph would help to get a better understanding of the spatial relationships.

dark mode

  • browsers can detect if your system is in dark mode and change the colors selected.
  • add an option to override browser choice in logseq settings

Size of nodes: Total links

Currently only two options are supported to control the node size:

  • inbound links
  • outbound links

Would be helpful to also have a combined measure:

  • total (= inbound + outbound)

Compatibility with Awesome UI

I'm having an issue running this plugin with the Awesome UI plugin. The configuration is too close to the top, making some of the options invisible and unable to close the graph view.

截屏2022-12-16 23 08 25

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.