MyNixOS website logo
Description

A 'Shiny' Gadget for Interactive 'QRA' Visualizations.

Upload raster data and easily create interactive quantitative risk analysis 'QRA' visualizations. Select from numerous color palettes, base-maps, and different configurations.

DOI

QRAGadget

  • Easily create Quantitative Risk Analysis (QRA) visualizations
  • Choose from numerous color palettes, basemaps, and different configurations

Overview

QRAGadget is a Shiny Gadget for creating interactive QRA visualizations. QRAGadget is powered by the excellent leaflet and raster packages. While this gadget was initially intended for those interested in creating QRA visualizations, it may also be more generally applicable to anyone interested in visualizing raster data in an interactive map.

Getting Started

To install QRAGadget in R:

install.packages("QRAGadget")

Or to install the latest developmental version:

devtools::install_github('paulgovan/QRAGadget')

After installation, and if using RStudio (v0.99.878 or later), the gadget will appear in the Addins dropdown menu. Otherwise, to launch the gadget, simply type:

QRAGadget::QRAGadget()

Example

Input/Output

QRAGadget currently accepts two primary types of raster data: (1) a file upload (in csv format) or (2) an R data.frame object. In order to explore the gadget, create some dummy data:

sample <- matrix(runif(36*36), ncol = 36, nrow = 36) %>%
  data.frame()

Then launch the app:

QRAGadget::QRAGadget()

Launching the app brings up the Input/Output page. To find the dummy data, click R Object under Data Type, and then select sample from the dropdown menu.

Choose a name for the output html file. After customizing the map, clicking Done will create a standalone html file in the current working directory (Be sure not to save over a previously created map file!). Click Cancel any time to start over.

To bookmark the app at any time, click the Bookmark button, which will create a unique url for the current state of the app.

Raster

To format the raster image, click the Raster icon. Here are a number of options for specifying the extents of the raster image (XMIN, XMAX, YMIN, and YMAX) as well as the projection of the raster layer. It is very important that the raster layer be tagged with the correct project coordinate reference system.

To specify the bins for the color palette, click Number to select the total number of bins or Cuts to select both the number and the actual cut values for each bin.

Finally, there is an option to disaggregate the raster layer and create a new one with a higher resolution (smaller cells) while also locally interpolating between the new cell values (smoothed cells). To disaggregate the raster layer, enter the number of cells to disaggregate.

For this example, use the default values for XMIN, XMAX, YMIN, and YMAX as well as the given projection, but enter 5 as the number of cells to disaggregate:

Map

To view the interactive map, click the Map icon. Click the Reset button at any time in order to reset the extents of the map.

Preferences

The Preferences tab has a number of options for customizing the map:

To try out some of these options, select the PuOrColor Palette, the Esri.WorldImageryMap Tile, and move the Control Position over to the bottomleft:

This should result in the following interactive map:

Metadata

Version

0.3.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows