This is the repository for the Shiny application presented in "BoxPlotR: a web tool for generation of box plots" (Spitzer et al. 2014).
BoxPlotR v2.0.0 is engineered for biostatistics and rigorous exploratory data analysis, automating standard publication-quality data summaries:
-
Tukey Whiskers (
range = 1.5): Whiskers extend to the most extreme data point within$1.5 \times \text{IQR}$ (Interquartile Range) from the box hinges. Outliers are plotted individually. -
Spear Whiskers (
range = 0): Whiskers span the absolute minimum and maximum data values, treating no data points as outliers. -
Altman Percentiles (
range > 0): Whiskers represent symmetric percentiles (e.g. 5th and 95th, or 2.5th and 97.5th percentiles) directly from the sample distribution—ideal for larger clinical datasets.
Notches represent the
Align box widths proportionally to the square root of the number of observations (
Superimpose sample means as high-contrast red diamonds, with customizable error bars showing
Toggle from standard summaries to Violin Plots or Beanplots to inspect kernel density bandwidths, skewness, and multimodal distributions.
Deploy the fully-configured modern version natively without installing R dependencies directly onto your host system:
# Build the Docker image
docker build -t boxplotr:latest .
# Run the container (maps the container server to port 3838)
docker run -d -p 3838:3838 boxplotr:latestAccess the application in your web browser at: http://localhost:3838
The container comes equipped with testthat to run the project's automated test suite inside the same isolated sandbox:
docker run --rm boxplotr:latest Rscript -e "library(testthat); test_dir('/srv/shiny-server/tests')"Before running natively, ensure you have the latest versions of R and RStudio installed:
- Launch R / RStudio Console.
- Install the necessary packages:
install.packages(c("shiny", "beeswarm", "vioplot", "beanplot", "RColorBrewer", "readxl", "sm", "testthat"))
- Start the application directly:
shiny::runGitHub("BoxPlotR.shiny", "jwildenhain")
To run BoxPlotR as a service on a dedicated Linux host (e.g. Ubuntu):
- Install Shiny Server system dependencies:
sudo apt-get update sudo apt-get install gdebi-core R-base
- Download and install POSIT's Shiny Server from posit.co/download/shiny-server/.
- Pull the BoxPlotR repository into your Shiny server apps directory (e.g.,
/srv/shiny-server/or your customSHINY_APP_HOME). - Install all required R packages system-wide:
sudo R -e 'install.packages(c("shiny", "beeswarm", "vioplot", "beanplot", "RColorBrewer", "readxl", "sm"), repos="https://cloud.r-project.org/")' - Restart the server service:
sudo systemctl restart shiny-server
This repository includes a native, stdio-compliant Model Context Protocol (MCP) server (boxplotr_mcp_server.py) written in Python with no external library dependencies. It allows large language models (LLMs) to call BoxPlotR's plotting engine directly via standard JSON-RPC tools!
Make sure you have Python 3 and Rscript installed on your machine:
./boxplotr_mcp_server.pyTo configure the BoxPlotR MCP Server in Claude Desktop, add the following entry to your claude_desktop_config.json (usually located at ~/.config/Claude/claude_desktop_config.json on Linux/macOS or %APPDATA%/Claude/claude_desktop_config.json on Windows):
{
"mcpServers": {
"boxplotr": {
"command": "python3",
"args": ["/home/jw/Source/BoxPlotR.shiny/boxplotr_mcp_server.py"]
}
}
}Once integrated, any LLM configured with MCP can generate publication-grade box plots, violin plots, and bean plots automatically by processing user commands and passing data directly to BoxPlotR!
