1.4 Shiny demos

1.4.1 Visualising and Modelling Bike Sharing Mobility usage in the city of Milan

Agostino Torti, PhD student - Politecnico di Milano

Track(s): R Dataviz & Shiny

Abstract:

A major trend in modern science is the collection of datasets which are not only “big” but also “complex”. This is particularly true in all sharing mobility systems where data are continuously collected at all time and they are characterised by a high number of features. To extract useful information contained in this huge mass of data, the development of novel statistical techniques and innovative visualization methods are requested. In this context, we focused on BikeMi, the main bike sharing system (BSS) in the city of Milan in Italy, and we implemented an R Shiny App to analyse and study people’s mobility behaviour across the city. Through the app, it is possible to dynamically select different parameters which allow to visualise the bike sharing flows among the districts of the city according to the hour of the day, the day of the week and the weather conditions. Moreover, a predictive model is implemented in the dashboard allowing to observe the future behaviour or the BSS. By doing this, we would like to both visualize the statistically significant spatio-temporal patterns of the users and to model each possible bike flow in the BikeMi network.

Coauthor(s): Alessia Pini, Simone Vantini .

1.4.2 Media Shiny: Marketing Mix Models Builder

Andrea Melloncelli, VanLog

Track(s): R Dataviz & Shiny, R Machine Learning & Models, R Production

Abstract:

Marketing Mix Models are used to understand the effects of advertising campaigns. Building such models is challenging: first of all, it requires control of the external effects, such as seasonalities, competitor activities etc. Secondly, it requires to model the decay effect of communication (adstock effect: I do my advertising today, and in two weeks it still has some effect). The MediaShiny application allows to build Marketing Mix Models interactively: all steps of MMM, such as selecting, transforming and exploring features (time series), adstock control, model building, evaluation and forecasting can be done interactively. As a result the model explains the impact on sales of each media channel (tv, digital, press etc), controlling the external effects. An extra module allows the media budget optimization, using historical data to understand if the level of advertising has no impact or is too high (saturation).

MediaShiny is a Package App developed with Golem and modularized with Shiny modules. Automatically built and provisioned as a Docker image running in a Shiny Proxy instance. Best User Experience is provided with Drag and Drop and navigation guided by action buttons.

Coauthor(s): Mariachiara Fortuna .

1.4.3 ESPRES: A shiny web tool to support River Basin Management planning in European Watersheds

Angel Udias, European Commission, Joint Research Centre (JRC), Ispra, Italy

Track(s): R Life Sciences

Abstract:

Integrated river basin management must meet environmental targets while preserving the economic activities of its communities. Stakeholder decisions need to consider conflicting trade-offs between legislative environmental targets and economic activities, while maintaining a basis of transparency and accountability. ESPRES is a shiny web-based Decision Support Tool (DST) that can be used by stakeholders to explore management options in European water bodies. The management options considered in ESPRES are related with the pressures (water use and nutrient application) reduction. The shiny web interface provides a point of access to perform analyses of efficient pressure reduction strategies reflecting their perception of costs/effort, political difficulty, and social acceptability of the available solutions. Stakeholders express preferences and perceived difficulties in addressing each environmental pressure by assigning relative weights. The tool include a MOO engine to identified Pareto efficient strategies in terms of maximize the quality in the basin minimizing the total effort for reducing the pressures An online version of ESPRES is currently available (www.espres.eu) for four European basins of the Globaqua project, namely the Adige, the Ebro, the Evrotas, and the Sava, to addresses water abstraction and nutrient pollution pressures.

Coauthor(s): A. Udias, B. Grizzetti, F. Bouraoui, O Vigiak, A. Pistocchi .

1.4.4 tsviz: a data-scientist-friendly addin for RStudio

Emanuele Fabbiani, Chief Data Scientist at xtream, PhD student in Machine Learning

Track(s): R Dataviz & Shiny

Abstract:

