4 min read

Looking for contributors for R mindr package to support tibble dataframe

Links: steemit.com, cnsteem.com, busy.org, steemdb.com, steemd.com

Details

The mindr package is an R package I developed to create mindmaps out of markdown files, or vice versa. The details of mindr can be found in my post on utopian.io.

Recently I have received a request from a user, who suggested that it would be great if mindr can create mindmaps out of titbble dataframes. A mini example is as follows.

A ibble database can export it’s structure in a format like this:

et1 <- structure(list(Folder = structure(c("/Root name", "/Path A",
"/Path A/Product A", "/Path A/Product A/Process A", "/Path A/Product A/Process A/Step A/Record 1",
"/Path A/Product A/Process A/Step A/Record 1/Analyses", "/Path A/Product A/Process A/Step A/Record 1/Analyses",
"/Path A/Product A/Process A/Step A/Record 1/Analyses", "/Path A/Product A/Process A/Step A/Record 1/Setup Parts",
"/Path A/Product A/Process A/Step A/Record 1/Setup Parts", "/Path A/Product A/Process A/Step A/Record 1/Setup Parts",
"/Path A/Product A/Process A/Step A/Record 1/Setup Parts", "/Path A/Product A/Process A/Step A/Record 1/Setup Parts",
"/Path A/Product A/Process A/Step A/Record 1/Setup Parts", "/Path B",
"/Path C"), .Dim = c(16L, 1L), .Dimnames = list(c("2", "3", "4",
"5", "6", "7", "7", "7", "10", "10", "10", "10", "10", "10",
"16", "17"), "Folder")), Object.Name = c(NA, NA, NA, NA, "Object 1",
"Object 2", "Object 3", "Object 4", "Part1", "Part2", "Part3",
"Part4", "Part5", "Part6", NA, NA), Object.Type = c(NA, NA, NA,
NA, "User form", "Data source type 1", "Data source type 2",
"Data source type 2", "Number", "Number", "Number", "Number",
"Text", "Text", NA, NA), Current.Revision = c(NA, NA, NA, NA,
1L, 3L, 1L, 1L, NA, NA, NA, NA, NA, NA, NA, NA), Latest.Approved.Revision = c(NA,
NA, NA, NA, NA, NA, NA, 1L, NA, NA, NA, NA, NA, NA, NA, NA)), .Names = c("Folder",
"Object.Name", "Object.Type", "Current.Revision", "Latest.Approved.Revision"
), row.names = 2:17, class = "data.frame")

> dput(et1)
structure(list(Folder = structure(c("/Root name", "/Path A", 
"/Path A/Product A", "/Path A/Product A/Process A", "/Path A/Product A/Process A/Step A/Record 1", 
"/Path A/Product A/Process A/Step A/Record 1/Analyses", "/Path A/Product A/Process A/Step A/Record 1/Analyses", 
"/Path A/Product A/Process A/Step A/Record 1/Analyses", "/Path A/Product A/Process A/Step A/Record 1/Setup Parts", 
"/Path A/Product A/Process A/Step A/Record 1/Setup Parts", "/Path A/Product A/Process A/Step A/Record 1/Setup Parts", 
"/Path A/Product A/Process A/Step A/Record 1/Setup Parts", "/Path A/Product A/Process A/Step A/Record 1/Setup Parts", 
"/Path A/Product A/Process A/Step A/Record 1/Setup Parts", "/Path B", 
"/Path C"), .Dim = c(16L, 1L), .Dimnames = list(c("2", "3", "4", 
"5", "6", "7", "7", "7", "10", "10", "10", "10", "10", "10", 
"16", "17"), "Folder")), Object.Name = c(NA, NA, NA, NA, "Object 1", 
"Object 2", "Object 3", "Object 4", "Part1", "Part2", "Part3", 
"Part4", "Part5", "Part6", NA, NA), Object.Type = c(NA, NA, NA, 
NA, "User form", "Data source type 1", "Data source type 2", 
"Data source type 2", "Number", "Number", "Number", "Number", 
"Text", "Text", NA, NA), Current.Revision = c(NA, NA, NA, NA, 
1L, 3L, 1L, 1L, NA, NA, NA, NA, NA, NA, NA, NA), Latest.Approved.Revision = c(NA, 
NA, NA, NA, NA, NA, NA, 1L, NA, NA, NA, NA, NA, NA, NA, NA)), .Names = c("Folder", 
"Object.Name", "Object.Type", "Current.Revision", "Latest.Approved.Revision"
), row.names = 2:17, class = "data.frame")

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.

It would be useful 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 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. The mindmap would look like this:

uIGGYLp.png

