Working with mini-apps
AnalytiXagility mini-apps provide you with the tools necessary to develop and run interactive visualisations that answer some of the most common questions you have about your data. Mini-apps are built on Shiny, a web application framework for R by RStudio that turns analyses into highly visual and interactive applications, making it easy for every member of a multidisciplinary team to understand project data.
Working with mini-apps in your workspace
The Mini-apps tab sits between the Audit and Data tabs. Selecting the Mini-apps tab reveals the list of published mini-apps.
There are two distinct views:
- Published – The default view in the mini-apps list is to only show those which have been published. From here a user can select or run a mini-app. The number of mini-apps that can be published will vary depending on how your workspace has been configured.
- All Mini-apps – Alongside those mini-apps that have been published you will see all those mini-apps that are currently ‘work in progress’, i.e. unpublished. As well as being able to select or run a mini-app, the user will be able to manage, preview and edit any mini-app.
- The user interface script controls the layout and appearance of your app: this is defined in the R script.
- The server script contains the functions that compute output: this is defined in the R script.
- mini-apps # Mini-apps folder
- my_app # Sub folder for this mini-app
- server.r # RShiny server script
- tile.png # (optional) .png image to be displayed as app icon (must be named)
- ui.r # RShiny ui script
- my_app # Sub folder for this mini-app
- iris.csv # (optional) CSV file containing data to load into the workspace database
- scripts # (optional) Folder containing files to load into the workspace “scripts” folder
- documents # (optional) Folder containing files to load into the workspace “scripts” folder
- datafiles # (optional) Folder containing files to load into the workspace “scripts” folder
Creating and previewing a mini-app
Select the ‘New mini-app’ option from the ‘Add’ dropdown menu and give it a name; this will create your AnalytiXagility mini-app. Once you have selected a name and confirmed, you will be dropped straight into editing the mini-app.
Note that the grid of mini-app tiles will be ordered alphabetically by name; if you want the tiles to appear in a certain order, please bear this in mind.
Structure of a mini-app
A mini-app consists of two scripts which function together to determine how it will look, and how it should function.
To learn more about Shiny powered apps, you can read RStudio’s documentation at http://shiny.rstudio.com/
Creating mini-app from a template
To help you get started we have provided a template of the required ui.r and server.r and supplementary code.r files to run a mini-app and generate a plot. When you select ‘New Mini-app’ a pop-up window will appear. Enter the name of your mini-app and choose a template from the dropdown menu.
Click on ‘Create mini-app’. This will open ui.r, server.r and code.r.
Note that code.r file is only used to add additional functions to the app, is not mandatory and can be left blank.
Publishing a mini-app
Once you are happy with the design of your mini-app you can promote it via the ‘Publish’ button in the right hand sidebar, which will make it visible for users in the mini-app gallery. This means that your new mini-app will be pushed into the default view of mini-apps, making it visible to all members of your workspace, and allowing them to run them by clicking the ‘Run’ button.
Running a mini-app
Clicking the ‘Run’ button on a published mini-app from within the Mini-apps tab will open that mini-app in its own dedicated ‘Application’ tab. From here you can also navigate around all published mini-apps using either the ‘Previous’ and ‘Next’ buttons, or by directly selecting another mini-app using the list in the right-hand sidebar.
Unpublishing and deleting a mini-app
If a mini-app has come to the end of its natural lifecycle, or further work is required before it is published for consumption by the rest of your team, you can remove it from the list of published apps by using the ‘Unpublish’ button in the right-hand sidebar. To remove it permanently, select ‘Delete’.
Customising a mini-app
You can customise your mini-app by adding additional assets to it when in ‘All mini-apps’ mode. Simply select the required mini-app in the Mini-apps tab and click ‘Upload File’ in the right-hand sidebar. This will add the file to the app and appear in its list of associated files. Clicking on one of these files will open the file for editing.
Different versions of mini-apps can be created within AnalytiXagility by adding a file to the same location as your mini-app, this will be saved this as the latest version.
Developing a mini-app offline and uploading to the workspace
You can also develop mini-apps offline on your own machine before uploading it your workspace via SFTP. To make this possible your mini-app should follow a certain structure and be archived as a .zip file.
To make an offline mini-app, create a .zip file with the following structure:
The created .zip archive must be placed into ‘Data’ folder using SFTP. Upon upload, you will be notified as to whether the archive was uploaded successfully. Now you should be able to locate it in the Mini-apps tab in your workspace.
To contact support, send an email to the Aridhia service desk: firstname.lastname@example.org.
- What do I need to know?
- Working with workspaces
- Role-based access control
- Loading data into a workspace
- Working with data
- Working with files
- To upload files using the web interface
- To upload files using sftp (e.g. scripts, reference documents)
- To upload file-based data (e.g. images)
- Creating a folder
- Creating a new file
- Deleting files
- Downloading a file to your computer
- Opening, editing, and saving files
- Working with SQL files
- Working with R
- Working with LaTeX files .rnw
- Working with mini-apps
- Enabling collaboration
- AirLock – managed data export and sharing
- Workspace snapshot
- Reviewing audit information