Skip to content

Commit

Permalink
update readme and app frontend styles
Browse files Browse the repository at this point in the history
  • Loading branch information
cecoeco committed Jul 28, 2024
1 parent 0cd7d58 commit 01f93fa
Show file tree
Hide file tree
Showing 14 changed files with 179 additions and 858 deletions.
132 changes: 0 additions & 132 deletions CODE_OF_CONDUCT.md

This file was deleted.

107 changes: 71 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,90 @@
# PRISMA.jl
## PRISMA.jl

<div align="center"><img src="docs/src/assets/logo.svg" width="130">
</div>

PRISMA.jl is a Julia package and [web application]() for generating checklists and flow diagrams based on the [the **P**referred **R**eporting **I**tems for **S**ystematic **R**eviews and **M**eta-**A**nalyses (PRISMA) statement (Page et al., 2021).](https://doi.org/10.1186/s13643-021-01626-4)

### :book: Documentation

<div>
</br>
<p align="center"><img src="docs/src/assets/logo.svg" width="130"></p>
<p align="center"><strong><i>checklists and flow diagrams for evidence syntheses</i></strong></p>
<div align="center">
<a href="https://github.com/cecoeco/PRISMA.jl/blob/main/LICENSE.md"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
<a href="https://github.com/JuliaDiff/BlueStyle"><img alt="Style: Blue" src="https://img.shields.io/badge/code%20style-blue-4495d1.svg"></a>
<a href="https://github.com/cecoeco/PRISMA.jl/actions/workflows/CI.yml"><img src="https://github.com/cecoeco/PRISMA.jl/actions/workflows/CI.yml/badge.svg" alt="CI" /></a>
<a href="https://cecoeco.github.io/PRISMA.jl/dev/"><img src="https://img.shields.io/badge/docs-dev-royalblue.svg" alt="Documentation Development" /></a>
<a href="https://juliapkgstats.com/pkg/PRISMA"><img src="https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv1%2Fmonthly_downloads%2FPRISMA&query=total_requests&suffix=%2Fmonth&label=Downloads" alt="Package Statistics"></a>
<a href="https://www.contributor-covenant.org"><img src="https://img.shields.io/badge/Contributor%20Covenant-v2.1%20adopted-ff69b4.svg" alt="Contributor Covenant"></a>
</div>
<a href="https://cecoeco.github.io/PRISMA.jl/stable/"><img src="https://img.shields.io/badge/docs-stable-royalblue.svg" alt="Documentation Stable" /></a>
<a href="https://cecoeco.github.io/PRISMA.jl/dev/"><img src="https://img.shields.io/badge/docs-dev-royalblue.svg" alt="Documentation Dev"></a>
</div>

## About
### :arrow_down: Installation

```julia
using Pkg; Pkg.add("PRISMA")
```

PRISMA.jl is a Julia-based software package that generates checklists and flow diagrams for systematic reviews and meta-analyses based on [the <b>P</b>referred <b>R</b>eporting <b>I</b>tems for <b>S</b>ystematic <b>R</b>eviews and <b>M</b>eta-<b>A</b>nalyses (PRISMA) statement (Page et al., 2021).](https://doi.org/10.1186/s13643-021-01626-4) Its companion web application can also be used by researchers with little to no programming experience looking to report the results from their systematic reviews and meta-analyses with efficiency and transparency: [Link coming soon.]()
### Examples

## Installation
creating a completed checklist from a paper and
saving the results to a spreadsheet:

```julia
import Pkg; Pkg.add("PRISMA")
using PRISMA: Checklist, checklist
using DataStructures: LittleDict
using XLSX: writetable

clist::Checklist = checklist("manuscript.pdf")

println(clist)

clist_metadata::LittleDict = clist.metadata

println(clist_metadata)

title::String = clist_metadata["title"]

println(title)

writetable("$title.xlsx", title => clist.df)
```

If you do not have Julia or a text-editor that supports Julia installed, then you might find this [link](https://julialang.org/learning/) helpful before getting started.
the `checklist_df` function can be used to create spreadsheet files that can be edited outside Julia programs:

```julia
using PRISMA: checklist_df
using DataFrames: DataFrame
using XLSX: writetable

## Example
clist_template::DataFrame = checklist_df()

This simple example shows how a few functions in this package can be used together to create a flow diagram:
println(clist_template)

```Julia
using PRISMA
writetable("PRISMA_checklist.csv", "sheet_1" => clist_template)
```

the `DataFrame` that is created from the `checklist_df` function can also be edited within a Julia program using functions from the `DataFrames` package:

```julia
using PRISMA: checklist_df
using DataFrames: DataFrame

# The flow_diagram_csv() function generates a csv template.
# The path of the template is assigned to the "data" variable,
# but in most scenarios the template is edited before it is assigned and read.
data = PRISMA.flow_diagram_csv()
clist_template::DataFrame = checklist_df()

# The flow_diagram_read() function reads the csv saved as "data"
# and turns it into a dataframe and assigns it to "df".
df = PRISMA.flow_diagram_read(file=data)
println(clist_template)

# The flow_diagram() function turns data frames into
# flow diagrams that show the results of a meta-analysis or systematic review.
figure = PRISMA.flow_diagram(data=df)
clist_template[3, "Location where item is reported"] = "Sysemtatic review is in the title."
clist_template[5, "Location where item is reported"] = "The completed abastract is located on page one."

# The flow_diagram_save() function saves the figure and saves
# it in formats supported by Makie.jl, png is the default.
PRISMA.flow_diagram_save(figure=figure)
println(clist_template)
```

Result:
![flow diagram](docs/src/assets/figure.svg)
The `DataFrame` from a `Checklist` can still be edited after the paper is read by access the `df` field from the `Checklist` type:

```julia
using PRISMA: Checklist, checklist
using DataFrames: DataFrame

clist::Checklist = checklist("manuscript.pdf")

clist_df::DataFrame = clist.df

clist_df[3, "Location where item is reported"] = "Sysemtatic review is in the title."
clist_df[5, "Location where item is reported"] = "The completed abastract is located on page one."

println(clist_df)
```
1 change: 1 addition & 0 deletions app/backend/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
JSONTables = "b9914132-a727-11e9-1322-f18e41205b0b"
Oxygen = "df9a0d86-3283-4920-82dc-4555fc0d1d8b"
PRISMA = "7b67a8d2-c4f5-4933-b91c-0fc427024db5"

[compat]
julia = "1.10"
11 changes: 8 additions & 3 deletions app/backend/app.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ end
Oxygen.post("/flow_diagram") do req::HTTP.Request
flow_diagram_options::JSON3.Object = JSON3.read(String(req.body))

flow_diagram_dot::PRISMA.FlowDiagram = PRISMA.flow_diagram(
DataFrame(JSONTables.jsontable(flow_diagram_options["json"])),
flow_diagram_gv::PRISMA.FlowDiagram = PRISMA.flow_diagram(
DataFrame(JSONTables.jsontable(flow_diagram_options["data"])),

background_color = flow_diagram_options["background_color"],
grayboxes = flow_diagram_options["grayboxes"],
Expand All @@ -78,7 +78,12 @@ Oxygen.post("/flow_diagram") do req::HTTP.Request
arrow_width = flow_diagram_options["arrow_width"]
)

return Oxygen.json(Dict{String,String}("dot" => flow_diagram_dot.dot))
tempname_svg::String = tempname() * ".svg"
PRISMA.flow_diagram_save(tempname_svg, flow_diagram_gv)
svg::String = read(tempname_svg, String)
rm(tempname_svg)

return Oxygen.json(Dict{String,String}("svg" => svg))
end

Oxygen.serve(host="0.0.0.0", port=5050, docs=false, middleware=[corshandler])
Expand Down
Loading

0 comments on commit 01f93fa

Please sign in to comment.