Data Menu for Radiant: Business Analytics using R and Shiny

The Radiant Data menu includes interfaces for loading, saving, viewing, visualizing, summarizing, transforming, and combining data. It also contains functionality to generate reproducible reports of the analyses conducted in the application.


CRAN_Status_Badge

Radiant is an open-source platform-independent browser-based interface for business analytics in R. The application is based on the Shiny package and can be run locally or on a server. Radiant was developed by Vincent Nijs. Please use the issue tracker on GitHub to suggest enhancements or report problems: https://github.com/radiant-rstats/radiant.data/issues. For other questions and comments please use [email protected].

Key features

  • Explore: Quickly and easily summarize, visualize, and analyze your data
  • Cross-platform: It runs in a browser on Windows, Mac, and Linux
  • Reproducible: Recreate results and share work with others as a state file or an Rmarkdown report
  • Programming: Integrate Radiant's analysis functions with your own R-code
  • Context: Data and examples focus on business applications

Explore

Radiant is interactive. Results update immediately when inputs are changed (i.e., no separate dialog boxes) and/or when a button is pressed (e.g., Estimate in Model > Estimate > Logistic regression (GLM)). This facilitates rapid exploration and understanding of the data.

Cross-platform

Radiant works on Windows, Mac, or Linux. It can run without an Internet connection and no data will leave your computer. You can also run the app as a web application on a server.

Reproducible

To conduct high-quality analysis, simply saving output is not enough. You need the ability to reproduce results for the same data and/or when new data become available. Moreover, others may want to review your analysis and results. Save and load the state of the application to continue your work at a later time or on another computer. Share state files with others and create reproducible reports using Rmarkdown. See also the section on Saving and loading state below

If you are using Radiant on a server you can even share the URL (include the SSUID) with others so they can see what you are working on. Thanks for this feature go to Joe Cheng.

Programming

Although Radiant's web-interface can handle quite a few data and analysis tasks, you may prefer to write your own R-code. Radiant provides a bridge to programming in R(studio) by exporting the functions used for analysis (i.e., you can conduct your analysis using the Radiant web-interface or by calling Radiant's functions directly from R-code). For more information about programming with Radiant see the programming page on the documentation site.

Context

Radiant focuses on business data and decisions. It offers tools, examples, and documentation relevant for that context, effectively reducing the business analytics learning curve.

How to install Radiant

  • Required: R version 3.4.0 or later
  • Required: Rstudio version 1.1.453 or later

In Rstudio you can start and update Radiant through the Addins menu at the top of the screen. To install the latest version of Radiant for Windows or Mac, with complete documentation for off-line access, open R(studio) and copy-and-paste the command below:

install.packages("radiant", repos = "https://radiant-rstats.github.io/minicran/")

Once all packages are installed, select Start radiant from the Addins menu in Rstudio or use the command below to launch the app:

radiant::radiant()

To launch Radiant in Rstudio's viewer pane use the command below:

radiant::radiant_viewer()

To launch Radiant in an Rstudio Window use the command below:

radiant::radiant_window()

To easily update Radiant and the required packages, install the radiant.update package using:

install.packages("radiant.update", repos = "https://radiant-rstats.github.io/minicran/")

Then select Update radiant from the Addins menu in Rstudio or use the command below:

radiant.update::radiant.update()

See the installing radiant page additional for details.

Optional: You can also create a launcher on your Desktop to start Radiant by typing radiant::launcher() in the R(studio) console and pressing return. A file called radiant.bat (windows) or radiant.command (mac) will be created that you can double-click to start Radiant in your default browser. The launcher command will also create a file called update_radiant.bat (windows) or update_radiant.command (mac) that you can double-click to update Radiant to the latest release.

When Radiant starts you will see data on diamond prices. To close the application click the icon in the navigation bar and then click Stop. The Radiant process will stop and the browser window will close (Chrome) or gray-out.

Documentation

Documentation and tutorials are available at https://radiant-rstats.github.io/docs/ and in the Radiant web interface (the icons on each page and the icon in the navigation bar).

