Flow Diagram

PRISMA.flow_diagram_dataframeFunction
flow_diagram_dataframe()::DataFrame

returns the template that is used to create the flow diagram as a DataFrame.

Returns

  • DataFrame: the template dataframe

Example

julia> using PRISMA

julia> isa(flow_diagram_dataframe(), DataFrame)
true
source
PRISMA.flow_diagram_templateFunction
flow_diagram_template(out::Any="flow_diagram.csv")

saves the template data to create a flow diagram as a CSV file.

Arguments

  • out::Any: Accepts the same types as CSV.write

Example

calling the function will create a CSV file called flow_diagram.csv:

julia> using PRISMA

julia> flow_diagram_template()
"flow_diagram.csv"
source
PRISMA.flow_diagram_readFunction
flow_diagram_read(fn::AbstractString="flow_diagram.csv")::DataFrame

reads the template data from a CSV file

Arguments

  • fn::AbstractString: the name of the file to read

Returns

  • DataFrame: the template dataframe

Example

julia> using PRISMA

julia> flow_diagram_template()
"flow_diagram.csv"

julia> isa(flow_diagram_read("flow_diagram.csv"), DataFrame)
true
source
PRISMA.flow_diagramFunction
flow_diagram(
    data::DataFrame=flow_diagram_dataframe();
    background_color::AbstractString="white",
    boxes_color::AbstractString="white",
    gray_boxes::Bool=true,
    gray_boxes_color::AbstractString="#f0f0f0",
    top_boxes::Bool=true,
    top_boxes_borders::Bool=false,
    top_boxes_color::AbstractString="#ffc000",
    side_boxes::Bool=true,
    side_boxes_borders::Bool=false,
    side_boxes_color::AbstractString="#95cbff",
    previous_studies::Bool=true,
    other_methods::Bool=true,
    borders::Bool=true,
    border_style::AbstractString="solid",
    border_width::Number=1,
    border_color::AbstractString="black",
    font::AbstractString="Helvetica",
    font_color::AbstractString="black",
    font_size::Number=8,
    arrow_head::AbstractString="normal",
    arrow_size::Number=1,
    arrow_color::AbstractString="black",
    arrow_width::Number=1)::FlowDiagram

generates the flow diagram figure from the flow diagram dataframe.

Argument

  • data::DataFrame: The data used to generate the flow diagram.

This function will use the DataFrame returned by flow_diagram_dataframe, if no data is provided.

Keyword Arguments

  • background_color::String: the background color of the flow diagram.
  • boxes_color::String: the color of the boxes.
  • gray_boxes::Bool: whether to show gray boxes.
  • gray_boxes_color::String: the color of the gray boxes.
  • top_boxes::Bool: whether to show top boxes.
  • top_boxes_border::Bool: whether to show top boxes border.
  • top_boxes_color::String: the color of the top boxes.
  • side_boxes::Bool: whether to show side boxes.
  • side_boxes_border::Bool: whether to show side boxes border.
  • side_boxes_color::String: the color of the side boxes.
  • previous_studies::Bool: whether to show previous studies.
  • other_methods::Bool: whether to show other methods.
  • borders::Bool=true: whether to show borders.
  • border_style::String="solid": the border style of the boxes.
  • border_width::Number=1: the border width of the boxes.
  • border_color::String="black": the border color of the boxes.
  • font::String="Helvetica": the font of the text.
  • font_color::String="black": the color of the text.
  • font_size::Number=8: the font size of the text.
  • arrow_head::String="normal": the arrow head of the arrows.
  • arrow_size::Number=1: the arrow size of the arrows.
  • arrow_color::String="black": the arrow color of the arrows.
  • arrow_width::Number=1: the arrow width of the arrows.

Returns

  • FlowDiagram: The flow diagram figure.

Example

using PRISMA

# create a template to edit the data in a csv
flow_diagram_template("flow_diagram.csv")

# create a `DataFrame` from the csv
df = flow_diagram_read("flow_diagram.csv")

# generate the flow diagram with the `DataFrame`
fd = flow_diagram(df)

# plot the flow diagram in the plot panel with `display`
display(fd)

# save the flow diagram
flow_diagram_save("flow_diagram.svg", fd)
source
PRISMA.flow_diagram_saveFunction
flow_diagram_save(fn::AbstractString, fd::FlowDiagram)

writes a FlowDiagram as either a file (i.e., any Graphviz supported format)

Arguments

  • fn::AbstractString: The name of the file to be saved.
  • fd::FlowDiagram: The flow diagram to be saved.

Returns

  • String: The path to the saved file.

Examples

using PRISMA

fd = flow_diagram()

flow_diagram_save("flow_diagram.pdf", fd)
flow_diagram_save("flow_diagram.png", fd)
flow_diagram_save("flow_diagram.svg", fd)
source
PRISMA.FlowDiagramType
FlowDiagram(dot::AbstractString="")

The type for the flow diagram that can be plotted or saved as an image.

Field

  • dot::AbstractString: The flow diagram written in Graphviz's DOT language
source