-
Notifications
You must be signed in to change notification settings - Fork 2
docs: add documentation #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
550e684
Create index.md for Acro-R
JessUWE 4edb58a
Revise installation guide for ACRO and SACRO tools
JessUWE b0625a6
Add comprehensive overview of ACRO's capabilities
JessUWE 49e520a
Add welcome documentation for ACRO-R package
JessUWE eac3dd3
Create examples.md with usage and tutorials for ACRO
JessUWE a04eb1f
Add files via upload
JessUWE 819001f
Added the SACRO_Logo to the figures folder
JessUWE 07296a3
Enhance pkgdown configuration with light-switch
JessUWE c68b52f
CSS and JS for custom styling
JessUWE 891c44a
Simplify pkgdown workflow configuration
JessUWE ff135eb
Fix link for SACRO-Viewer documentation
JessUWE 96afd0d
Update links for ACRO and SACRO-ML tools
JessUWE 12fc94c
Update output formats in supports.md
JessUWE 065c287
Enable building vignettes in R package check
JessUWE aa88e54
Merge remote-tracking branch 'upstream/main'
JessUWE 4347add
Fix merging issues
JessUWE 0c923fe
Update .gitignore and DESCRIPTION for improved documentation and outp…
JessUWE e0b5e5c
Refactor R-CMD-check workflow configuration
JessUWE 41cc0d6
Update pre-commit configuration, fix links in documentation, and upda…
JessUWE 99fed1f
Remove unnecessary trailing whitespace from various HTML and JavaScri…
JessUWE 2c779dc
Remove unnecessary trailing whitespace from various HTML and JavaScri…
JessUWE 8d33617
Change Python requirement to version 3.10 or higher
JessUWE ebcd747
Delete .vscode directory
JessUWE 739bd21
Delete docs directory
JessUWE e2def9c
Delete .RData
JessUWE f9ce72a
Add additional entries to .Rbuildignore
JessUWE 4804ef7
Update WORDLIST with additional terms
JessUWE 05cf208
Change Python version for old R versions in CI
JessUWE 69e2bb7
Fix YAML formatting in R-CMD-check workflow
JessUWE 3347588
Comment out the R Package check step in the CI workflow
JessUWE aed2993
Remove deprecated documentation files and update installation require…
JessUWE 5b8938a
Remove unnecessary blank line in R-CMD-check workflow
JessUWE 355793c
Build vignettes and documentation
JessUWE d11dd3c
Uncomment R Package check step in workflow
JessUWE ea851f8
Build vignettes and documentation
JessUWE 2fdf7bd
Add skip_on_ci() to tests and fix workflow
JessUWE b34f2ee
Merge branch 'main' of https://github.com/JessUWE/ACRO-R
JessUWE 651b7fe
Replace skip_on_cran() with skip_on_ci() in tests for acro_crosstab a…
JessUWE 0d8ddcb
Fix formatting issues in test-acro_crosstab.R
JessUWE 998b7a6
Update tests for acro_glm with skip_on_ci
JessUWE 0a895bb
Fixed errors in the files as well as warnings. fix vignette issues an…
JessUWE 6b2197d
Merge branch 'main' of https://github.com/JessUWE/ACRO-R
JessUWE 98a479f
fixed r-cmd-check and warnings from the test files
JessUWE 5239c5f
Update R-CMD-check.yaml
JessUWE 8ff9a92
Update R-CMD-check.yaml
JessUWE f816ed7
Update create_virtualenv.R
JessUWE 665d492
fix errors and warnings, hopefully it works this time, made adjustmen…
JessUWE e6b1256
Update create_virtualenv.R
JessUWE 3d4a236
Updated virtualenv
JessUWE 2bf66b0
Merge branch 'main' of https://github.com/JessUWE/ACRO-R
JessUWE a2d0599
cleaned code to meet codecav
JessUWE 6d5f04f
fixed The roxygen comments in your R code are being converted to an i…
JessUWE aea2bd3
added a new test file
JessUWE 4405b92
fixed pre commit issues
JessUWE 4dda03a
.
JessUWE a3b5843
Update create_virtualenv.R
JessUWE a7391fc
Merge branch 'main' of https://github.com/JessUWE/ACRO-R
JessUWE 437d224
Update test-create_virtualenv.R
JessUWE 8e1b6d2
.
JessUWE 64a52f0
Merge branch 'main' of https://github.com/JessUWE/ACRO-R
JessUWE 2314796
.
JessUWE 7d77251
Delete vignettes/.example-notebook.Rmd.swp
JessUWE cd934da
Update index.md
JessUWE 5a0b421
Replace skip_on_ci() with skip_on_cran() in tests for acro_crosstab…
JessUWE ac5b9bf
Moved the NEWS.md file to the right position
JessUWE 34e7a0a
Update test-acro_glm.R
JessUWE e67f891
Update R-CMD-check.yaml
JessUWE 1ae1d12
Update R-CMD-check.yaml
JessUWE File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,27 @@ | ||
| --- | ||
| url: https://AI-SDC.github.io/ACRO-R/ | ||
| template: | ||
| light-switch: true | ||
| bootstrap: 5 | ||
| ... | ||
| bslib: | ||
| primary: "#0051a5" | ||
|
|
||
| navbar: | ||
| structure: | ||
| left: [home, reference, welcome, supports, installation, examples] | ||
| right: [search, github, lightswitch] | ||
| left: | ||
| - text: "Home" | ||
| href: index.html | ||
| - text: "Reference" | ||
| href: reference/index.html | ||
| - text: "Welcome to ACRO-R" | ||
| href: welcome.html | ||
| - text: "What ACRO-R Supports" | ||
| href: supports.html | ||
| - text: "Installation" | ||
| href: installation.html | ||
| - text: "Examples" | ||
| href: examples.html | ||
| right: | ||
| - icon: fab-github | ||
| href: https://github.com/AI-SDC/ACRO-R | ||
| aria-label: GitHub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Examples | ||
|
|
||
| ## Interactive Notebook | ||
|
|
||
| For comprehensive examples and tutorials, see our interactive R notebook: | ||
|
|
||
| [Example Notebook](articles/example-notebook.html) | ||
|
|
||
| ## Quick Start Examples | ||
|
|
||
| ### Basic Usage | ||
|
|
||
| ```r | ||
| library("acro") | ||
|
|
||
| # Initialize ACRO | ||
| acro_init(suppress = TRUE) | ||
|
|
||
| # Your analysis code here | ||
| # ACRO will automatically check outputs for disclosure risks | ||
| ``` | ||
|
|
||
| ### Creating Safe Tables | ||
|
|
||
| ```r | ||
| # Example of creating a cross-tabulation with ACRO | ||
| result <- acro_crosstab(data$variable1, data$variable2) | ||
|
|
||
| # ACRO automatically applies disclosure control | ||
| print(result) | ||
| ``` | ||
|
|
||
| ### Finalizing Your Session | ||
|
|
||
| ```r | ||
| # When you're done with your analysis | ||
| acro_finalise() | ||
| ``` | ||
|
|
||
| For more detailed examples and use cases, please refer to the [Example Notebook](articles/example-notebook.html). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| <img src="man/figures/SACRO_Logo_final.png" alt="Alt Text" width="20%"> | ||
|
|
||
| ## AI-SDC Family Tools | ||
|
|
||
| | **ACRO (Python)** | **SACRO-ML** | | ||
| | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | **Statistical Disclosure Control for Python** <br />Tools for the Semi-Automatic Checking of Research Outputs. Drop-in replacements for common analysis commands with built-in privacy protection.<br />[Statistical Analysis](https://sacro-tools.org/ACRO/introduction.html){.btn .btn-acro .btn-sm} | **Machine Learning Privacy Tools** <br />Collection of tools and resources for managing the statistical disclosure control of trained machine learning models.<br />[Learn More](https://sacro-tools.org/SACRO-ML/introduction.html){.btn .btn-sacro-ml .btn-sm} | | ||
| | **ACRO-R** | **SACRO-Viewer** | | ||
| | **R Package Integration** <br />R-language interface for the Python ACRO library, providing familiar R syntax for statistical disclosure control.<br />[R Integration](reference/index.html){.btn .btn-acro-r .btn-sm} | **Graphical User Interface** <br />A graphical user interface for fast, secure and effective output checking, which can work in any TRE (Trusted Research Environment).<br />[View Docs](https://sacro-tools.org/SACRO-Viewer/introduction.html){.btn .btn-sacro-viewer .btn-sm} | | ||
|
|
||
| ## ACRO-R: Statistical Disclosure Control | ||
|
|
||
| ACRO is a free and open source tool that supports the semi-automated checking of research outputs (SACRO) for privacy disclosure within secure data environments. SACRO is a framework that applies best-practice principles-based statistical disclosure control (SDC) techniques on-the-fly as researchers conduct their analysis. SACRO is designed to assist human checkers rather than seeking to replace them as with current automated rules-based approaches. | ||
|
|
||
| ## What is ACRO-R? | ||
|
|
||
| ACRO implements a principles-based statistical disclosure control (SDC) methodology that: | ||
|
|
||
| * Automatically identifies potentially disclosive outputs | ||
| * Applies optional disclosure mitigation strategies | ||
| * Reports reasons for applying SDC | ||
| * Produces summary documents for output checkers | ||
|
|
||
| ## Core Features | ||
|
|
||
| ### Semi-Automated Disclosure Checking | ||
|
|
||
| * **Drop-in replacements** for common Python analysis commands (pandas, statsmodels, etc.) with configurable disclosure checks | ||
| * **Automated sensitivity tests** : frequency thresholds, dominance (p%, NK rules, etc.), residual degrees-of-freedom checks | ||
| * **Optional mitigations** : suppression, rounding, and more to come | ||
| * **Session management** : track, rename, comment, remove, add exceptions, and finalise reports | ||
| * **Configurable risk parameters** via YAML files | ||
| * **Generates auditable reports** in JSON or Excel | ||
|
|
||
| ### Design Principles | ||
|
|
||
| * **Free and open source** under MIT (ACRO) / GPLv3 (SACRO Viewer) | ||
| * **Easy to install** via PyPI, CRAN, or GitHub; cross-platform (Linux, macOS, Windows) | ||
| * **Familiar APIs** - same function signatures as native commands: acro.crosstab mirrors pandas.crosstab, etc. | ||
| * **Comprehensive coverage** - tables, regressions, histograms, survival plots, etc. | ||
| * **Transparent & auditable** - clear reports, stored queries, designed for human-checkers | ||
| * **Configurable & extensible** - organisation-defined disclosure rules, multi-language support | ||
| * **Scalable** - lightweight, session-based, local execution | ||
|
|
||
| ## Getting Started | ||
|
|
||
| | **Install** | **Learn** | **Reference** | | ||
| | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | | ||
| | Get ACRO-R installed and configured in your environment<br />[Install Guide](articles/installation.html){.btn .btn-primary} | Explore tutorials and examples for common use cases<br />[Examples](articles/index.html){.btn .btn-primary} | Complete API documentation and function reference<br />[API Docs](reference/index.html){.btn .btn-primary} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Installation Guide | ||
|
|
||
| ## Install from CRAN | ||
|
|
||
| Install the **acro** package from CRAN as follows: | ||
|
|
||
| ```r | ||
| install.packages("acro") | ||
| ``` | ||
|
|
||
| ## Development Version | ||
|
|
||
| To install the development version from GitHub: | ||
|
|
||
| ```r | ||
| # Install devtools if you haven't already | ||
| install.packages("devtools") | ||
|
|
||
| # Install ACRO-R from GitHub | ||
| devtools::install_github("AI-SDC/ACRO-R") | ||
| ``` | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| ACRO-R requires: | ||
| - R version 4.0 or higher | ||
| - Python 3.8 or higher with the ACRO Python package installed | ||
|
|
||
| ## Python ACRO Installation | ||
|
|
||
| The R package interfaces with the Python ACRO library. Install it using: | ||
|
|
||
| ```bash | ||
| pip install acro | ||
| ``` | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| If you are having problems installing the package, please see the more detailed [installation guide](INSTALL.md) or check the [GitHub issues](https://github.com/AI-SDC/ACRO-R/issues). | ||
|
|
||
| ## Verification | ||
|
|
||
| To verify your installation works correctly: | ||
|
|
||
| ```r | ||
| library("acro") | ||
| acro_init(suppress = TRUE) | ||
| ``` | ||
|
|
||
| If this runs without errors, your installation is successful! | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
|
|
||
| :root { | ||
| --bs-primary: #0051a5; | ||
| --bs-primary-rgb: 0, 81, 165; | ||
| --bs-body-bg: #ffffff; | ||
| --bs-body-color: #212529; | ||
| } | ||
|
|
||
|
|
||
| [data-bs-theme="dark"] { | ||
| --bs-primary: #4dabf7; | ||
| --bs-primary-rgb: 77, 171, 247; | ||
| --bs-body-bg: #1a1d29; | ||
| --bs-body-color: #ffffff; | ||
| } | ||
|
|
||
|
|
||
| .navbar { | ||
| background-color: var(--bs-body-bg) !important; | ||
| border-bottom: 1px solid var(--bs-border-color); | ||
| } | ||
|
|
||
|
|
||
| [data-bs-theme="dark"] .navbar { | ||
| background-color: rgb(34, 40, 50) !important; | ||
| } | ||
|
|
||
| .navbar-brand { | ||
| color: var(--bs-primary) !important; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .navbar-nav .nav-link { | ||
| color: var(--bs-body-color) !important; | ||
| } | ||
|
|
||
| .navbar-nav .nav-link:hover { | ||
| color: var(--bs-primary) !important; | ||
| } | ||
|
|
||
|
|
||
| .btn-primary { | ||
| background-color: var(--bs-primary); | ||
| border-color: var(--bs-primary); | ||
| } | ||
|
|
||
|
|
||
| a { | ||
| color: var(--bs-primary); | ||
| } | ||
|
|
||
|
|
||
| .lightswitch { | ||
| padding: 0.25rem 0.5rem; | ||
| margin-left: 0.5rem; | ||
| border: 1px solid var(--bs-border-color); | ||
| border-radius: 0.375rem; | ||
| background: transparent; | ||
| color: var(--bs-body-color); | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .lightswitch:hover { | ||
| background-color: var(--bs-secondary-bg); | ||
| } | ||
|
|
||
| .btn-acro { | ||
| background-color: #276BE9; | ||
| border-color: #276BE9; | ||
| color: white; | ||
| } | ||
|
|
||
| .btn-acro:hover { | ||
| background-color: #1e5bc7; | ||
| border-color: #1e5bc7; | ||
| color: white; | ||
| } | ||
|
|
||
| .btn-sacro-ml { | ||
| background-color: #0A7D91; | ||
| border-color: #0A7D91; | ||
| color: white; | ||
| } | ||
|
|
||
| .btn-sacro-ml:hover { | ||
| background-color: #086a7a; | ||
| border-color: #086a7a; | ||
| color: white; | ||
| } | ||
|
|
||
| .btn-acro-r { | ||
| background-color: #00843F; | ||
| border-color: #00843F; | ||
| color: white; | ||
| } | ||
|
|
||
| .btn-acro-r:hover { | ||
| background-color: #006d35; | ||
| border-color: #006d35; | ||
| color: white; | ||
| } | ||
|
|
||
| .btn-sacro-viewer { | ||
| background-color: #F66A0A; | ||
| border-color: #F66A0A; | ||
| color: white; | ||
| } | ||
|
|
||
| .btn-sacro-viewer:hover { | ||
| background-color: #d4580a; | ||
| border-color: #d4580a; | ||
| color: white; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| document.addEventListener('DOMContentLoaded', function() { | ||
| const toggleButton = document.createElement('button'); | ||
| toggleButton.innerHTML = '🌙'; | ||
| toggleButton.className = 'lightswitch'; | ||
| toggleButton.setAttribute('aria-label', 'Toggle dark mode'); | ||
|
|
||
| const navbar = document.querySelector('.navbar-nav'); | ||
| if (navbar) { | ||
| const li = document.createElement('li'); | ||
| li.className = 'nav-item'; | ||
| li.appendChild(toggleButton); | ||
| navbar.appendChild(li); | ||
| } | ||
|
|
||
| toggleButton.addEventListener('click', function() { | ||
| const currentTheme = document.documentElement.getAttribute('data-bs-theme'); | ||
| const newTheme = currentTheme === 'dark' ? 'light' : 'dark'; | ||
|
|
||
| document.documentElement.setAttribute('data-bs-theme', newTheme); | ||
| toggleButton.innerHTML = newTheme === 'dark' ? '☀️' : '🌙'; | ||
|
|
||
| localStorage.setItem('theme', newTheme); | ||
| }); | ||
|
|
||
| const savedTheme = localStorage.getItem('theme') || 'light'; | ||
| document.documentElement.setAttribute('data-bs-theme', savedTheme); | ||
| toggleButton.innerHTML = savedTheme === 'dark' ? '☀️' : '🌙'; | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.