Individual Radiant packages also each have their own pkgdown sites:

Want some help getting started? Watch the tutorials on the documentation site.

Reporting issues

Please use the GitHub issue tracker at github.com/radiant-rstats/radiant/issues if you have any problems using Radiant.

Try Radiant online

Not ready to install Radiant on your computer? Try it online at the link below:

https://vnijs.shinyapps.io/radiant

Do not upload sensitive data to this public server. The size of data upload has been restricted to 10MB for security reasons.

Running Radiant on shinyapps.io

To run your own instance of Radiant on shinyapps.io first install Radiant and its dependencies. Then clone the radiant repo and ensure you have the latest version of the Radiant packages installed by running radiant/inst/app/for.shinyapps.io.R. Finally, open radiant/inst/app/ui.R and deploy the application.

Running Radiant on shiny-server

You can also host Radiant using shiny-server. First, install radiant on the server using the command below:

install.packages("radiant", repos = "https://radiant-rstats.github.io/minicran/")

Then clone the radiant repo and point shiny-server to the inst/app/ directory. As a courtesy, please let me know if you intend to use Radiant on a server.

When running Radiant on a server, by default, file uploads are limited to 10MB and R-code in Report > Rmd and Report > R will not be evaluated for security reasons. If you have sudo access to the server and have appropriate security in place you can change these settings by adding the following lines to .Rprofile for the shiny user on the server.

options(radiant.maxRequestSize = -1)  ## no file size limit 
options(radiant.report = TRUE)

Running Radiant in the cloud (e.g., AWS)

To run radiant in the cloud you can use the customized Docker container. See https://github.com/radiant-rstats/docker for details

Saving and loading state

To save your analyses save the state of the app to a file by clicking on the icon in the navbar and then on Save radiant state file (see also the Data > Manage tab). You can open this state file at a later time or on another computer to continue where you left off. You can also share the file with others that may want to replicate your analyses. As an example, load the state file radiant-example.state.rda by clicking on the icon in the navbar and then on Load radiant state file. Go to Data > View and Data > Visualize to see some of the settings from the previous "state" of the app. There is also a report in Report > Rmd that was created using the Radiant interface. The html file radiant-example.nb.html contains the output.

A related feature in Radiant is that state is maintained if you accidentally navigate to another web page, close (and reopen) the browser, and/or hit refresh. Use Refresh in the menu in the navigation bar to return to a clean/new state.

Loading and saving state also works with Rstudio. If you start Radiant from Rstudio and use > Stop to stop the app, lists called r_data, r_info, and r_state will be put into Rstudio's global workspace. If you start radiant again using radiant::radiant() it will use these lists to restore state. Also, if you load a state file directly into Rstudio it will be used when you start Radiant to recreate a previous state.

Technical note: Loading state works as follows in Radiant: When an input is initialized in a Shiny app you set a default value in the call to, for example, numericInput. In Radiant, when a state file has been loaded and an input is initialized it looks to see if there is a value for an input of that name in a list called r_state. If there is, this value is used. The r_state list is created when saving state using reactiveValuesToList(input). An example of a call to numericInput is given below where the state_init function from radiant.R is used to check if a value from r_state can be used.

numericInput("sm_comp_value", "Comparison value:", state_init("sm_comp_value", 0))

Source code

The source code for the radiant application is available on GitHub at https://github.com/radiant-rstats. radiant.data, offers tools to load, save, view, visualize, summarize, combine, and transform data. radiant.design builds on radiant.data and adds tools for experimental design, sampling, and sample size calculation. radiant.basics covers the basics of statistical analysis (e.g., comparing means and proportions, cross-tabs, correlation, etc.) and includes a probability calculator. radiant.model covers model estimation (e.g., logistic regression and neural networks), model evaluation (e.g., gains chart, profit curve, confusion matrix, etc.), and decision tools (e.g., decision analysis and simulation). Finally, radiant.multivariate includes tools to generate brand maps and conduct cluster, factor, and conjoint analysis.