In recent years, charting libraries have evolved following two main directions. First, they provided users with as many features as possible and second, they added high-level APIs to easily create the most frequent visualizations. RStudio, with its addins, offers the opportunity to further ease the creation of common plots.

Born as an internal project in xtream, tsviz is an open-source Shiny-based addin which contains powerful tools to perform explorative analysis of multivariate time series.

Its usage is dead simple. Once launched, it scans the global environment for suitable variables. You chose one, and several plots of the time series are shown. Line charts, scatter plots, autocorrelogram, periodogram are only a few examples. Interactivity is achieved by the miniUI framework and the adoption of Plotly charts.

Its wide adoption among our customers and the overall positive feedback we received demonstrate how addins, usually thought as shortcuts for developers, may provide effective support to data scientists in performing their routine tasks.

Coauthor(s): Marta Peroni, Riccardo Maganza .

1.4.5 Mobility scan

Josue Aduna, Behavioural and data scientist at Livemobility

Track(s): R Dataviz & Shiny

Abstract:

This is a Shiny application designed and developed to foster sustainable mobility behavior under a specific initiative that I currently work in: Livemobility (see https://www.livemobility.com/).

Broadly speaking, Livemobility is a platform that rewards people for sustainable commuting behavior and helps companies to save money, avoid environmental pollution, improve public health and save travel time. This is achieved through a digital ecosystem that analyses mobility behavior and generates personalized insights to improve mobility efficiency.

The Shiny application makes use of web interactive settings together with Google Maps APIs to provide relevant indicators of impact, generate geographic scans and create mobility profiles.

1.4.6 Developing Shiny applications to facilitate precision agriculture workflows

Lorenzo Busetto, Institute on Remote Sensing of Enviroment - National Research Council of Italy (CNR-IREA)

Track(s): R Applications, R Dataviz & Shiny

Abstract:

Precision Agriculture applications rely on geospatial datasets from heterogeneous sources such as crop maps, information about fertilization/phytosanitary treatments, satellite and meteo data, to optimize agricultural practices from an economic and environmental standpoint. Software instruments allowing to easily record, manage and process such datasets are therefore of paramount importance to facilitate, standardize and speed-up the steps required to implement specific workflows. Although required functionalities are available in open source/commercial software, technicians are often required to use different software tools. This affects the time and effort required to replicate a specific workflow on different areas and crop seasons.

In this contribution we present our experience in developing two Shiny-based prototypes specifically tailored to the needs of operators of a agro-consulting firm providing precision agriculture services. The first prototype is mainly aimed at providing a simplified, standardized and scalable way to insert, record and query information about agricultural practices, such as crop type/variety, fertilisation and phytosanitary treatments and yield. The second is instead dedicated to facilitating access to satellite imagery data, and applying dedicated processing algorithms for identification of homegenous Management Unit Zones.

Coauthor(s): Luigi Ranghetti, Donato Cillis, Maddalena Campi, Saverio Zagaglia, Gabriele Dottori, MIrco Boschetti .

1.4.7 “GUInterp”: a Shiny GUI to support spatial interpolation

Luigi Ranghetti, Institute for Remote Sensing of Environment, Consiglio Nazionale delle Ricerche (IREA-CNR)

Track(s): R Dataviz & Shiny

Abstract:

In this demo we present “GUInterp”, a Shiny interface written to facilitate the operations required to interpolate point data. A typical spatial interpolation workflow includes common steps: loading point data, filtering them to exclude undesired outlier values, setting the interpolation method and parameters, defining an output raster grid and processing data. Interpolation can be conducted in R using dedicated packages; nevertheless, the availability of an interactive interface could be useful to provide additional control during steps requiring user intervention and to facilitate users with low or no programming skills. “GUInterp” was written for this purpose. The user can import input point data, optionally loading a polygon dataset of borders used to constrain the extent of the interpolated outputs. A set of selectors allows filtering input points based on the distribution of the variable to interpolate (which is shown with a reactive histogram) or the spatial position of points (visible on a map). The interpolation can be performed with IDW or Ordinary Kriging methods: in the latter case, the semivariogram can be interactively defined and optimised using a dedicated interface. Further settings can be exploited to tune computation requirements (RAM usage, amount of time) on the basis of available hardware or user needs. “GUInterp” is released as R package under the GNU GPL-3 license.

Coauthor(s): Luigi Ranghetti, Mirco Boschetti, Donato Cillis, Lorenzo Busetto .

1.4.8 A demonstration of ABACUS: Apps Based Activities for Communicating and Understanding Statistics

Mintu Nath, Medical Statistics Team, Institute of Applied Health Sciences, University of Aberdeen, AB25 2ZD, UK

Track(s): R Dataviz & Shiny

Abstract:

ABACUS, developed using Shiny framework, is a set of applications for effective communication and understanding in statistics. It is currently available as an R package. Users who are not familiar with R programming can also access the applications through its web-based interface. The current version of ABACUS includes properties of Normal distribution, properties of the sampling distribution, one-sample z and t tests, two samples unpaired t-test and analysis of variance and comparison of Normal and t distributions. Using an example, the shiny demonstration will include the essential features of the application particularly its relevance in generating data across wide-ranging disciplines, its interactive elements and identifying best practices for presentation of results and interpretation of statistical outputs.

1.4.9 Scoring the Implicit Association Test has never been easier: DscoreApp

Ottavia M. Epifania, University of Padova (IT)

Track(s): R Dataviz & Shiny

Abstract:

Throughout the past decades, the interest in the implicit investigation of attitudes and preferences has been constantly growing among social scientists, and the Implicit Association Test (IAT) is one of the most common measures used for this aim. The so-called “IAT effect” (i.e., the difference in respondents’ performance between two contrasting categorization tasks) is usually expressed by the D-score. Despite that several options exist for computing the D-score, including R packages and SPSS syntaxes, none of them provides either an easy to use interface or a means for immediately visualizing the results. A Shiny Web application (DscoreApp) was developed to provide IAT users with an easy to use and powerful tool for the computation of the D-score. DscoreApp allows users to upload their IAT data, decide which specific D-score algorithm to compute, and immediately see the results in easy to read and interactive graphs. At the end of the computation, users can download a data frame containing the computed D-score and other information on respondents’ performance, such as the proportion of correct responses or the number of trials exceeding a time threshold. Graphical representations can be downloaded as well. Besides providing an easy to use and open source tool for computing the D-score, DscoreApp allows for grasping an immediate overview of the results, and to visually inspect them.

Coauthor(s): Anselmi Pasquale, Robusto Egidio .

1.4.10 rTRhexNG: Hexagon sticker app for rTRNG

Riccardo Porreca, R Enthusiast at Mirai Solutions

Track(s): R Dataviz & Shiny

Abstract:

Hexagon stickers have become a popular way to make software tools, and R packages in particular, visually recognizable and stand out as landmarks in an ever-growing ecosystem. In general, good hexagon logos are not only visually appealing but also convey the key aspects of a package with their graphical design. In this talk, we will showcase rTRhexNG (https://github.com/miraisolutions/rTRhexNG#readme), a Shiny app built for creating the hexagon sticker of the rTRNG (https://github.com/miraisolutions/rTRNG#readme) package. The core idea behind the logo was to have an appealing design that would at the same time illustrate the key features of the package: jump and split operations on (pseudo-)random sequences. Leveraging on the simple yet powerful SVG image format, R was used to automate the creation and location of several visual elements representing random sequences, and a Shiny app was built on top to quickly assess different designs in an interactive way. We demonstrate the Shiny app in action to concretely explain what jump and split mean in rTRNG, and show how the sticker design naturally emerges from their visual representation. The power of this interactive yet automated approach was invaluable to fine-tune the final look of the sticker, also allowing to easily explore alternative polygon or circle designs the implementation naturally extends to.