The source code of this mindmap is:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><map version="0.8.1"><node CREATED="1518624605953" ID="6aafl8il16sgol0a2f98h7fj1e" MODIFIED="1518624605953" TEXT="Root name"><node CREATED="1518624605953" ID="4gg26n2u55lqjr4le2hvt2muhc" MODIFIED="1518624605953" POSITION="right" TEXT="Path A"><node CREATED="1518624605953" ID="6ap2jacrbgg63me9gl51dhtc7l" MODIFIED="1518624605953" TEXT="Product A"><node CREATED="1518624605953" ID="3vr7rc3usjtjj2ilvmferd5ei7" MODIFIED="1518624605953" TEXT="Process A"><node CREATED="1518624605953" ID="60tqkqbh9pob0mhdl03ms4g7aa" MODIFIED="1518624605953" TEXT="Step A"><node CREATED="1518624605953" ID="0diak1fokgmlqkq8v9u01igl5v" MODIFIED="1518624605953" TEXT="Record 1"><node CREATED="1518624605953" ID="7mbb5ipapbkuqvnu3umog88kga" MODIFIED="1518624605953" TEXT="Analyses"><node CREATED="1518624605953" ID="05irrv7ln6v2q1eqlh7qq6msni" MODIFIED="1518624605953" TEXT="Object 2"><node CREATED="1518624605953" ID="19h266h8oholj49phevmo99an4" MODIFIED="1518624605953" TEXT="Type: data source"/><node CREATED="1518624605953" ID="1p8l3gr8igs0npbcj1pfs51djs" MODIFIED="1518624605953" TEXT="Version: 3"/></node><node CREATED="1518624605954" ID="6ruki21gtda0n8l41g3jpbd0lk" MODIFIED="1518624605954" TEXT="Object 3"><node CREATED="1518624605954" ID="04m383jp3mf0g94j5loqiqllr3" MODIFIED="1518624605954" TEXT="Type: data source"/><node CREATED="1518624605954" ID="3iue41oq3623hnbhjpvu1mbvd8" MODIFIED="1518624605954" TEXT="Version: 1"/></node><node CREATED="1518624605954" ID="4omal9q5dgqbjoadb9v58siflc" MODIFIED="1518624605954" TEXT="Object 4"><node CREATED="1518624605954" ID="4hjnm9pmnlethbti67ooohm81d" MODIFIED="1518624605954" TEXT="Type: data source"/><node CREATED="1518624605954" ID="4ddkogqg5dsagar9jpuorrspdk" MODIFIED="1518624605954" TEXT="Version: 1"/><node CREATED="1518624605954" ID="75dj99bii17r56b03l7saubsmg" MODIFIED="1518624605954" TEXT="Approved Version: 1"/></node></node><node CREATED="1518624605954" ID="40ncqfp1esa0bcb5c6htv3k57t" MODIFIED="1518624605954" TEXT="Setup Parts"><node CREATED="1518624605954" ID="6qrqjjjslkeot1f9gl1m99lpcm" MODIFIED="1518624605954" TEXT="Part1"><node CREATED="1518624605954" ID="2nd5dq6srmfogkk90l32drs62n" MODIFIED="1518624605954" TEXT="Type: Number"/></node><node CREATED="1518624605954" ID="0r1h3breufqn9ht77pju3sbe5i" MODIFIED="1518624605954" TEXT="Part2"><node CREATED="1518624605954" ID="3164glh05ucho4n50vhcblegkh" MODIFIED="1518624605954" TEXT="Type: Number"/></node><node CREATED="1518624605954" ID="242j996kcq50nl9fopvfk7icgf" MODIFIED="1518624605954" TEXT="Part3"><node CREATED="1518624605954" ID="2tmud8mk1kac0e8vnreadlio7b" MODIFIED="1518624605954" TEXT="Type: Number"/></node><node CREATED="1518624605954" ID="47hi23u1phcoe4thhcg342da34" MODIFIED="1518624605954" TEXT="Part4"><node CREATED="1518624605954" ID="0508pv5vq3ppa2macp2svajhfm" MODIFIED="1518624605954" TEXT="Type: Number"/></node><node CREATED="1518624605954" ID="1gmucpeb30jc3k6h4647q29b47" MODIFIED="1518624605954" TEXT="Part5"><node CREATED="1518624605954" ID="7sq7jojear5m1tapc0ufca3eub" MODIFIED="1518624605954" TEXT="Type: Text"/></node><node CREATED="1518624605954" ID="63ipd4qmp25ahctqgepdlsv1tu" MODIFIED="1518624605954" TEXT="Part6"><node CREATED="1518624605954" ID="746dna8cqfpomceg6jgncfhudh" MODIFIED="1518624605954" TEXT="Type: Text"/></node></node><node CREATED="1518624605954" ID="30hs0ic41ga9pf58uosg72ummt" MODIFIED="1518624605954" TEXT="Object 1"><node CREATED="1518624605954" ID="4uu2s90iha469jflihar7betcs" MODIFIED="1518624605954" TEXT="Type: User form"/><node CREATED="1518624605954" ID="70qasbhrh5n3a884mhf1hg5518" MODIFIED="1518624605954" TEXT="Version: 1"/><node CREATED="1518624605954" ID="3cisp199c7d31tr0c8up2gm7ju" MODIFIED="1518624605954" TEXT="Approved Version: 1"/></node></node></node></node></node></node><node CREATED="1518624605954" ID="3f7buu6vjkva0lvi2b969iridk" MODIFIED="1518624605954" POSITION="right" TEXT="Path B"/><node CREATED="1518624605954" ID="3oa0d2r83rrhef7tfqaivo77ir" MODIFIED="1518624605954" POSITION="left" TEXT="Path C"/></node></map>

Components

Once the task is completed, the existing components are not affected. One more function should be added into the package, which converts a tribble dataframe into a markdown file or a mindmap.

Deadline

No deadline.

Communication

Contact me on Steemit, or utopian.io or my github repo mindr.



Posted on Utopian.io - Rewarding Open Source Contributors