Member-only story
Flowchart — A new R programming diagram library for visualizing data models
The Flowchart library can display your sorted datasets

CRAN is overflowing with libraries — over 21,000 packages have been published as I type. Many are created to address a specific application such as a calculation used in biology or as functions and datasets that complement a statistics book. Many have datasets that are suited for other calculations — using an Exploratory Data Analysis can help — but you may need to visualize how the data should be divided.
The type of visual should convey how a data column is divided among the categories within the data. There are plenty of exploratory data analysis libraries that can help with the visualization.
Yet one R programming library dedicated to flowchart visualization is the library Flowchart, which was launched just last fall.
Its purpose is to provide an alternative visualization tool, one tailored for flow charts similar to other charting software like Mermaid. In this case, Flowchart creates flow diagrams directly from a data frame. This differs from Mermaid where a flowchart is created within a Quarto document rather than within a tabular object in R. Its stand-alone purpose also lends well for combining its functions with other functions from R libraries.
Where to start with Flowchart
The starting point among the functions is as_fc(). The as_fc() function creates a unique object, fc, that consists of a list containing the tibble of the dataframe associated with the flowchart and the tibble that stores the flowchart parameters.
So for example I would like to filter out the vehicles in the gtcars dataset that are not considered coupes. I first convert the data to the fc object. Here is an example of that conversion, using an object gtcar_stats.

There are a few key functions that are useful to activate a flowchart. Each can be chained via the pipe character to create a syntax representing the flowchart. Two good ones to start are fc_filter(), a…