Jay Taylor's notes

back to listing index

An R package which converts markdown files into mindmaps | Hacker News

[web search]
Original source (news.ycombinator.com)
Tags: markdown R mindmap transformer news.ycombinator.com
Clipped on: 2017-07-19

Image (Asset 1/2) alt=


Image (Asset 2/2) alt=
For me, the real discovery (from the showcase) is bookdown: https://bookdown.org/yihui/bookdown/

It's a tool that creates ebooks from a bunch of Markdown files. I'll certainly evaluate it for my next book or documentation project.


There's also blogdown. Similar concept, slightly different use case.

https://github.com/rstudio/blogdown


I sort of went the opposite direction. I used to use FreeMind [0], a great open-source mind mapping tool. I noticed that I'd translate from the mind map to my to do list by using indents to represent ownership of tree sub-nodes instead of the drawn lines... and I eventually just went with outlines in my to do list. I'll still sketch on paper with nodes and lines, but the indenting hierarchy works so well for me that I never fire up FreeMind. Of course, Python made sense to me too.

[0] http://freemind.sourceforge.net/wiki/index.php/Main_Page


Similar: https://youtu.be/VWkY4gNIMzQ

Markdown to Mindmap, realtime.


Oh so _you_ are Viacheslav Sniezhkov? Nice work there. I wish you had succeeded.

Thank you. I failed in marketing. This is a very specific market.

No worries, you built a great product! Good luck for your future endeavors.

What happened to the code? The domain has been gobbled up by Sedo.

Code is packaged. Probably, one day, I will create open source electron app out of it.

This video mentions memofon.com, which now looks like a good place to download malware. Don't visit.

It's "just" a Sedo squatter page.

Defunct, you know where I can find more? I'd like to use this.

Would be more useful if it rendered these inside of R - instead it just converts one text file format into another and you need something else to render it. I browsed the code and wondered why it was only 180 lines...

this looks like it does what you're mentioning (R lib wrapping js): https://github.com/seifer08ms/Rmarkmap

You could go either way with just JS also.

http://gojs.net/latest/samples/mindMap.html


This looks really useful, I've been meaning to create some for my use. I have one question, is it only a tree (one way mapping from x -> y, x -> a and y -> z) or graph is allowed too by a special linking syntax (like x -> y, x -> a, y -> z, z -> a)?

Even though these mindmaps are very simple, and basically re-arranging a table of contents, there's something deeply satisfying about having a bit of spatial layout.

only if the structure encodes something. in general it doesn't

That is very interesting, but I think that the main purpose of making a mindmap is really that you study the subject while making one.

I have a use case for which this would be very nice that isn't studying or outlining. Baiscally, I'm testing several biological pathway databases, each containing several pathway collections, each containing many pathways, each containing many genes, using each of several statistical methods, and I want to present the results of running every test on every pathway in every database, as well as present the results for the individual genes within each pathway, and I want these results to be easy to browse. A foldable, hierarchical tree structure is the perfect vehicle for this.

I've implemented my own simple script for this, but this program looks a lot better.

Example (exported to HTML from Freemind): https://darwinawardwinner.github.io/resume/examples/Salomon/...


Well, this package is more useful than I thought then!

My thoughts exactly, however, I could imagine printing something like this as a starting place / skeleton for further additions.

I mostly agree with you. I create mindmaps to help me think and or dump my brain around a particular topic. But you could do textual analysis and map a taxonomy or other analysis couldn't you (said by someone that has never done a textual analysis).

>but I think that the main purpose of making a mindmap is really that you study the subject while making one.

Yes, but you can just as well study it while writing the Markdown list version of it.


If you write down mindmap equivalent in computer and then generate graph that you look, it's just neat illustration.

Mindmap as a study method relies to hand-eye coordination. Scrawling and fudging with a pen is a way to memorize things. Good mindmap is little messy and result of some effort. It's also original creation and looking at it after some time brings the subject back into memory.


>Mindmap as a study method relies to hand-eye coordination. Scrawling and fudging with a pen is a way to memorize things.

Perhaps, but most people already do it with mind-mapping software, not pens.


It depends.

For smaller maps, sure. If you've got a bunch of information you're trying to sort out, or are working programmatically, it's nice to have automated tools.


Why would you want to implement such a thing in R and not use a decent programming language. I'm an heavy R user myself but I'd never use R for anything but statistics, for which it is ok.

Why is R not decent? The performance could be better but what else?

It's an excellent language for interactive data analysis but it totally sucks as a programming language, easily surpassing PHP and JavaScript in this respect.

I program R daily (admittedly mainly for statistics) but I don't feel this pain at all. To me, R feels like a more sane JavaScript. Are you missing type safety or better OOP?

Just check whether a variable is a string. There are many options for various flavours of OOP. IMHO it's the very foundation as an array/vector oriented language that's wrong.

Not wrong, just not what you're used to. Oh, and not to mention the `1`-based indexing! Such heresy!

R excels at two things: statistical packages and generating reports/papers (the rmarkdown ecosystem is simply fantastic at this). If either of those two things are the key features of your product it makes sense to use R for the rest of the glue code. I write R daily and I'm very productive with the language (having built a small ecosystem of tools to aid me with the mundane stuff).

If you're willing to give R a chance I highly recommend you check out syberia.io - it's a framework like rails/django for creating statistical models in R and packaging them into API containers.


I have given R a chance for 12 years or so.

You're right in the sense that there is no fundamental difference between character and string type in R. A "string" is just a character variable which contains more than one letter.

  variable_name <- "This is a string"

  # These all tell you the class type
  str(variable_name)
  class(variable_name)
  typeof(variable_name)

  # Is variable character type? Boolean TRUE/FALSE
  is.character(variable_name)

  # This tells you the number of characters. > 1 is a string.
  nchar(variable_name)

  # With vector this time
  variable_char_vector <- c("String A", "String B")

  # How long?
  length(variable_char_vector)

  # What types?
  str(variable_char_vector)

  # Are they strings?
  nchar(variable_char_vector)
I'm not an expert in a wide range of programming languages, but this doesn't seem to be a major shortcoming in R.

Many lines that don't solve the problem. What I meant: write a boolean test (a function that returns true if x is a string (a "character" vector of length 1) and false otherwise) that never throws an error.

Appreciate this is not Stackoverflow, and happy to take the discussion over there if you would like to raise a question.

However, the function I would write is:

  string_test <- function(x){
    is.character(x) && length(x) == 1
  }
If you can say where that will fail, I'd like to know because it seems like you probably have more experience than I do around this.

This yields TRUE for as.character(NA). Not what we want. Anyway, as it seems I'm alone here I retreat to silence. :-)

Not at all! I just want to learn really. R is the language I know best, but am somewhat ignorant of its shortcomings compared to others.

Thanks for the response. I personally have used too much MATLAB to bothered by the array/vector orientation.

One would assume familiarity of language to the author.

also, maybe the people they interact with tend to use R, so writing it in that language might give more immediate traction / feedback.

I think one nevertheless should warn people not to use R for things it's not suited for. Building a reliable app or library is one of those things. R provides excellent means to call into C, C++, Java etc. People should use one of these instead for such things.

You can probably do it quite easily with Pandoc if you know Haskell, or with Pandoc + a panflute filter if you know Python.



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: