Open tylerlittlefield opened 4 years ago
I think the most common workflow would be a loop. And transforming data to long will not necessarily get what you want. The main issue with this is that you will lose the linkage between each plane.
I think the dataframe you have put together is a very good demo! Also I love how you call it "anatomy", which speaks to the complex nature of hierarchical data.
If I had to break down a dataframe for hierplane, there are 3 main components:
I am working on a more general example (simpler than starships lol) that will help demonstrate the thought process behind constructing a hierplane dataset (or hierarchical dataset in general). Maybe we will get some generalized data building functions out of it! Will keep you posted.
Creating an
hp_dataframe
object isn't easy, but I think it can be. It just doesn't seem very intuitive to me at the moment. I have worked on a small shiny app for explaining ahp_dataframe
object in a way that makes it a little clearer. Let's try and brainstorm some common workflows for taking an existing dataset, whatever it is and converting it to anhp_dataframe
. Maybe a set of steps where the first one would be a strategy for recognizing if your dataset is even compatible with hierplain, e.g. if it has potential to be represented as a tree in the first place. I also have a feeling that the use ofcase_when()
or gathering data from wider to long might be common workflows.