These tools are used in the Business Analytics, Quantitative Analysis, Research for Marketing Decisions, Consumer Behavior, Experiments in Firms, Pricing, and Customer Analytics classes at the Rady School of Management (UCSD).

Credits

Radiant would not be possible without R and Shiny. I would like to thank Joe Cheng, Winston Chang, and Yihui Xie for answering questions, providing suggestions, and creating amazing tools for the R community. Other key components used in Radiant are ggplot2, dplyr, tidyr, magrittr, broom, shinyAce, rmarkdown, and DT. For an overview of other packages that Radiant relies on please see the about page.

License

Radiant is licensed under the AGPLv3. As a summary, the AGPLv3 license requires, attribution, including copyright and license information in copies of the software, stating changes if the code is modified, and disclosure of all source code. Details are in the COPYING file.

The documentation, images, and videos for the radiant.data package are licensed under the creative commons attribution and share-alike license CC-BY-SA. All other documentation and videos on this site, as well as the help files for radiant.design, radiant.basics, radiant.model, and radiant.multivariate, are licensed under the creative commons attribution, non-commercial, share-alike license CC-NC-SA.

If you are interested in using any of the radiant packages please email me at [email protected]

© Vincent Nijs (2018) Creative Commons License

News

radiant.data 0.9.7.0

  • Use summarytools to generate summary information for datasets in Data > Manage
  • Show modal with warning about non-writable working directory when saving reports in Report > Rmd or Report > R
  • Apply radiant.data::fix_names to files loaded into radiant to ensure valid R-object names
  • Use the content of the Store filtered data as input to name the csv download in Data > View
  • Add "txt" as a recognized file type for Read files in Report > Rmd and Report > R
  • Allow multiple lines or loess curves based on a selected color variable for scatter plots in Data > Visualize
  • Indicate that a plot in Data > Visualize should be updated when plot labels are changed
  • Fix for #81 when variables used in Data > Pivot contain dots
  • Fix for radiant.project_dir when no Rstudio project is used which could cause incorrect relative paths to be used
  • Fix code formatting for Report > Rmd when arguments include a list (e.g., ggplot labels)
  • On Linux use a modal to show code in Report > Rmd and Report > R when reporting is set to "manual"
  • Use is_double to ensure dates are not treated as numeric variables in Data > View
  • Make sort and filter state of tables in Data > Explore and Data > Pivot available in Report > Rmd
  • Fix names for data sets loaded using the Read files button in Report > Rmd or Report > R
  • Cleanup environment after closing app
  • Fix column names with spaces, etc. when reading csv files
  • Additional styling and labeling options for Data > Visualize are now available in the browser interface
  • Fix for code generation related to DT filters

radiant.data 0.9.6.14

Major changes

  • Using shinyFiles to provide convenient access to data located on a server
  • Avoid XQuartz requirement

Minor changes

  • Load data(...) into the current environment rather than defaulting only to the global environment
  • file.rename failed using docker on windows when saving a report. Using file.copy instead
  • Fix for sf_volumes used to set the root directories to load and save files
  • Set default locale to "en_US.UTF-8" when using shiny-server unless Sys.getlocale(category = "LC_ALL") what set to something other than "C"
  • Modal shown if and Rmd (R) file is not available when using "To Rstudio (Rmd)" in Report > Rmd or "To Rstudio (R)" in Report > R
  • Track progress loading (state) files
  • Fix for radiant.sf_volumes used for the shinyFiles file browser
  • Improvements for sending code from Radiant to Rstudio
  • Better support for paths when using radiant on a server (i.e., revert to home directory using radiant.data::find_home())
  • Revert from svg to png for plots in _Report > Rmd_ and _Report > R_.svg` scatter plots with many point get to big for practical use on servers that have to transfer images to a local browser
  • Removed dependency on methods package

radiant.data 0.9.5.3

  • Fix smart comma's in data descriptions
  • Search and replace desc(n) in reports and replace by desc(n_obs)
  • Revert to storing the r_data environment as a list on stop to avoid reference problems (@josh1400)
  • Fix for plot type in Data > Pivot in older state files (@josh1400)
  • Used all declared imports (CRAN)

radiant.data 0.9.5.0

  • Fix for radiant.data::explore when variable names contain an underscore
  • Fix for find_gdrive when drive is not being synched
  • Fixes in Report > Rmd and Report > R to accomodate for pandoc > 2

radiant.data 0.9.4.6

  • Don't update a reactive binding for an object if the binding already exists. See issue https://github.com/rstudio/shiny/issues/2065
  • Fix to accomodate changes in deparse in R 3.5
  • Fix for saving data in Data > Manage and generating the relevant R-code

radiant.data 0.9.3.5

Minor changes

  • Use dev = "svg" for plots in Report > Rmd and Report > R

radiant.data 0.9.3.4

Minor changes

  • Add argument to dtab.data.frame to format specified columns as a percentage

Bug fixes

  • Round to the specified number of decimal places even if input if not of type integer (e.g., 2.0)

radiant.data 0.9.3.3

Major changes

  • When using radiant with Rstudio Viewer or in an Rstudio Window, loading and saving data through Data > Manage generates R-code the user can add to Report > Rmd or Report > R. Clicking the Show R-code checkbox displays the R-code used to load or save the current dataset
  • Various changes to the code to accomodate the use of shiny::makeReactiveBinding. The advantage is that the code generated for Report > Rmd and Report > R will no longer have to use a list (r_data) to store and access data. This means that code generated and used in the Radiant browser interface will be directly usable without the browser interface as well
  • Removed loadr, saver, load_csv, loadcsv_url, loadrds_url, and make_funs functions as they are no longer needed
  • Deprecated mean_rm, median_rm, min_rm, max_rm,sd_rm,var_rm, and sum_rm functions as they are no longer needed

Minor changes

  • Added load_clip and save_clip to load and save data to the clipboard on Windows and macOS
  • Improved auto completion in Report > Rmd and Report > R
  • Maintain, store, and clean the settings of the interactive table in Data > View
  • Address closing Rstudio Window issue (https://github.com/rstudio/shiny/issues/2033)

radiant.data 0.9.2.3

Major changes

  • Report > Rmd and Report > R will now be evaluated the r_data environment. This means that the return value from ls() will be much cleaner

Minor changes

  • Add option to load files with extension .rdata or .tsv using loadr which add that data to the Datasets dropdown
  • visualize will default to a scatter plot if xvar and yvar are specified but no plot type is provided in the function call
  • Improvements to read_files function to interactively generate R-code (or Rmarkdown code-chunks) to read files in various format (e.g., SQLite, rds, csv, xlsx, css, jpg, etc.). Supports relative paths and uses find_dropbox() and find_gdrive() when applicable

radiant.data 0.9.2.2

Minor changes

  • Require shinyAce 0.3.0
  • Export read_files function to interactively generate R-code or Rmarkdown code-chunks to read files in various format (e.g., SQLite, rds, csv, xlsx, css, jpg, etc.). Supports relative paths and uses find_dropbox() and find_gdrive() when applicable

radiant.data 0.9.2.0

Minor changes

  • Addins option to start app in Rstudio window
  • Upload and download data using the Rstudio file browser. Allows using relative paths to files (e.g., data or images inside an Rstudio project)

CHANGES IN radiant.data 0.9.0.22

Bug fixes

  • Fix for #43 where scatter plot was not shown for a dataset with less than 1,000 rows
  • Fix for Report > Rmd and Report > R when R-code or Rmarkdown is being pulled from the Rstudio editor

Minor changes

  • Updated equation example in Report > Rmd

radiant.data 0.9.0.17

Minor changes

  • Use thousand separator for summary.pivotr and summary.explore
  • Fix in code-generation for table2data

radiant.data 0.9.0.16

Minor changes

  • Changed license for help files and images for radiant.data to CC-BY-SA

radiant.data 0.9.0.15

Minor changes

  • Allow all textarea inputs and multi-select inputs to be resized manually by the user
  • Use 200 dpi for plots in Report > Rmd and Report > R
  • Data > Vizualize now has an option to select a sample of data for scatter plots (e.g., 1K, 5K, 10K, or All)

Bug fixes

  • Fix for rounddf to ignore dates

radiant.data 0.9.0.13

Minor changes

  • Apply fixMS to replace curly quotes, em dash, etc. when using Data > Transform > Create
  • Option to set number of decimals to show in Data > View
  • Improved number formatting in interactive tables in Data > View, Data > Pivot, and Data > Explore
  • Option to include an interactive view of a dataset in Report > Rmd. By default, the number of rows is set to 100 as, most likely, the user will not want to embed a large dataset in save HTML report
  • Data > Transform will leave variables selected, unless switching to Create or Spread
  • Switch focus to editor in Report > Rmd and Report > R when no other input has focus

Bug fixes

  • Fix for decimals to show in interactive tables Report > Rmd and saved HTML reports
  • Better error messages for xtile and when binning data with too many groups
  • Fix for variable type warnings in Data > Pivot when filtering the table
  • Fix for \ in equations in Report > Rmd

radiant.data 0.9.0.7

Minor changes

  • Allow response variables with NA values in Model > Logistic regression and other classification models
  • Support logicals in code generation from Data > View
  • Track window size using input$get_screen_width
  • Focus on editor when switching to Report > Rmd or Report > R so generated code is shown immediately and the user can navigate and type in the editor without having to click first
  • Add information about the first level when plotting a bar chart with a categorical variable on the Y-axis (e.g., mean(buyer {yes}))

Bug fixes

  • Cleanup now also occurs when the stop button is used in Rstudio to close the app
  • Fix to include DiagrammeR based plots in Rmarkdown reports
  • Fix in read_files for SQLite data names
  • De-activate spellcheck autocorrection in selectizeInput in Rstudio Viewer shiny #1916
  • Fix to allow selecting and copying text output from Report > Rmd and Report > R
  • Remove "fancy" quotes from filters
  • Known issue: The Rstudio viewer may not always close the viewer window when trying to stop the application with the Stop link in the navbar. As a work-around, use Rstudio's stop buttons instead.

radiant.data 0.9.0.0

Major changes

  • If Rstudio project is used Report > Rmd and Report > R will use the project directory as base. This allows users to use relative paths and making it easier to share (reproducible) code
  • Specify options in .Rprofile for upload memory limit and running Report > Rmd on server
  • find_project function based on rstudioapi
  • Report > Rmd Read button to generate code to load various types of data (e.g., rda, rds, xls, yaml, feather)
  • Report > Rmd Read button to generate code to load various types of files in report (e.g., jpg, png, md, Rmd, R). If Radiant was started from an Rstudio project, the file paths used will be relative to the project root. Paths to files synced to local Dropbox or Google Drive folder will use the find_dropbox and find_gdrive functions to enhances reproducibility.
  • Report > Rmd Load Report button can be used to load Rmarkdown file in the editor. It will also extract the source code from Notebook and HTML files with embedded Rmarkdown
  • Report > Rmd will read Rmd directly from Rstudio when "To Rstudio (Rmd)" is selected. This will make it possible to use Rstudio Server Pro's Share project option for realtime collaboration in Radiant
  • Long lines of code generated for Report > Rmd will be wrapped to enhance readability
  • Report > R is now equivalent to Report > Rmd but in R-code format
  • Report > Rmd option to view Editor, Preview, or Both
  • Show Rstudio project information in navbar if available

Minor changes

  • Overflow pre and code blocks in HTML reports generated in Report > Rmd
  • Read rdata files through Data > Manage
  • Enhanced keyboard shortcuts
  • Enhanced editing features in Report > Rmd and Report > R based on updates to shinyAce

radiant.data 0.8.7.8

Minor changes

  • Added preview options to Data > Manage based on https://github.com/radiant-rstats/radiant/issues/30
  • Add selected dataset name as default table download name in Data > View, Data > Pivot, and Data > Explore
  • Use "stack" as the default for histograms and frequency charts in Data > Visualize
  • Cleanup Stop & Report option in navbar
  • Upgraded tidyr dependency to 0.7
  • Upgraded dplyr dependency to 0.7.1

Bug fixes

  • Fix for large numbers in Data > Explore that could cause an integer overflow

radiant.data 0.8.6.0

Minor changes

  • Export ggplotly from plotly for interactive plots in Report > Rmd
  • Export subplot from plotly for grids of interactive plots in Report > Rmd
  • Set default res = 96 for renderPlot and dpi = 96 for knitr::opts_chunk
  • Add fillcol, linecol, and pointcol to visualize to set plot colors when no fill or color variable has been selected
  • Reverse legend ordering in Data > Visualize when axes are flipped using coor_flip()
  • Added functions to choose.files and choose.dir. Uses JavaScript on Mac, utils::choose.files and utils::choose.dir on Windows, and reverts to file.choose on Linux
  • Added find_gdrive to determine the path to a user's local Google Drive folder if available
  • fixMs for encoding in reports on Windows

Bug fixes

  • Chi-sqaure results were not displayed correctly in Data > Pivot
  • Fix for state_multiple

radiant.data 0.8.1.0

Minor changes

  • Specify the maximum number of rows to load for a csv and csv (url) file through Data > Manage
  • Support for loading and saving feather files, including specifying the maximum number of rows to load through Data > Manage
  • Added author and year arguments to help modals in inst/app/radiant.R (thanks @kmezhoud)
  • Added size argument for scatter plots to create bubble charts (thanks @andrewsali)
  • Example and CSS formatting for tables in Report > Rmd
  • Added seed argument to make_train
  • Added prop, sdprop, etc. for working with proportions
  • Set ylim in visualize for multiple plots
  • Show progress indicator when saving reports from Report > Rmd
  • copy_attr convenience function
  • refactor function to keep only a subset of levels in a factor and recode the remaining (and first) level to, for example, other
  • register function to add a (transformed) dataset to the dataset dropdown
  • Remember name of state files loaded and suggest that name when re-saving the state
  • Show dataset name in output if dataframe passed directly to analysis function
  • R-notebooks are now the default option for output saved from Report > Rmd and Report > R
  • Improved documentation on how to customize plots in Report > Rmd
  • Keyboard short-cut to put code into Report > Rmd (ALT-enter)

Bug fixes

  • When clicking the rename button, without changing the name, the dataset was set to NULL (thanks @kmezhoud, https://github.com/radiant-rstats/radiant/issues/5)
  • Replace ext with .ext in mutate_each function call
  • Variance estimation in Data > Explore would cause an error with unit cell-frequencies (thanks @kmezhoud, https://github.com/radiant-rstats/radiant/issues/6)
  • Fix for as_integer when factor levels are characters
  • Fix for integer conversion in explore
  • Remove \r and special characters from strings in r_data and r_state
  • Fix sorting in Report > Rmd for tables created using Data > Pivot and Data > Explore when column headers contain symbols or spaces (thanks @4kammer)
  • Set error = TRUE for rmarkdown for consistency with knitr as used in Report > Rmd
  • Correctly handle decimal indicators when loading csv files in Data > Manage
  • Don't overwrite a dataset to combine if combine generates an error when user sets the the name of the combined data to that of an already selected dataset
  • When multiple variables were selected, data were not correctly summarized in Data > Transform
  • Add (function) lable to bar plot when x-variable is an integer
  • Maintain order of variables in Data > Visualize when using "color", "fill", "comby", or "combx"
  • Avoid warning when switching datasets in Data > Transform and variables being summarized do not exists in the new dataset
  • which.pmax produced a list but needed to be integer
  • To customized predictions in radiant.model indexr must be able to customize the prediction dataframe
  • describe now correctly resets the working directory on exit
  • removed all calls to summarise_each and mutate_each from dplyr

Deprecated

  • varp_rm has been deprecated in favor of varpop
  • sdp_rm has been deprecated in favor of sdpop
  • mutate_each has been deprecated in favor of mutate_at, mutate_all, and radiant.data::mutate_ext

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.