Installation

GoldenVizR is designed to install like a standard R package.

Install from CRAN

install.packages("GoldenVizR")

Development version

If you are testing the development version from the source repository:

remotes::install_github("WajdiBenSaad/GoldenViz_R")

Load the package with:

library(GoldenVizR)

GoldenVizR analyzes ggplot2 objects, so most workflows also load ggplot2:

library(ggplot2)

Check your installation

Run this small example to confirm that GoldenVizR can inspect a ggplot2 chart:

library(ggplot2)
library(GoldenVizR)

p <- ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) +
  geom_point(size = 2.4) +
  labs(
    title = "Fuel economy by weight",
    subtitle = "Motor Trend cars",
    x = "Weight",
    y = "Miles per gallon",
    colour = "Cylinders",
    caption = "Source: mtcars"
  ) +
  theme_minimal(base_size = 12)

p

Then analyze the chart:

report <- analyze_plot(p)
report$summary
##   checked_rules implemented_checks pass warning fail info  status
## 1            25                 25   22       3    0    0 warning

Expected chart output:

You should see a goldenviz_report with 25 checked rules and status counts. The exact counts can change as the analyzer improves, but the report should contain the same top-level fields:

names(report)
## [1] "plot_summary"  "rule_results"  "status_counts" "summary"

You can also view the result as a formatted HTML report:

render_report(report)
save_report(report, "goldenviz-report.html")
view_report(report)

The HTML report can be embedded directly in rendered documentation:

Development setup

If you are contributing to GoldenVizR from a local checkout:

install.packages(c(
  "devtools", "roxygen2", "testthat", "ggplot2",
  "pkgdown", "knitr", "rmarkdown", "lintr", "styler"
))

devtools::load_all()
devtools::test()