Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
tibble to mindmap? #7
Absolutely, thanks for the reply.
I have a database that can export it's structure in a format similar to this (I've anonymized the data and copied down the paths so they repeat where needed):
In the real export there are maybe a thousand or more objects and paths. The '/Root Name' is the name of the root folder, so it would be the starting or central node.
I would like to turn this path and object information into a mindmap. To start, just capturing the paths and the objects would be great, so the mindmap can give you a visual sense of what's in the database. If the .mm format supports it, maybe the object type could be indicated by a specific icon or color and the version captured in some callout text.
Here's an example rendered mindmap that could be created from such a table:
and the source (created manually and exported via xmind application):
I guess I've got your point, although I cannot reproduce your example. If you give me a script that I could reproduce the database
The mindr package was intended to produce mindmaps from markdown. If you can convert your database into a markdown text file, then mindr can do the rest job.
For my example, converting to a markdown file is one option, though I'm not sure how to do it. Another option might be to use xml2 library to go directly from dataframe > xml .mm format.
mindr is the only R package I have found that works with mindmap files, so you could consider somehow handling dataframes and tibbles as input for producing the mindmaps since they're more commonly used than markdown.
In fact, adapted to the normal R workflow you could have the option to go both ways:
If you would like to recreate et1 you can run this command in R:
et1 <- structure(list(Folder = structure(c("/Root name", "/Path A",
Thanks for the hint. After several days' work I have written a new function in mindr, which is close to your request. Please reinstall the dev version of mindr and have a try:
It generates a mind map like this:
You can find that the demo data et2 is different from your demo et1, because I do not know much about the structure of tibble dataframe. If you can convert your dataframe into a vector like et2, then your problem can be solved.