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 R script.
- The server script contains the functions that compute output: this is defined in theR script.
- Create a .zip file with the following structure, e.g. my_app.zip
- mini-apps # Mini-apps folder
- my_app # Sub folder for this mini-app
- r # RShiny server script
- png # .png image to be displayed as app icon (must be named)
- r # RShiny ui script
- files # Folder containing files
- sql # Any associated files with the mini-app
- csv # Required data to be supplied without being placed in the folder
Creating and previewing a mini-app
Select the New mini-app option from the Add drop-down 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 R Studio’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 drop down 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 providing single click on ‘Run´running of the mini-app.
Running a mini-app
Clicking the Run button on a published mini-app from within the Mini-apps tab list 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 list and click ‘Upload File’ in the right 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:
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: email@example.com.
- What do I need to know?
- Working with workspaces
- Role-based access control
- Loading data into workspace
- Uploading data using the web interface
- Uploading data using SFTP
- Before you can upload data
- Preparing CSV files for uploading with SFTP
- The file name
- Contents of the CSV file
- Using table definition files with SFTP uploads
- The format of the table definition file
- The table definition element
- Data transformation during upload processes
- Working with data
- Working with files
- To upload files using SFTP
- To upload file-based data
- Creating a new file
- Adding and deleting files
- Downloading a file to your computer
- Opening, editing, and saving files
- Working with SQL files
- Working with R
- Working with LaTex markdown files .rnw
- Creating a report script
- Editing a report script
- Loading the ‘knitr’ library
- Generating a report from a script
- Viewing a generated report and optionally saving it to the workspace
- Making an image file available to a report script
- Working with mini-apps
- Enabling collaboration
- AirLock – managed data export and sharing
- Virtual desktop functionality
- Workspace snapshot
- Reviewing audit information