An interactive R Shiny application for generating Chemical Space Plots (CSPs) — graphical tools that visualize the partitioning properties of chemicals across air, water, and organic matter.
CSPs illustrate how chemicals distribute between environmental media based on three fundamental partition ratios: KAW (air–water), KOW (octanol–water), and KOA (octanol–air). This app eliminates the manual effort of recalculating threshold lines when compartment volumes change.
- Multiphase Plot — log KAW vs log KOW with customizable compartment volumes and mole fraction thresholds
- Atmospheric Plot — log KAW vs log KOA for atmospheric chemistry applications
- Custom Data Overlay — upload a CSV of compounds (only 2 of 3 partition ratios required; the third is auto-calculated)
- Threshold Indicators — centroid arrows, triangular, and curved indicator options
- Flexible Aesthetics — adjustable colours, line weights, labels, axis ranges, and shading
- Export — download publication-ready plots as PNG or SVG
R packages: shiny, dplyr, ggplot2, ggrepel, ragg, shinyjs, colourpicker, shinycssloaders
# Install dependencies
install.packages(c("shiny", "dplyr", "ggplot2", "ggrepel", "ragg", "shinyjs", "colourpicker", "shinycssloaders"))
# Launch the app
shiny::runApp()Upload a CSV with the following columns:
| Compound | logKow | logKoa | logKaw | Group |
|---|
Only two of the three partition ratio columns are required per compound. The Group column is optional and enables categorical colouring.
- S.C. Lee, D. Mackay, Environ. Sci. Technol. 14 (1995) 1839–1846.
- T. Gouin, D. Mackay, E. Webster, F. Wania, Environ. Sci. Technol. 34 (2000) 881–884.
Eric Wootton